Refactor ripple drawables

This commit is contained in:
Moez Bhatti
2016-07-07 22:04:51 -10:00
parent 006c14db03
commit d96d1b9b05
10 changed files with 8 additions and 9 deletions
@@ -292,21 +292,21 @@ public class ThemeManager {
mBackgroundColor = mResources.getColor(R.color.grey_light_mega_ultra); mBackgroundColor = mResources.getColor(R.color.grey_light_mega_ultra);
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_light_text_primary); mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_light_text_primary);
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_light_text_secondary); mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_light_text_secondary);
mRippleBackgroundRes = R.drawable.button_background_transparent; mRippleBackgroundRes = R.drawable.ripple;
break; break;
case DARK: case DARK:
mBackgroundColor = mResources.getColor(R.color.grey_material); mBackgroundColor = mResources.getColor(R.color.grey_material);
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary); mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary); mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
mRippleBackgroundRes = R.drawable.button_background_transparent_light; mRippleBackgroundRes = R.drawable.ripple_light;
break; break;
case BLACK: case BLACK:
mBackgroundColor = mResources.getColor(R.color.black); mBackgroundColor = mResources.getColor(R.color.black);
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary); mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary); mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
mRippleBackgroundRes = R.drawable.button_background_transparent_light; mRippleBackgroundRes = R.drawable.ripple_light;
break; break;
} }
@@ -166,6 +166,7 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> { LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
holder.mRoot.setBackgroundDrawable(ThemeManager.getRippleBackground()); holder.mRoot.setBackgroundDrawable(ThemeManager.getRippleBackground());
holder.mSlideShowButton.setBackgroundDrawable(ThemeManager.getRippleBackground());
holder.mMmsView.getForeground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.SRC_ATOP); holder.mMmsView.getForeground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.SRC_ATOP);
}); });
@@ -76,7 +76,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@drawable/button_background_transparent"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_play" android:src="@drawable/ic_play"
android:visibility="gone" /> android:visibility="gone" />
@@ -76,7 +76,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:background="@drawable/button_background_transparent"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_play" android:src="@drawable/ic_play"
android:visibility="gone" /> android:visibility="gone" />
+3 -3
View File
@@ -142,7 +142,7 @@
android:id="@+id/attach" android:id="@+id/attach"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/button_background_transparent_light" android:background="@drawable/ripple_light"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_photo" /> android:src="@drawable/ic_photo" />
@@ -150,7 +150,7 @@
android:id="@+id/camera" android:id="@+id/camera"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/button_background_transparent_light" android:background="@drawable/ripple_light"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_camera" /> android:src="@drawable/ic_camera" />
@@ -158,7 +158,7 @@
android:id="@+id/delay" android:id="@+id/delay"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/button_background_transparent_light" android:background="@drawable/ripple_light"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_timer" /> android:src="@drawable/ic_timer" />
</LinearLayout> </LinearLayout>
+1 -1
View File
@@ -37,7 +37,7 @@
android:id="@+id/widget_compose" android:id="@+id/widget_compose"
android:layout_width="56dp" android:layout_width="56dp"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/button_background_transparent" android:background="@drawable/ripple"
android:contentDescription="@string/new_message" android:contentDescription="@string/new_message"
android:padding="16dp" android:padding="16dp"
android:src="@drawable/ic_compose" /> android:src="@drawable/ic_compose" />