forked from arianne/stendhal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebView: create activity for setting preferences
- Loading branch information
1 parent
292ec69
commit 89dd013
Showing
10 changed files
with
102 additions
and
262 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.arianne.stendhal.client"> | ||
|
||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
|
||
</manifest> |
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
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
42 changes: 42 additions & 0 deletions
42
android/app/src/main/java/org/arianne/stendhal/client/PreferencesActivity.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,42 @@ | ||
/*************************************************************************** | ||
* Copyright © 2022 - Arianne * | ||
*************************************************************************** | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
package org.arianne.stendhal.client; | ||
|
||
import android.os.Bundle; | ||
import android.preference.PreferenceFragment; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
|
||
public class PreferencesActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(final Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_preferences); | ||
|
||
if (findViewById(R.id.preferencesFrame) != null) { | ||
if (savedInstanceState != null) { | ||
return; | ||
} | ||
|
||
final PreferenceFragment frag = new PreferenceFragment() { | ||
@Override | ||
public void onCreate(final Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
addPreferencesFromResource(R.xml.preferences); | ||
} | ||
}; | ||
|
||
getFragmentManager().beginTransaction().add(R.id.preferencesFrame, frag).commit(); | ||
} | ||
} | ||
} |
233 changes: 0 additions & 233 deletions
233
android/app/src/main/java/org/arianne/stendhal/client/Settings.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.