Some styling for SW
This commit is contained in:
parent
4fae6c703c
commit
3103a0f276
|
@ -170,6 +170,7 @@
|
|||
<activity
|
||||
android:name=".startupwizard.SetupWizardActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:theme="@style/AppTheme.SetupWizard"
|
||||
android:label="@string/title_activity_setup_wizard"></activity>
|
||||
</application>
|
||||
|
||||
|
|
|
@ -76,12 +76,6 @@ public class SWDefinition {
|
|||
.add(new SWInfotext()
|
||||
.label(R.string.backupismissing)
|
||||
.visibility(() -> !ImportExportPrefs.file.exists()))
|
||||
.add(new SWButton()
|
||||
.text(R.string.exitwizard)
|
||||
.action(() -> {
|
||||
SP.putBoolean(R.string.key_setupwizard_processed, true);
|
||||
getActivity().finish();
|
||||
}))
|
||||
)
|
||||
.add(new SWScreen(R.string.language)
|
||||
.skippable(false)
|
||||
|
|
|
@ -60,6 +60,11 @@ public class SetupWizardActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (currentWizardPage == 0) OKDialog.showConfirmation(this, MainApp.gs(R.string.exitwizard), this::finish);
|
||||
else showPreviousPage(null);
|
||||
}
|
||||
|
||||
public void exitPressed(View view) {
|
||||
OKDialog.showConfirmation(this, MainApp.gs(R.string.exitwizard), this::finish);
|
||||
}
|
||||
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_exit_to_app.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_exit_to_app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 602 B |
BIN
app/src/main/res/drawable-mdpi/ic_exit_to_app.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_exit_to_app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 295 B |
BIN
app/src/main/res/drawable-xhdpi/ic_exit_to_app.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_exit_to_app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 499 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 965 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,29 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical"
|
||||
tools:context=".startupwizard.SetupWizardActivity">
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="exitPressed"
|
||||
app:srcCompat="@drawable/ic_exit_to_app" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sw_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:keepScreenOn="true"
|
||||
android:textColor="#33b5e5"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold" />
|
||||
android:textAlignment="center"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="32sp"
|
||||
tools:text="Title" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
<LinearLayout
|
||||
android:id="@+id/sw_content_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp" />
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/sw_content_controls"
|
||||
|
@ -31,42 +46,41 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:background="@color/black_overlay"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/previous_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="showPreviousPage"
|
||||
android:text="@string/setupwizard_previous" />
|
||||
android:text="@string/setupwizard_previous"
|
||||
android:textColor="#FFFFFF" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/skip_button"
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:onClick="showNextPage"
|
||||
android:text="@string/setupwizard_skip"
|
||||
android:visibility="invisible" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="showNextPage"
|
||||
android:text="@string/setupwizard_next"
|
||||
android:visibility="gone" />
|
||||
android:textColor="#FFFFFF" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/finish_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:onClick="finishSetupWizard"
|
||||
android:text="@string/setupwizard_finish"
|
||||
android:visibility="gone" />
|
||||
android:textColor="#FFFFFF" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -72,4 +72,10 @@
|
|||
<color name="deviationred">#72FF0000</color>
|
||||
<color name="deviationblack">#72000000</color>
|
||||
|
||||
|
||||
<color name="swColorPrimary">#303030</color>
|
||||
<color name="swColorPrimaryDark">#303030</color>
|
||||
<color name="swColorAccent">#FFEB3B</color>
|
||||
<color name="swColorBackground">#303030</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -24,5 +24,12 @@
|
|||
<item name="android:textSize">10sp</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.SetupWizard" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorPrimary">@color/swColorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/swColorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/swColorAccent</item>
|
||||
<item name="android:windowBackground">@color/swColorBackground</item>
|
||||
</style>
|
||||
|
||||
<!-- Preferences -->
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue