Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

Commit

Permalink
2020-03-29 Version 1.1.1: Closed #3
Browse files Browse the repository at this point in the history
  • Loading branch information
fartem committed Mar 29, 2020
1 parent 28022b2 commit 4123136
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName '1.1.0'
versionName '1.1.1'

testInstrumentationRunner 'com.smlnskgmail.jaman.ormlitedatabackup.runner.AndroidJacocoTestRunner'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import androidx.annotation.Nullable;

import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.smlnskgmail.jaman.ormlitedatabackup.R;

public abstract class BaseBottomSheet extends BottomSheetDialogFragment {

Expand Down Expand Up @@ -39,4 +40,9 @@ public final View onCreateView(

protected abstract int layoutResId();

@Override
public int getTheme() {
return R.style.AppBottomSheetStyle;
}

}
8 changes: 8 additions & 0 deletions app/src/main/res/drawable/bg_bottom_sheet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorWhite" />
<corners
android:topLeftRadius="@dimen/bottom_sheet_radius"
android:topRightRadius="@dimen/bottom_sheet_radius" />
</shape>
2 changes: 2 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<resources>
<!-- margins -->
<dimen name="margin_default">16dp</dimen>
<dimen name="bottom_sheet_radius">12dp</dimen>

<!-- paddings -->
<dimen name="padding_default">8dp</dimen>
<dimen name="padding_default_double">16dp</dimen>

<!-- text -->
<dimen name="text_size_default">14sp</dimen>
<dimen name="text_size_medium">16sp</dimen>

<!-- images -->
Expand Down
13 changes: 12 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@
<style name="AppEventConfigButton" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textSize">@dimen/text_size_default</item>
</style>

<style name="AppBottomSheetStyle" parent="@style/Theme.Design.Light.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="bottomSheetStyle">@style/AppBottomSheet</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowSoftInputMode">adjustResize</item>
</style>

<style name="AppBottomSheet" parent="@style/Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/bg_bottom_sheet</item>
</style>

</resources>

0 comments on commit 4123136

Please sign in to comment.