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,41 +22,58 @@
android:layout_marginStart="8dp"
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/layout"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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">
<TextView
android:id="@+id/word"
android:layout_width="0dp"
<LinearLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingEnd="@dimen/word_margin"
android:paddingRight="@dimen/word_margin"
android:textColor="@color/text_color"
android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha"
tools:ignore="LabelFor,RtlSymmetry" />
<TextView
android:id="@+id/translation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/text_color"
android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha"
tools:ignore="LabelFor" />
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">
<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"
android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha"
tools:ignore="LabelFor,RtlSymmetry" />
<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>
</LinearLayout>
</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