mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
Merge pull request #204 from nextcloud/bottomSheetRoomHeader
Dynamic bottom sheet room header
This commit is contained in:
commit
0efc09d528
3 changed files with 16 additions and 3 deletions
|
@ -26,6 +26,7 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -123,7 +124,18 @@ public class CallMenuController extends BaseController implements FlexibleAdapte
|
|||
menuItems = new ArrayList<>();
|
||||
|
||||
if (menuType.equals(MenuType.REGULAR)) {
|
||||
menuItems.add(new MenuItem(getResources().getString(R.string.nc_configure_room), 0, null));
|
||||
if (!TextUtils.isEmpty(room.getDisplayName())) {
|
||||
menuItems.add(new MenuItem(
|
||||
getResources().getString(
|
||||
R.string.nc_configure_named_room, room.getDisplayName()), 0, null)
|
||||
);
|
||||
} else if (!TextUtils.isEmpty(room.getName())) {
|
||||
menuItems.add(new MenuItem(getResources().getString(
|
||||
R.string.nc_configure_named_room, room.getName()), 0, null)
|
||||
);
|
||||
} else {
|
||||
menuItems.add(new MenuItem(getResources().getString(R.string.nc_configure_room), 0, null));
|
||||
}
|
||||
|
||||
if (room.isNameEditable()) {
|
||||
menuItems.add(new MenuItem(getResources().getString(R.string.nc_rename), 2, getResources().getDrawable(R.drawable
|
||||
|
|
|
@ -84,7 +84,8 @@
|
|||
|
||||
<!-- Room menu -->
|
||||
<string name="nc_start_conversation">Start a conversation</string>
|
||||
<string name="nc_configure_room">Configure room</string>
|
||||
<string name="nc_configure_room">Configure conversation</string>
|
||||
<string name="nc_configure_named_room">Configure conversation %1$s</string>
|
||||
<string name="nc_leave">Leave conversation</string>
|
||||
<string name="nc_rename">Rename conversation</string>
|
||||
<string name="nc_set_password">Set a password</string>
|
||||
|
|
|
@ -10,7 +10,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in a new issue