fully separate "Last Updated" icon from "Versions"
These two are the same shape, but different sizes, and this is an easy way to manage the sizes. closes #2148
This commit is contained in:
parent
7db4456aae
commit
deea4bd696
@ -844,11 +844,6 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
protected void updateExpandableItem(boolean isExpanded) {
|
protected void updateExpandableItem(boolean isExpanded) {
|
||||||
final int icon = getIcon();
|
final int icon = getIcon();
|
||||||
Drawable iconDrawable = ContextCompat.getDrawable(headerView.getContext(), icon);
|
Drawable iconDrawable = ContextCompat.getDrawable(headerView.getContext(), icon);
|
||||||
if (icon == R.drawable.ic_access_time) {
|
|
||||||
assert iconDrawable != null;
|
|
||||||
iconDrawable = DrawableCompat.wrap(iconDrawable).mutate();
|
|
||||||
DrawableCompat.setTint(iconDrawable, Color.parseColor("#B4B4B4"));
|
|
||||||
}
|
|
||||||
final Drawable expandLess = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_less);
|
final Drawable expandLess = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_less);
|
||||||
final Drawable expandMore = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_more);
|
final Drawable expandMore = ContextCompat.getDrawable(headerView.getContext(), R.drawable.ic_expand_more);
|
||||||
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
|
||||||
@ -877,7 +872,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
|
|
||||||
@DrawableRes
|
@DrawableRes
|
||||||
protected int getIcon() {
|
protected int getIcon() {
|
||||||
return R.drawable.ic_access_time;
|
return R.drawable.ic_versions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -888,7 +883,7 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
super(view);
|
super(view);
|
||||||
headerView = (TextView) view.findViewById(R.id.information);
|
headerView = (TextView) view.findViewById(R.id.information);
|
||||||
final Drawable accessTime = DrawableCompat.wrap(ContextCompat.getDrawable(headerView.getContext(),
|
final Drawable accessTime = DrawableCompat.wrap(ContextCompat.getDrawable(headerView.getContext(),
|
||||||
R.drawable.ic_access_time)).mutate();
|
R.drawable.ic_versions)).mutate();
|
||||||
DrawableCompat.setTint(accessTime, Color.parseColor("#B4B4B4"));
|
DrawableCompat.setTint(accessTime, Color.parseColor("#B4B4B4"));
|
||||||
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(headerView,
|
||||||
accessTime, null, null, null);
|
accessTime, null, null, null);
|
||||||
|
@ -125,7 +125,7 @@ public class AppListActivity extends AppCompatActivity implements LoaderManager.
|
|||||||
|
|
||||||
sortImage = (ImageView) findViewById(R.id.sort);
|
sortImage = (ImageView) findViewById(R.id.sort);
|
||||||
final Drawable lastUpdated = DrawableCompat.wrap(ContextCompat.getDrawable(this,
|
final Drawable lastUpdated = DrawableCompat.wrap(ContextCompat.getDrawable(this,
|
||||||
R.drawable.ic_access_time)).mutate();
|
R.drawable.ic_last_updated)).mutate();
|
||||||
DrawableCompat.setTint(lastUpdated, FDroidApp.isAppThemeLight() ? Color.BLACK : Color.WHITE);
|
DrawableCompat.setTint(lastUpdated, FDroidApp.isAppThemeLight() ? Color.BLACK : Color.WHITE);
|
||||||
final Drawable words = DrawableCompat.wrap(ContextCompat.getDrawable(AppListActivity.this,
|
final Drawable words = DrawableCompat.wrap(ContextCompat.getDrawable(AppListActivity.this,
|
||||||
R.drawable.ic_sort)).mutate();
|
R.drawable.ic_sort)).mutate();
|
||||||
|
15
app/src/main/res/drawable/ic_versions.xml
Normal file
15
app/src/main/res/drawable/ic_versions.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
tools:ignore="VectorRaster">
|
||||||
|
<path
|
||||||
|
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
</vector>
|
Loading…
x
Reference in New Issue
Block a user