parent
74ba88a0a3
commit
bb96179116
@ -0,0 +1,31 @@ |
||||
package net.pokeranalytics.android.ui.fragment |
||||
|
||||
import android.os.Bundle |
||||
import android.view.LayoutInflater |
||||
import android.view.View |
||||
import android.view.ViewGroup |
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment |
||||
import kotlinx.android.synthetic.main.fragment_bottom_sheet_container.* |
||||
import net.pokeranalytics.android.R |
||||
|
||||
class BottomSheetFragment : BottomSheetDialogFragment() { |
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { |
||||
return inflater.inflate(R.layout.fragment_bottom_sheet_container, container, false) |
||||
} |
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
||||
super.onViewCreated(view, savedInstanceState) |
||||
initUI() |
||||
} |
||||
|
||||
/** |
||||
* Init UI |
||||
*/ |
||||
private fun initUI() { |
||||
close.setOnClickListener { |
||||
dismiss() |
||||
} |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,33 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView |
||||
android:id="@+id/appCompatTextView" |
||||
android:layout_width="0dp" |
||||
android:layout_height="220dp" |
||||
android:background="#222222" |
||||
android:gravity="center" |
||||
android:text="Bottom sheet fragment" |
||||
android:textSize="18sp" |
||||
android:textColor="#FFFFFF" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" /> |
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView |
||||
android:id="@+id/close" |
||||
android:layout_width="32dp" |
||||
android:layout_height="32dp" |
||||
android:layout_marginTop="8dp" |
||||
android:layout_marginEnd="8dp" |
||||
android:background="?selectableItemBackgroundBorderless" |
||||
android:scaleType="centerInside" |
||||
android:src="@drawable/ic_close_24dp" |
||||
android:tint="@color/white" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintTop_toTopOf="@+id/appCompatTextView" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
Loading…
Reference in new issue