Commit b2c6cda7 authored by Yusuke Iwaki's avatar Yusuke Iwaki

add navigation icon.

parent 3bbe0594
......@@ -16,6 +16,7 @@ public class HomeFragment extends AbstractChatRoomFragment {
@Override public void onResume() {
super.onResume();
activityToolbar.setNavigationIcon(null);
activityToolbar.setTitle("Rocket.Chat - Home");
}
}
......@@ -144,6 +144,16 @@ public class RoomFragment extends AbstractChatRoomFragment implements OnBackPres
}
private void onRenderRoom(RoomSubscription roomSubscription) {
String type = roomSubscription.getT();
if (RoomSubscription.TYPE_CHANNEL.equals(type)) {
activityToolbar.setNavigationIcon(R.drawable.ic_hashtag_white_24dp);
} else if (RoomSubscription.TYPE_PRIVATE.equals(type)) {
activityToolbar.setNavigationIcon(R.drawable.ic_lock_white_24dp);
} else if (RoomSubscription.TYPE_DIRECT_MESSAGE.equals(type)) {
activityToolbar.setNavigationIcon(R.drawable.ic_at_white_24dp);
} else {
activityToolbar.setNavigationIcon(null);
}
activityToolbar.setTitle(roomSubscription.getName());
}
......
<vector android:height="24dp" android:viewportHeight="1792.0"
android:viewportWidth="1792.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M1100,775q0,-108 -53.5,-169t-147.5,-61q-63,0 -124,30.5t-110,84.5 -79.5,137 -30.5,180q0,112 53.5,173t150.5,61q96,0 176,-66.5t122.5,-166 42.5,-203.5zM1664,896q0,111 -37,197t-98.5,135 -131.5,74.5 -145,27.5q-6,0 -15.5,0.5t-16.5,0.5q-95,0 -142,-53 -28,-33 -33,-83 -52,66 -131.5,110t-173.5,44q-161,0 -249.5,-95.5t-88.5,-269.5q0,-157 66,-290t179,-210.5 246,-77.5q87,0 155,35.5t106,99.5l2,-19 11,-56q1,-6 5.5,-12t9.5,-6h118q5,0 13,11 5,5 3,16l-120,614q-5,24 -5,48 0,39 12.5,52t44.5,13q28,-1 57,-5.5t73,-24 77,-50 57,-89.5 24,-137q0,-292 -174,-466t-466,-174q-130,0 -248.5,51t-204,136.5 -136.5,204 -51,248.5 51,248.5 136.5,204 204,136.5 248.5,51q228,0 405,-144 11,-9 24,-8t21,12l41,49q8,12 7,24 -2,13 -12,22 -102,83 -227.5,128t-258.5,45q-156,0 -298,-61t-245,-164 -164,-245 -61,-298 61,-298 164,-245 245,-164 298,-61q344,0 556,212t212,556z"/>
</vector>
<vector android:height="24dp" android:viewportHeight="1792.0"
android:viewportWidth="1792.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M991,1024l64,-256h-254l-64,256h254zM1759,520l-56,224q-7,24 -31,24h-327l-64,256h311q15,0 25,12 10,14 6,28l-56,224q-5,24 -31,24h-327l-81,328q-7,24 -31,24h-224q-16,0 -26,-12 -9,-12 -6,-28l78,-312h-254l-81,328q-7,24 -31,24h-225q-15,0 -25,-12 -9,-12 -6,-28l78,-312h-311q-15,0 -25,-12 -9,-12 -6,-28l56,-224q7,-24 31,-24h327l64,-256h-311q-15,0 -25,-12 -10,-14 -6,-28l56,-224q5,-24 31,-24h327l81,-328q7,-24 32,-24h224q15,0 25,12 9,12 6,28l-78,312h254l81,-328q7,-24 32,-24h224q15,0 25,12 9,12 6,28l-78,312h311q15,0 25,12 9,12 6,28z"/>
</vector>
<vector android:height="24dp" android:viewportHeight="1792.0"
android:viewportWidth="1792.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFFFF" android:pathData="M640,768h512v-192q0,-106 -75,-181t-181,-75 -181,75 -75,181v192zM1472,864v576q0,40 -28,68t-68,28h-960q-40,0 -68,-28t-28,-68v-576q0,-40 28,-68t68,-28h32v-192q0,-184 132,-316t316,-132 316,132 132,316v192h32q40,0 68,28t28,68z"/>
</vector>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment