Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
vocabulary_notebook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
314fa120
authored
Sep 08, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring in activity_add_word
parent
efc2d1fa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
16 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/paktalin/vocabularynotebook/activities/WordItemInfoActivity.kt
app/src/main/res/layout/activity_add_word.xml
app/src/main/res/values/strings.xml
app/src/main/AndroidManifest.xml
View file @
314fa120
...
...
@@ -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>
...
...
app/src/main/java/com/paktalin/vocabularynotebook/activities/WordItemInfoActivity.kt
View file @
314fa120
...
...
@@ -33,7 +33,7 @@ class WordItemInfoActivity: AppCompatActivity() {
cancel
()
}
R
.
id
.
item_edit
->
{
//todo edit item
}
}
return
true
...
...
app/src/main/res/layout/activity_add_word.xml
View file @
314fa120
<?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=
"
C
ancel"
android:text=
"
@string/btn_c
ancel"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
314fa120
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment