Commit 314fa120 by Paktalin

Refactoring in activity_add_word

parent efc2d1fa
......@@ -23,7 +23,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activities.AddWordActivity"/>
<activity
android:name=".activities.AddWordActivity"
android:windowSoftInputMode="adjustResize"/>
<activity android:name=".activities.WordItemInfoActivity" />
</application>
......
......@@ -33,7 +33,7 @@ class WordItemInfoActivity: AppCompatActivity() {
cancel()
}
R.id.item_edit -> {
//todo edit item
}
}
return true
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/tv_word"
app:layout_constraintBottom_toBottomOf="@+id/etWord"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="@string/tv_translation"
app:layout_constraintBottom_toBottomOf="@+id/etTranslation"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/etTranslation" />
<EditText
android:id="@+id/etWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Word"
app:layout_constraintBottom_toTopOf="@+id/etTranslation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
app:layout_constraintVertical_chainStyle="packed"
tools:ignore="LabelFor"
android:inputType="text" />
<EditText
android:id="@+id/etTranslation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Translation"
app:layout_constraintBottom_toTopOf="@+id/btnSubmitNewWord"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etWord" />
app:layout_constraintTop_toBottomOf="@+id/etWord"
tools:ignore="LabelFor"
android:inputType="text"/>
<Button
android:id="@+id/btnSubmitNewWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Submit"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/btn_save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etTranslation" />
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/btnCancel"
......@@ -46,7 +73,7 @@
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="Cancel"
android:text="@string/btn_cancel"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -5,4 +5,8 @@
<string name="log_in_text">Log In</string>
<string name="sign_up_text">Sign Up</string>
<string name="title_activity_login">Sign in</string>
<string name="tv_word">Word</string>
<string name="tv_translation">Translation</string>
<string name="btn_save">Save</string>
<string name="btn_cancel">Cancel</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment