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
52cb61c2
authored
Sep 09, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed redundant clickListeners from recyclerView
parent
8c089b2f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
93 deletions
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
app/src/main/res/layout/activity_add_word.xml
app/src/main/res/layout/word_item.xml
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
View file @
52cb61c2
...
@@ -29,10 +29,7 @@ class VocabularyAdapter(private val wordItems: MutableList<WordItem>, private va
...
@@ -29,10 +29,7 @@ class VocabularyAdapter(private val wordItems: MutableList<WordItem>, private va
val
wordItem
=
wordItems
[
position
]
val
wordItem
=
wordItems
[
position
]
holder
.
tvWord
.
text
=
wordItem
.
pojo
!!
.
word
holder
.
tvWord
.
text
=
wordItem
.
pojo
!!
.
word
holder
.
tvTranslation
.
text
=
wordItem
.
pojo
!!
.
translation
holder
.
tvTranslation
.
text
=
wordItem
.
pojo
!!
.
translation
holder
.
itemView
.
setOnClickListener
{
openWordItemInfo
(
wordItem
)
}
holder
.
layout
.
setOnClickListener
{
openWordItemInfo
(
wordItem
)
}
holder
.
tvWord
.
setOnClickListener
{
openWordItemInfo
(
wordItem
)
}
holder
.
tvTranslation
.
setOnClickListener
{
openWordItemInfo
(
wordItem
)
}
holder
.
btnPopupMenu
.
setOnClickListener
{
showPopupMenu
(
holder
.
btnPopupMenu
,
position
)
}
holder
.
btnPopupMenu
.
setOnClickListener
{
showPopupMenu
(
holder
.
btnPopupMenu
,
position
)
}
//todo set click listener to menu
//todo set click listener to menu
}
}
...
...
app/src/main/res/layout/activity_add_word.xml
deleted
100644 → 0
View file @
8c089b2f
<?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"
>
<include
layout=
"@layout/img_background"
/>
<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"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
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"
app:layout_constraintEnd_toEndOf=
"parent"
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_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"
/>
<Button
android:id=
"@+id/btnCancel"
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/btn_cancel"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/word_item.xml
View file @
52cb61c2
...
@@ -8,9 +8,6 @@
...
@@ -8,9 +8,6 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:padding=
"8dp"
>
android:padding=
"8dp"
>
<TextView
<TextView
...
@@ -19,8 +16,7 @@
...
@@ -19,8 +16,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"8"
android:layout_weight=
"8"
android:textSize=
"22sp"
android:textSize=
"22sp"
tools:ignore=
"LabelFor"
tools:ignore=
"LabelFor"
/>
android:inputType=
"text"
/>
<TextView
<TextView
android:id=
"@+id/etTranslation"
android:id=
"@+id/etTranslation"
...
@@ -28,8 +24,7 @@
...
@@ -28,8 +24,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"8"
android:layout_weight=
"8"
android:textSize=
"22sp"
android:textSize=
"22sp"
tools:ignore=
"LabelFor"
tools:ignore=
"LabelFor"
/>
android:inputType=
"text"
/>
<ImageButton
<ImageButton
android:id=
"@+id/btnClear"
android:id=
"@+id/btnClear"
...
...
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