Skip to content

Commit

Permalink
Improve ui design
Browse files Browse the repository at this point in the history
  • Loading branch information
GammaBurst101 committed May 21, 2021
1 parent 09a0280 commit 59bd013
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
Expand Down Expand Up @@ -37,6 +39,10 @@ public void generateNum(View view){
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); //will hide the title
getSupportActionBar().hide(); // hide the title bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN); //enable full screen
setContentView(R.layout.activity_main);

minTextView = findViewById(R.id.minValInput);
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".MainActivity">

<TextView
Expand Down Expand Up @@ -72,7 +73,9 @@
android:layout_height="wrap_content"
android:onClick="generateNum"
android:text="@string/generateBtnText"
android:textColor="@color/white"
android:textSize="20sp"
app:backgroundTint="@color/buttonColor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="screenBackground">#3498db</color>
<color name="buttonColor">#3498db</color>
</resources>

0 comments on commit 59bd013

Please sign in to comment.