Design menu layout, build adapters and activities

This commit is contained in:
Haafingar
2020-06-09 13:58:01 +10:00
parent 927bcce764
commit cd7fd5d51a
13 changed files with 472 additions and 11 deletions

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/default_session_background" >
<LinearLayout
android:id="@+id/mainContentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/displayNameContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/small_spacing"
android:layout_marginRight="@dimen/large_spacing">
<EditText
style="@style/SessionEditText"
android:id="@+id/displayNameEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textAlignment="center"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:visibility="invisible"
android:hint="@string/activity_settings_display_name_edit_text_hint" />
<TextView
android:id="@+id/displayNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/text"
android:textSize="@dimen/very_large_font_size"
android:textStyle="bold"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_edit_white_24dp"
android:gravity="right"/>
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/medium_spacing"
android:layout_marginRight="@dimen/large_spacing"
android:layout_marginBottom="@dimen/medium_spacing"
android:textSize="@dimen/small_font_size"
android:textColor="@color/text"
android:alpha="0.6"
android:textAlignment="center"
android:text="@string/activity_edit_closed_group_explanation" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/separator" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/large_spacing"
android:layout_marginTop="@dimen/small_spacing"
android:layout_marginRight="@dimen/massive_spacing"
android:layout_marginBottom="@dimen/small_spacing"
android:layout_weight="1"
android:alpha="0.8"
android:text="@string/activity_edit_closed_group_edit_members"
android:textColor="@color/text"
android:textSize="@dimen/medium_font_size" />
<Button
android:id="@+id/addMembersClosedGroupButton"
style="@style/MediumProminentOutlineButton"
android:layout_width="135dp"
android:layout_height="@dimen/small_button_height"
android:layout_marginTop="@dimen/small_spacing"
android:layout_marginRight="@dimen/large_spacing"
android:layout_marginLeft="@dimen/very_large_spacing"
android:layout_marginBottom="@dimen/small_spacing"
android:layout_weight="1"
android:text="@string/activity_edit_closed_group_add_members" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/emptyStateContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:layout_centerInParent="true">
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:background="@color/dialog_background">
<TextView
android:id="@+id/removeFromGroup"
style="@style/ActionItem"
android:drawableStart="@drawable/ic_phonelink_erase_white_24dp"
android:textSize="@dimen/medium_font_size"
android:textColor="@color/text"
android:text="@string/fragment_edit_group_bottom_sheet_remove"/>
<!-- <TextView-->
<!-- android:id="@+id/makeAdministrator"-->
<!-- style="@style/ActionItem"-->
<!-- android:drawableStart="@drawable/ic_edit_white_24dp"-->
<!-- android:textSize="@dimen/medium_font_size"-->
<!-- android:textColor="@color/text"-->
<!-- android:text="@string/fragment_edit_group_bottom_sheet_admin" />-->
</LinearLayout>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:title="Done"
android:id="@+id/editClosedGroupButton"
app:showAsAction="always" />
</menu>

View File

@@ -1769,6 +1769,22 @@
<string name="activity_create_closed_group_too_many_group_members_error">A closed group cannot have more than 10 members</string>
<string name="activity_create_closed_group_invalid_session_id_error">One of the members of your group has an invalid Session ID</string>
<string name="activity_edit_closed_group_title">Edit Closed Group</string>
<string name="activity_edit_closed_group_edit_text_hint">Enter a new group name (optional)</string>
<string name="activity_edit_closed_group_explanation">Closed groups support up to 10 members and provide the same privacy protections as one-on-one sessions.</string>
<string name="activity_edit_closed_group_edit_members">Edit members</string>
<string name="activity_edit_closed_group_add_members">Add members</string>
<string name="activity_edit_closed_group_group_name_missing_error">Group name can\'t be empty</string>
<string name="activity_edit_closed_group_group_name_too_long_error">Please enter a shorter group name</string>
<string name="activity_edit_closed_group_not_enough_group_members_error">Groups must have at least 2 group members</string>
<string name="activity_edit_closed_group_too_many_group_members_error">A closed group cannot have more than 10 members</string>
<string name="activity_edit_closed_group_invalid_session_id_error">One of the members of your group has an invalid Session ID</string>
<string name="activity_edit_closed_group_confirm_removal">Are you sure you want to remove this user?</string>
<string name="activity_edit_closed_group_member_removed">User removed from group</string>
<string name="fragment_edit_group_bottom_sheet_remove">Remove user from group</string>
<string name="fragment_edit_group_bottom_sheet_admin">Make this user a group admin</string>
<string name="activity_join_public_chat_title">Join Open Group</string>
<string name="activity_join_public_chat_error">Couldn\'t join group</string>
<string name="activity_join_public_chat_enter_group_url_tab_title">Open Group URL</string>