Commit c4f241ed by Paktalin

Converted recyclerView textViews to editTexts. Covered with clickable view

parent 9843c6ba
......@@ -15,7 +15,7 @@ class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
fun bind(wordPojo: WordPojo, position: Int, isActivated: Boolean, showPopupMenu: (View, Int) -> Unit) {
tvWord.text = wordPojo.word
tvTranslation.text = wordPojo.translation
itemView.setOnClickListener { showPopupMenu(itemView, position) }
itemView.clickable_view.setOnClickListener { showPopupMenu(itemView, position) }
itemView.isActivated = isActivated
}
......
......@@ -22,25 +22,30 @@
android:layout_marginStart="8dp"
tools:ignore="ContentDescription" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selector"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingLeft="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingRight="16dp"
android:paddingBottom="8dp"
android:background="@drawable/selector"
app:layout_constraintTop_toTopOf="parent">
android:paddingBottom="8dp">
<TextView
<EditText
android:id="@+id/word"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:paddingEnd="@dimen/word_margin"
android:paddingRight="@dimen/word_margin"
android:textColor="@color/text_color"
......@@ -48,15 +53,27 @@
app:fontFamily="@font/neucha"
tools:ignore="LabelFor,RtlSymmetry" />
<TextView
<EditText
android:id="@+id/translation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:textColor="@color/text_color"
android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha"
tools:ignore="LabelFor" />
</LinearLayout>
<View
android:id="@+id/clickable_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:clickable="true"
android:focusable="true" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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