Swap app log live play/pause button

This commit is contained in:
M66B 2016-12-25 11:03:47 +01:00
parent 9b7bab9301
commit 274f0fd63f
2 changed files with 3 additions and 2 deletions

View File

@ -547,12 +547,13 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> im
}
});
// Live
holder.ivLive.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
live = !live;
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);
if (live)
AdapterRule.this.notifyDataSetChanged();

View File

@ -369,7 +369,7 @@
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:src="?attr/iconPlay" />
android:src="?attr/iconPause" />
</LinearLayout>
<TextView