mirror of
https://github.com/M66B/NetGuard.git
synced 2025-03-04 18:59:35 +00:00
Swap app log live play/pause button
This commit is contained in:
parent
9b7bab9301
commit
274f0fd63f
2 changed files with 3 additions and 2 deletions
|
@ -547,12 +547,13 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> im
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Live
|
||||||
holder.ivLive.setOnClickListener(new View.OnClickListener() {
|
holder.ivLive.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
live = !live;
|
live = !live;
|
||||||
TypedValue tv = new TypedValue();
|
TypedValue tv = new TypedValue();
|
||||||
view.getContext().getTheme().resolveAttribute(live ? R.attr.iconPlay : R.attr.iconPause, tv, true);
|
view.getContext().getTheme().resolveAttribute(live ? R.attr.iconPause : R.attr.iconPlay, tv, true);
|
||||||
holder.ivLive.setImageResource(tv.resourceId);
|
holder.ivLive.setImageResource(tv.resourceId);
|
||||||
if (live)
|
if (live)
|
||||||
AdapterRule.this.notifyDataSetChanged();
|
AdapterRule.this.notifyDataSetChanged();
|
||||||
|
|
|
@ -369,7 +369,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:src="?attr/iconPlay" />
|
android:src="?attr/iconPause" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
Loading…
Add table
Reference in a new issue