Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mazenrashed committed Aug 9, 2021
1 parent 0486400 commit 7c38dad
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 25 deletions.
16 changes: 0 additions & 16 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mazenrashed.bottomsheetmenulib

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.mazenrashed.bottomsheetmenulib.base.BaseAdapter
import com.mazenrashed.bottomsheetmenulib.base.BaseViewHolder
Expand All @@ -18,6 +19,8 @@ class MenuBottomSheetAdapter :
this.textView.text = item?.title
item?.iconRes?.let { this.icon.setImageResource(it) }
item?.iconDrawable?.let { this.icon.setImageDrawable(it) }
this.icon.visibility =
if (item?.iconDrawable == null && item?.iconRes == null) View.GONE else View.VISIBLE
}
}

Expand Down
8 changes: 6 additions & 2 deletions BottomSheetMenuLib/src/main/res/layout/bottom_sheet_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="32dp"
android:clipToPadding="false"
android:paddingBottom="16dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/bottom_sheet_menu_item" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp">

<ImageView
android:id="@+id/icon"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand Down

0 comments on commit 7c38dad

Please sign in to comment.