라이브 후원 다이얼로그 - 키보드가 올라왔을 때 화면이 전체적으로 위로 이동하여 보이지 않는 부분이 없어지도록 수정
This commit is contained in:
parent
0a56ef1227
commit
96c72c4fa0
|
@ -5,11 +5,14 @@ import android.content.Intent
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
|
import android.widget.FrameLayout
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import coil.load
|
import coil.load
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
import kr.co.vividnext.sodalive.R
|
import kr.co.vividnext.sodalive.R
|
||||||
import kr.co.vividnext.sodalive.common.Constants
|
import kr.co.vividnext.sodalive.common.Constants
|
||||||
|
@ -32,6 +35,16 @@ class LiveRoomDonationDialog(
|
||||||
bottomSheetDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
bottomSheetDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
bottomSheetDialog.setCancelable(false)
|
bottomSheetDialog.setCancelable(false)
|
||||||
|
|
||||||
|
val bottomSheetInternal = bottomSheetDialog.findViewById<FrameLayout>(
|
||||||
|
com.google.android.material.R.id.design_bottom_sheet
|
||||||
|
)
|
||||||
|
|
||||||
|
if (bottomSheetInternal != null) {
|
||||||
|
val bottomSheetBehavior = BottomSheetBehavior.from(bottomSheetInternal)
|
||||||
|
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||||
|
bottomSheetBehavior.skipCollapsed = true
|
||||||
|
}
|
||||||
|
|
||||||
dialogView.tvCancel.setOnClickListener { bottomSheetDialog.dismiss() }
|
dialogView.tvCancel.setOnClickListener { bottomSheetDialog.dismiss() }
|
||||||
dialogView.tvDonation.setOnClickListener {
|
dialogView.tvDonation.setOnClickListener {
|
||||||
try {
|
try {
|
||||||
|
@ -70,6 +83,10 @@ class LiveRoomDonationDialog(
|
||||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT
|
lp.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||||
|
|
||||||
bottomSheetDialog.window?.attributes = lp
|
bottomSheetDialog.window?.attributes = lp
|
||||||
|
|
||||||
|
dialogView.scrollView.post {
|
||||||
|
dialogView.scrollView.fullScroll(View.FOCUS_DOWN)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/scroll_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_top_round_corner_10_222222"
|
android:background="@drawable/bg_top_round_corner_10_222222"
|
||||||
|
@ -157,8 +162,8 @@
|
||||||
android:hint="함께 보낼 메시지 입력(최대 50자)"
|
android:hint="함께 보낼 메시지 입력(최대 50자)"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1"
|
|
||||||
android:maxLength="50"
|
android:maxLength="50"
|
||||||
|
android:maxLines="1"
|
||||||
android:padding="13.3dp"
|
android:padding="13.3dp"
|
||||||
android:textColor="@color/color_eeeeee"
|
android:textColor="@color/color_eeeeee"
|
||||||
android:textColorHint="@color/color_777777"
|
android:textColorHint="@color/color_777777"
|
||||||
|
@ -200,4 +205,5 @@
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18.3sp" />
|
android:textSize="18.3sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
Loading…
Reference in New Issue