mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-23 21:50:31 +01:00
Merge pull request #204 from nextcloud/bottomSheetRoomHeader
Dynamic bottom sheet room header
This commit is contained in:
commit
0efc09d528
@ -26,6 +26,7 @@ import android.os.Bundle;
|
|||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -123,7 +124,18 @@ public class CallMenuController extends BaseController implements FlexibleAdapte
|
|||||||
menuItems = new ArrayList<>();
|
menuItems = new ArrayList<>();
|
||||||
|
|
||||||
if (menuType.equals(MenuType.REGULAR)) {
|
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()) {
|
if (room.isNameEditable()) {
|
||||||
menuItems.add(new MenuItem(getResources().getString(R.string.nc_rename), 2, getResources().getDrawable(R.drawable
|
menuItems.add(new MenuItem(getResources().getString(R.string.nc_rename), 2, getResources().getDrawable(R.drawable
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
|
|
||||||
<!-- Room menu -->
|
<!-- Room menu -->
|
||||||
<string name="nc_start_conversation">Start a conversation</string>
|
<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_leave">Leave conversation</string>
|
||||||
<string name="nc_rename">Rename conversation</string>
|
<string name="nc_rename">Rename conversation</string>
|
||||||
<string name="nc_set_password">Set a password</string>
|
<string name="nc_set_password">Set a password</string>
|
||||||
|
@ -10,7 +10,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
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}"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Loading…
Reference in New Issue
Block a user