Slide 5
Slide 5 text
How to implement Bottom sheets?
// ʲJavaʳDialogΛΧελϜ࣮ͯ͠ݱ͢Δ
Dialog bottomSheet = new Dialog(this, R.style.iQON_BottomSheet);
bottomSheet.setContentView(bottomSheetLayout);
bottomSheet.setCancelable(true);
bottomSheet.getWindow().setLayout(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
bottomSheet.getWindow().setGravity(Gravity.BOTTOM);
bottomSheet.show();
■ ࣗલͰ࣮
// ʲXMLʳBottomSheet༻ͷελΠϧΛ࡞Δ
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowAnimationStyle">@style/iQON.BottomSheet.Animation</item>
// ʲXMLʳදࣔ/ඇදࣔͷΞχϝʔγϣϯ
<item name=“android:windowEnterAnimation">
@anim/bs_show
</item>
<item name=“android:windowExitAnimation">
@anim/bs_hide
</item>