Skip to content

Commit

Permalink
Let some UI elements adjust themselves (will look better on larger fo…
Browse files Browse the repository at this point in the history
…nts)
  • Loading branch information
renyuneyun committed Feb 21, 2018
1 parent 1978f56 commit 3e6d72b
Showing 1 changed file with 65 additions and 82 deletions.
147 changes: 65 additions & 82 deletions app/src/main/res/layout/activity_edit_event.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,83 +8,81 @@
tools:context="ryey.easer.core.ui.edit.EditEventActivity">


<TextView
android:id="@+id/textView4"
style="@style/LR.Left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/text_title"
app:layout_constraintBaseline_toBaselineOf="@+id/editText_event_title"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent" />

<EditText
android:id="@+id/editText_event_title"
style="@style/LR.Right"
android:layout_width="0dp"
<GridLayout
android:id="@+id/layout_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_event_title"
app:layout_constraintBottom_toTopOf="@+id/spinner_parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView4"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent" >

<TextView
android:id="@+id/textView4"
style="@style/LR.Left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_column="0"
android:layout_row="0"
android:text="@string/text_title" />

<EditText
android:id="@+id/editText_event_title"
style="@style/LR.Right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="0"
android:hint="@string/hint_event_title" />

<TextView
android:id="@+id/textView6"
style="@style/LR.Left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="2dp"
android:text="@string/text_parent"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/spinner_parent" />
<TextView
android:id="@+id/textView6"
style="@style/LR.Left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_column="0"
android:layout_marginTop="2dp"
android:layout_row="1"
android:text="@string/text_parent" />

<Spinner
android:id="@+id/spinner_parent"
style="@style/LR.Right"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/spinner_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView6"
app:layout_constraintTop_toBottomOf="@+id/editText_event_title" />
<Spinner
android:id="@+id/spinner_parent"
style="@style/LR.Right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="1" />

<TextView
android:id="@+id/textView7"
style="@style/LR.Left"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_column="0"
android:layout_marginTop="2dp"
android:layout_row="2"
android:text="@string/text_profile" />

<TextView
android:id="@+id/textView7"
style="@style/LR.Left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="2dp"
android:text="@string/text_profile"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/spinner_profile" />
<Spinner
android:id="@+id/spinner_profile"
style="@style/LR.Right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="2" />

<Spinner
android:id="@+id/spinner_profile"
style="@style/LR.Right"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView7"
app:layout_constraintTop_toBottomOf="@+id/spinner_parent" />
</GridLayout>

<android.support.constraint.Guideline
android:id="@+id/guideline"
<android.support.v7.widget.SwitchCompat
android:id="@+id/switch_use_scenario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="80dp" />

android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:showText="true"
android:textOff="@string/text_inline_scenario"
android:textOn="@string/text_use_scenario"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_top" />

<ryey.easer.core.ui.edit.EventPluginViewPager
android:id="@+id/pager"
Expand All @@ -93,7 +91,6 @@
android:layout_height="0dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/spinner_profile"
app:layout_constraintTop_toBottomOf="@+id/switch_use_scenario">

<android.support.v4.view.PagerTitleStrip
Expand All @@ -106,20 +103,6 @@
android:textColor="#fff" />
</ryey.easer.core.ui.edit.EventPluginViewPager>

<android.support.v7.widget.SwitchCompat
android:id="@+id/switch_use_scenario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:showText="true"
android:textOff="@string/text_inline_scenario"
android:textOn="@string/text_use_scenario"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spinner_profile" />

<android.support.constraint.ConstraintLayout
android:id="@+id/layout_use_scenario"
android:layout_width="0dp"
Expand Down

0 comments on commit 3e6d72b

Please sign in to comment.