Skip to content

Commit

Permalink
Made the app fullscreen
Browse files Browse the repository at this point in the history
Removed dumb gradient
  • Loading branch information
Mathias-Boulay committed Sep 19, 2021
1 parent 1a46308 commit 50aaa5d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import android.os.PowerManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.webkit.MimeTypeMap;
import android.widget.Button;
import android.widget.ImageButton;
Expand Down Expand Up @@ -68,6 +69,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
Setting.initializeSettings(this);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);


//Create folders used by the app:
createFolder(TEMP_PATH);
Expand Down
14 changes: 0 additions & 14 deletions app/src/main/res/drawable/background_gradiant.xml

This file was deleted.

59 changes: 21 additions & 38 deletions app/src/main/res/layout/main_layout.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/background_gradiant"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@+id/appTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/extended_app_name"
android:textStyle="bold"
android:textColor="@color/PrimaryText"
android:textSize="20sp"

android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="match_parent"
android:background="@color/Background">


<TextView
android:id="@+id/currentTaskTextView"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginTop="90dp"
android:layout_marginStart="5dp"

android:text="@string/process_current_task_progress"
android:textColor="@color/PrimaryText"
android:textStyle="bold"

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.125"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appTitle" />
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/currentTaskProgressBar"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/currentTaskTextView2"
Expand Down Expand Up @@ -74,16 +58,16 @@

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="104dp"
android:layout_marginTop="35dp"
android:layout_marginStart="5dp"

android:text="@string/process_total_task_progress"
android:textColor="@color/PrimaryText"
android:textStyle="bold"

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.118"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appTitle" />
app:layout_constraintStart_toStartOf="@+id/totalTaskProgressBar"
app:layout_constraintTop_toBottomOf="@+id/currentTaskProgressBar" />

<ProgressBar
android:id="@+id/totalTaskProgressBar"
Expand Down Expand Up @@ -121,13 +105,13 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="15dp"

app:layout_constraintBottom_toTopOf="@+id/settingButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/optimizingModsTitle">

<LinearLayout
android:id="@+id/listView"
android:layout_width="match_parent"
Expand Down Expand Up @@ -155,7 +139,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/ic_round_add_24"
android:translationZ="5dp"
android:translationZ="9999dp"
app:layout_constraintBottom_toBottomOf="@+id/addModButton"
app:layout_constraintEnd_toEndOf="@+id/addModButton"
app:layout_constraintStart_toStartOf="@+id/addModButton"
Expand All @@ -166,11 +150,12 @@
android:layout_width="68dp"
android:layout_height="68dp"

android:onClick="showSettings"

android:background="@drawable/rounded_background"
android:foreground="@drawable/ripple_circle"

android:onClick="showSettings"


app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.10"
Expand All @@ -183,7 +168,7 @@
android:layout_height="0dp"
android:layout_margin="5dp"
android:src="@drawable/ic_round_settings_24"
android:translationZ="5dp"
android:translationZ="9999dp"
app:layout_constraintBottom_toBottomOf="@+id/settingButton"
app:layout_constraintEnd_toEndOf="@+id/settingButton"
app:layout_constraintStart_toStartOf="@+id/settingButton"
Expand All @@ -193,17 +178,17 @@
android:id="@+id/optimizeButton"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:paddingHorizontal="16dp"
android:background="@drawable/rounded_background"


android:background="@drawable/rounded_background"
android:foreground="@drawable/ripple_circle"
android:letterSpacing="0.25"

android:onClick="launchOptimizationManually"


android:paddingHorizontal="16dp"
android:text="@string/optimize_button"
android:letterSpacing="0.25"
android:textSize="16sp"

app:layout_constraintBottom_toBottomOf="@+id/settingButton"
Expand All @@ -212,6 +197,4 @@
app:layout_constraintTop_toTopOf="@+id/settingButton" />




</androidx.constraintlayout.widget.ConstraintLayout>
29 changes: 14 additions & 15 deletions app/src/main/res/layout/mod_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@drawable/mod_item_background"
android:layout_marginBottom="8dp"
android:elevation="7dp"
android:foreground="@drawable/ripple_circle">

<androidx.constraintlayout.widget.Guideline
Expand Down Expand Up @@ -48,32 +49,30 @@

android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:paddingStart="2dp"

android:singleLine="true"
android:text="MOD NAME PLACEHOLDER"
android:textColor="@color/PrimaryText"
android:textStyle="bold"
android:singleLine="true"


app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/modDetails"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.4" />
app:layout_constraintStart_toStartOf="@+id/guidelineLeft" />

<TextView
android:id="@+id/modDetails"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="6dp"
android:paddingStart="2dp"

android:text="SIZE PLACEHOLDER"
android:textColor="@color/SecondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
app:layout_constraintTop_toBottomOf="@+id/modTitle" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.62" />

<ProgressBar
android:id="@+id/modProgress"
Expand All @@ -94,18 +93,18 @@

<ImageButton
android:id="@+id/shareModButton"
android:visibility="gone"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="5dp"

android:background="@android:color/transparent"
android:src="@drawable/ic_baseline_share_24"

android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_share_24"
android:visibility="gone"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/guidelineRight"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<resources>
<color name="PrimaryLight">#DCEDC8</color>
<color name="Primary">#8BC34A</color>
<color name="PrimaryDark">#689F38</color>
<color name="PrimaryDark">@android:color/transparent</color>

<color name="PrimaryText">#FFFFFF</color>
<color name="SecondaryText">#7F8185</color>
Expand All @@ -11,9 +11,9 @@

<color name="Accent">#EC4D4B</color>

<color name="Background">#1C1F24</color>
<color name="Background">#28313b</color>

<color name="ModBackground">#353A43</color>
<color name="ModBackground">#485461</color>

<color name="RippleColor">#40FFFFFF</color>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
<item name="colorPrimaryDark">@color/PrimaryDark</item>
<item name="colorAccent">@color/Accent</item>


<item name="android:textColorPrimary">@color/PrimaryText</item>
<item name="android:textColorSecondary">@color/SecondaryText</item>
<item name="android:navigationBarColor">@color/Background</item>



Expand Down

0 comments on commit 50aaa5d

Please sign in to comment.