-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a57a3d7
commit a18e52b
Showing
8 changed files
with
126 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/willchan/simple_random_stock/activities/DisclaimerActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.willchan.simple_random_stock.activities; | ||
|
||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import androidx.appcompat.app.ActionBar; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.appcompat.widget.Toolbar; | ||
|
||
import com.willchan.simple_random_stock.R; | ||
|
||
public class DisclaimerActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_disclaimer); | ||
|
||
// Source: https://developer.android.com/training/appbar/up-action | ||
Toolbar toolBar = findViewById(R.id.toolbar); | ||
setSupportActionBar(toolBar); | ||
|
||
// Get a support Actionbar corresponding to this toolbar | ||
ActionBar ab = getSupportActionBar(); | ||
|
||
// Enable the Up Button | ||
if (ab != null) { | ||
try { | ||
ab.setDisplayHomeAsUpEnabled(true); | ||
} catch (NullPointerException e) { | ||
Log.e(DisclaimerActivity.this.getLocalClassName(), "Unable to set Up Action"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:tint="?attr/colorControlNormal" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout 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:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".activities.DisclaimerActivity"> | ||
|
||
<com.google.android.material.appbar.AppBarLayout | ||
android:id="@+id/disclaimer_appbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/colorPrimary" | ||
android:minHeight="?attr/actionBarSize" | ||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> | ||
|
||
</com.google.android.material.appbar.AppBarLayout> | ||
|
||
<TextView | ||
android:id="@+id/textView2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@id/disclaimer_appbar" | ||
android:layout_alignParentTop="true" | ||
android:layout_marginLeft="20sp" | ||
android:layout_marginTop="60sp" | ||
android:layout_marginRight="20sp" | ||
android:text="@string/disclaimer" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline3" | ||
android:textStyle="bold" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent" | ||
android:layout_below="@id/textView2" | ||
android:layout_marginLeft="20sp" | ||
android:layout_marginTop="20sp" | ||
android:layout_marginRight="20sp" | ||
android:layout_marginBottom="20sp" | ||
android:text="@string/fullText_disclaimer" | ||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5" /> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters