mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 16:23:40 +00:00
Further UI changes
This commit is contained in:
parent
e0c8ae54b6
commit
86b8f90aaf
@ -1,10 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/default_session_background" >
|
android:background="@drawable/default_session_background">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/mainContentContainer"
|
android:id="@+id/mainContentContainer"
|
||||||
@ -23,15 +21,16 @@
|
|||||||
<EditText
|
<EditText
|
||||||
style="@style/SessionEditText"
|
style="@style/SessionEditText"
|
||||||
android:id="@+id/groupNameEditText"
|
android:id="@+id/groupNameEditText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/album_total_width"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="@dimen/large_spacing"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:hint="@string/activity_settings_display_name_edit_text_hint" />
|
android:hint="@string/activity_settings_display_name_edit_text_hint" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/displayNameTextView"
|
android:id="@+id/displayNameTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -45,6 +44,39 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<View
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:layout_height="0px"
|
||||||
|
android:layout_width="@dimen/large_spacing"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/cancelEditButton"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:src="@drawable/ic_close_white_24dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/saveEditButton"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_check_white_24dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:layout_height="0px"
|
||||||
|
android:layout_width="@dimen/large_spacing"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -159,14 +159,10 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity(), MemberCli
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun handleIsEditingDisplayNameChanged() {
|
private fun handleIsEditingDisplayNameChanged() {
|
||||||
cancelButton.visibility = if (isEditingDisplayName) View.VISIBLE else View.GONE
|
cancelEditButton.visibility = if (isEditingDisplayName) View.VISIBLE else View.GONE
|
||||||
showQRCodeButton.visibility = if (isEditingDisplayName) View.GONE else View.VISIBLE
|
saveEditButton.visibility = if (isEditingDisplayName) View.VISIBLE else View.GONE
|
||||||
saveButton.visibility = if (isEditingDisplayName) View.VISIBLE else View.GONE
|
|
||||||
displayNameTextView.visibility = if (isEditingDisplayName) View.INVISIBLE else View.VISIBLE
|
displayNameTextView.visibility = if (isEditingDisplayName) View.INVISIBLE else View.VISIBLE
|
||||||
groupNameEditText.visibility = if (isEditingDisplayName) View.VISIBLE else View.INVISIBLE
|
groupNameEditText.visibility = if (isEditingDisplayName) View.VISIBLE else View.INVISIBLE
|
||||||
val titleTextViewLayoutParams = titleTextView.layoutParams as LinearLayout.LayoutParams
|
|
||||||
titleTextViewLayoutParams.leftMargin = if (isEditingDisplayName) toPx(16, resources) else 0
|
|
||||||
titleTextView.layoutParams = titleTextViewLayoutParams
|
|
||||||
val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
if (isEditingDisplayName) {
|
if (isEditingDisplayName) {
|
||||||
groupNameEditText.requestFocus()
|
groupNameEditText.requestFocus()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user