Android: Show SD root path in Riivolution activity

This commit is contained in:
JosJuice 2021-10-27 19:24:34 +02:00
parent 22a1f3422c
commit 8b0624f53e
3 changed files with 33 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.widget.Button; import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -16,6 +17,7 @@ import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.activities.EmulationActivity; import org.dolphinemu.dolphinemu.activities.EmulationActivity;
import org.dolphinemu.dolphinemu.features.riivolution.model.RiivolutionPatches; import org.dolphinemu.dolphinemu.features.riivolution.model.RiivolutionPatches;
import org.dolphinemu.dolphinemu.ui.DividerItemDecoration; import org.dolphinemu.dolphinemu.ui.DividerItemDecoration;
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization;
public class RiivolutionBootActivity extends AppCompatActivity public class RiivolutionBootActivity extends AppCompatActivity
{ {
@ -51,6 +53,10 @@ public class RiivolutionBootActivity extends AppCompatActivity
int revision = intent.getIntExtra(ARG_REVISION, -1); int revision = intent.getIntExtra(ARG_REVISION, -1);
int discNumber = intent.getIntExtra(ARG_DISC_NUMBER, -1); int discNumber = intent.getIntExtra(ARG_DISC_NUMBER, -1);
TextView textSdRoot = findViewById(R.id.text_sd_root);
String riivolutionPath = DirectoryInitialization.getUserDirectory() + "/Load/Riivolution";
textSdRoot.setText(getString(R.string.riivolution_sd_root, riivolutionPath));
Button buttonStart = findViewById(R.id.button_start); Button buttonStart = findViewById(R.id.button_start);
buttonStart.setOnClickListener((v) -> buttonStart.setOnClickListener((v) ->
{ {

View File

@ -1,25 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView
android:id="@+id/text_sd_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_large"
tools:text="@string/riivolution_sd_root"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/divider" />
<View
android:id="@+id/divider"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="#1F000000"
android:layout_marginHorizontal="@dimen/spacing_large"
android:layout_marginVertical="@dimen/spacing_small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_sd_root"
app:layout_constraintBottom_toTopOf="@id/scroll_view" />
<ScrollView <ScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toBottomOf="@id/divider"
app:layout_constraintBottom_toTopOf="@id/button_start"> app:layout_constraintBottom_toTopOf="@id/button_start">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp" />
android:layout_marginTop="@dimen/spacing_medlarge" />
</ScrollView> </ScrollView>

View File

@ -482,6 +482,7 @@ It can efficiently compress both junk data and encrypted Wii data.
</string> </string>
<!-- Riivolution Boot Screen --> <!-- Riivolution Boot Screen -->
<string name="riivolution_sd_root">SD Root: %1$s</string>
<string name="riivolution_disabled">Disabled</string> <string name="riivolution_disabled">Disabled</string>
<string name="riivolution_start">Start</string> <string name="riivolution_start">Start</string>