Add setting explanations
This commit is contained in:
parent
98a1dd9915
commit
6082e4b8c3
|
@ -15,8 +15,12 @@ package app.fedilab.nitterizeme.activities;
|
|||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import app.fedilab.nitterizeme.R;
|
||||
|
@ -37,11 +41,25 @@ public class InvidiousSettingsActivity extends AppCompatActivity {
|
|||
.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_invidious_settings, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.action_help) {
|
||||
AlertDialog.Builder invidious_settings_helper = new AlertDialog.Builder(InvidiousSettingsActivity.this);
|
||||
View view = getLayoutInflater().inflate(R.layout.popup_invidious_settings_info, new LinearLayout(getApplicationContext()), false);
|
||||
invidious_settings_helper.setView(view);
|
||||
invidious_settings_helper.setTitle(R.string.invidious_help_title);
|
||||
invidious_settings_helper.setPositiveButton(R.string.close, (dialog, id) -> dialog.dismiss());
|
||||
AlertDialog alertDialog = invidious_settings_helper.create();
|
||||
alertDialog.show();
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<vector android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z" />
|
||||
</vector>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:text="@string/invidious_help_ignore" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/invidious_help_remove" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/invidious_help_other" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<menu 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"
|
||||
tools:context="app.fedilab.nitterizeme.activities.InvidiousSettingsActivity">
|
||||
<item
|
||||
android:id="@+id/action_help"
|
||||
android:icon="@drawable/ic_help_outline"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/help"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
|
@ -14,4 +14,4 @@
|
|||
android:orderInCategory="2"
|
||||
android:title="@string/download"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
</menu>
|
|
@ -128,6 +128,12 @@
|
|||
<string name="pref_invidious_head3">Player Style</string>
|
||||
<string name="invidious_player_style_mode_title">Appearance</string>
|
||||
<string name="invidious_player_style_mode_indication">Invidious, the default one. YouTube, using a centered play button and always visible video control bar</string>
|
||||
<string name="help">Help</string>
|
||||
|
||||
<string name="invidious_help_title">Setting options</string>
|
||||
<string name="invidious_help_ignore"><b>Ignore:</b> This value, set as the default one, means that the URL will remain unchanged for a parameter.</string>
|
||||
<string name="invidious_help_remove"><b>Remove:</b> This value means that the setting parameter will be removed from the URL if it exists.</string>
|
||||
<string name="invidious_help_other">When forcing a setting parameters, it will be added if it does not exist, otherwise it will be changed to the new value.</string>
|
||||
|
||||
<string-array name="invidious_theme">
|
||||
<item>Ignore</item>
|
||||
|
|
Loading…
Reference in New Issue