UI bugs fix

This commit is contained in:
Matéo Duparc 2021-03-16 16:32:46 +01:00
parent 4c66251b70
commit 6f6b670ff6
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E
3 changed files with 40 additions and 52 deletions

View File

@ -15,8 +15,8 @@ android {
applicationId "sushi.hardcore.droidfs"
minSdkVersion 21
targetSdkVersion 29
versionCode 10
versionName "1.4.2"
versionCode 11
versionName "1.4.3"
ndk {
abiFilters 'x86_64', 'armeabi-v7a', 'arm64-v8a'

View File

@ -22,10 +22,6 @@ class MainActivity : BaseActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setSupportActionBar(toolbar)
val metrics = DisplayMetrics()
windowManager.defaultDisplay.getMetrics(metrics)
image_logo.layoutParams.height = (metrics.heightPixels/2.2).toInt()
Glide.with(this).load(R.drawable.logo).into(image_logo)
if (!isRecreating){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) +

View File

@ -8,57 +8,49 @@
<include layout="@layout/toolbar"/>
<ScrollView
<sushi.hardcore.droidfs.widgets.ColoredImageView
android:id="@+id/image_logo"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="0dp"
android:layout_margin="30dp"
android:src="@drawable/logo"
android:layout_weight="1"/>
<LinearLayout
<LinearLayout
android:id="@+id/aaa"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickOpen"
android:text="@string/open_volume"
style="@style/button"/>
<sushi.hardcore.droidfs.widgets.ColoredImageView
android:id="@+id/image_logo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"/>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickCreate"
android:text="@string/create_volume"
style="@style/button"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickChangePassword"
android:text="@string/change_volume_password"
style="@style/button"/>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickOpen"
android:text="@string/open_volume"
style="@style/button"/>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickCreate"
android:text="@string/create_volume"
style="@style/button"/>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_button_height"
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickChangePassword"
android:text="@string/change_volume_password"
style="@style/button"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>