diff options
author | Andrew Comminos <andrew@comminos.com> | 2016-02-01 07:49:23 +0300 |
---|---|---|
committer | Andrew Comminos <andrew@comminos.com> | 2016-02-01 07:49:23 +0300 |
commit | fb2cd883c385c02dbcf340ac9264e04de494a94e (patch) | |
tree | 26d40f01a862372ef7866fe98324c1eadb6d92b9 | |
parent | dbd184c17977179feee9ec29577c1e2ef2820a02 (diff) |
Add dedicated channel join button.
-rw-r--r-- | app/src/main/java/com/morlunk/mumbleclient/channel/ChannelListAdapter.java | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/channel_row.xml | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/com/morlunk/mumbleclient/channel/ChannelListAdapter.java b/app/src/main/java/com/morlunk/mumbleclient/channel/ChannelListAdapter.java index ee5d68c..cc30afe 100644 --- a/app/src/main/java/com/morlunk/mumbleclient/channel/ChannelListAdapter.java +++ b/app/src/main/java/com/morlunk/mumbleclient/channel/ChannelListAdapter.java @@ -165,6 +165,13 @@ public class ChannelListAdapter extends RecyclerView.Adapter implements UserMenu cvh.mChannelHolder.getPaddingRight(), cvh.mChannelHolder.getPaddingBottom()); + cvh.mJoinButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + mService.joinChannel(channel.getId()); + } + }); + cvh.mMoreButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -468,6 +475,7 @@ public class ChannelListAdapter extends RecyclerView.Adapter implements UserMenu public ImageView mChannelExpandToggle; public TextView mChannelName; public TextView mChannelUserCount; + public ImageView mJoinButton; public ImageView mMoreButton; public ChannelViewHolder(View itemView) { @@ -476,6 +484,7 @@ public class ChannelListAdapter extends RecyclerView.Adapter implements UserMenu mChannelExpandToggle = (ImageView) itemView.findViewById(R.id.channel_row_expand); mChannelName = (TextView) itemView.findViewById(R.id.channel_row_name); mChannelUserCount = (TextView) itemView.findViewById(R.id.channel_row_count); + mJoinButton = (ImageView) itemView.findViewById(R.id.channel_row_join); mMoreButton = (ImageView) itemView.findViewById(R.id.channel_row_more); } } diff --git a/app/src/main/res/layout/channel_row.xml b/app/src/main/res/layout/channel_row.xml index 672cd0d..8b6fad4 100644 --- a/app/src/main/res/layout/channel_row.xml +++ b/app/src/main/res/layout/channel_row.xml @@ -53,6 +53,14 @@ android:padding="10dp"/> <ImageView + android:id="@+id/channel_row_join" + android:layout_width="32dp" + android:layout_height="match_parent" + android:src="@drawable/ic_action_move" + android:tint="?android:attr/textColorSecondary" + android:background="?attr/selectableItemBackgroundBorderless"/> + + <ImageView android:id="@+id/channel_row_more" android:layout_width="32dp" android:layout_height="match_parent" |