1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-27 19:15:50 +01:00

Add buttons to DebugActivity for Welcome and Permissions

This commit is contained in:
Arjan Schrijver 2024-11-24 20:28:06 +01:00
parent 765e6950dc
commit 6f8fbd9b3c
2 changed files with 27 additions and 0 deletions

View File

@ -99,6 +99,7 @@ import nodomain.freeyourgadget.gadgetbridge.BuildConfig;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.Widget;
import nodomain.freeyourgadget.gadgetbridge.activities.welcome.WelcomeActivity;
import nodomain.freeyourgadget.gadgetbridge.adapter.SpinnerWithIconAdapter;
import nodomain.freeyourgadget.gadgetbridge.adapter.SpinnerWithIconItem;
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
@ -772,6 +773,16 @@ public class DebugActivity extends AbstractGBActivity {
getApplicationContext().startActivity(cameraIntent);
}
});
Button startWelcomeActivity = findViewById(R.id.startWelcomeActivity);
startWelcomeActivity.setOnClickListener(view -> {
startActivity(new Intent(this, WelcomeActivity.class));
});
Button startPermissionsActivity = findViewById(R.id.startPermissionsActivity);
startPermissionsActivity.setOnClickListener(view -> {
startActivity(new Intent(this, PermissionsActivity.class));
});
}
@RequiresApi(Build.VERSION_CODES.O)

View File

@ -309,6 +309,22 @@
grid:layout_columnSpan="2"
grid:layout_gravity="fill_horizontal"
android:text="@string/open_camera" />
<Button
android:id="@+id/startWelcomeActivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
grid:layout_gravity="fill_horizontal"
android:text="Welcome Activity" />
<Button
android:id="@+id/startPermissionsActivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
grid:layout_gravity="fill_horizontal"
android:text="Permissions Screen" />
</androidx.gridlayout.widget.GridLayout>
</ScrollView>