Fix SparkButtons (#608)
* fix the SparkButtons * dont notify adapter after boost/fav
This commit is contained in:
parent
48c239338d
commit
89f93eab85
9 changed files with 44 additions and 39 deletions
|
@ -1,10 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:sparkbutton="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingRight="14dp">
|
||||
|
||||
|
@ -124,7 +127,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/status_name_bar"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:focusable="true"
|
||||
android:lineSpacingMultiplier="1.1"
|
||||
|
@ -137,7 +139,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/status_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="@dimen/status_media_preview_margin_top"
|
||||
android:layout_toEndOf="@+id/status_avatar">
|
||||
|
||||
|
@ -285,12 +286,13 @@
|
|||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="4dp">
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingTop="4dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/status_reply"
|
||||
style="?attr/image_button_style"
|
||||
android:layout_width="24dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/action_reply"
|
||||
|
@ -303,34 +305,34 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.varunest.sparkbutton.SparkButton
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_reblog"
|
||||
android:layout_width="24dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/action_reblog"
|
||||
app:sparkbutton_activeImage="@drawable/reblog_active"
|
||||
app:sparkbutton_iconSize="24dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_reblog_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light" />
|
||||
sparkbutton:activeImage="@drawable/reblog_active"
|
||||
sparkbutton:iconSize="24dp"
|
||||
sparkbutton:inactiveImage="?attr/status_reblog_inactive_drawable"
|
||||
sparkbutton:primaryColor="@color/status_reblog_button_marked_dark"
|
||||
sparkbutton:secondaryColor="@color/status_reblog_button_marked_light" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.varunest.sparkbutton.SparkButton
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_favourite"
|
||||
android:layout_width="24dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/action_favourite"
|
||||
app:sparkbutton_activeImage="?attr/status_favourite_active_drawable"
|
||||
app:sparkbutton_iconSize="24dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_favourite_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light" />
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
sparkbutton:iconSize="24dp"
|
||||
sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable"
|
||||
sparkbutton:primaryColor="@color/status_favourite_button_marked_dark"
|
||||
sparkbutton:secondaryColor="@color/status_favourite_button_marked_light" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:sparkbutton="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/status_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingRight="14dp">
|
||||
|
||||
|
@ -330,18 +333,18 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.varunest.sparkbutton.SparkButton
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_reblog"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_reblog"
|
||||
android:padding="4dp"
|
||||
app:sparkbutton_activeImage="@drawable/reblog_active"
|
||||
app:sparkbutton_iconSize="28dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_reblog_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light" />
|
||||
sparkbutton:activeImage="@drawable/reblog_active"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="?attr/status_reblog_inactive_drawable"
|
||||
sparkbutton:primaryColor="@color/status_reblog_button_marked_dark"
|
||||
sparkbutton:secondaryColor="@color/status_reblog_button_marked_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_reblogs"
|
||||
|
@ -354,18 +357,18 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.varunest.sparkbutton.SparkButton
|
||||
<at.connyduck.sparkbutton.SparkButton
|
||||
android:id="@+id/status_favourite"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:clipToPadding="false"
|
||||
android:contentDescription="@string/action_favourite"
|
||||
android:padding="4dp"
|
||||
app:sparkbutton_activeImage="?attr/status_favourite_active_drawable"
|
||||
app:sparkbutton_iconSize="28dp"
|
||||
app:sparkbutton_inActiveImage="?attr/status_favourite_inactive_drawable"
|
||||
app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light" />
|
||||
sparkbutton:activeImage="?attr/status_favourite_active_drawable"
|
||||
sparkbutton:iconSize="28dp"
|
||||
sparkbutton:inactiveImage="?attr/status_favourite_inactive_drawable"
|
||||
sparkbutton:primaryColor="@color/status_favourite_button_marked_dark"
|
||||
sparkbutton:secondaryColor="@color/status_favourite_button_marked_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_favourites"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue