mirror of https://github.com/deniscerri/ytdlnis
fix app crashing when opening deleted log, added advanced settings
parent
87ef8c9de4
commit
db2d0cb981
@ -0,0 +1,28 @@
|
||||
package com.deniscerri.ytdl.ui.more.settings
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.Typeface
|
||||
import android.os.Bundle
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.preference.EditTextPreference
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceManager
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.afollestad.materialdialogs.utils.MDUtil.getStringArray
|
||||
import com.deniscerri.ytdl.R
|
||||
import com.deniscerri.ytdl.ui.adapter.SortableTextItemAdapter
|
||||
import com.deniscerri.ytdl.util.UiUtil
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
||||
|
||||
class AdvancedSettingsFragment : BaseSettingsFragment() {
|
||||
override val title: Int = R.string.advanced
|
||||
@SuppressLint("RestrictedApi")
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.advanced_preferences, rootKey)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="?attr/colorAccent" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M17.41,6.59L15,5.5l2.41,-1.09L18.5,2l1.09,2.41L22,5.5l-2.41,1.09L18.5,9L17.41,6.59zM21.28,12.72L20.5,11l-0.78,1.72L18,13.5l1.72,0.78L20.5,16l0.78,-1.72L23,13.5L21.28,12.72zM16.24,14.37l1.94,1.47l-2.5,4.33l-2.24,-0.94c-0.2,0.13 -0.42,0.26 -0.64,0.37L12.5,22h-5l-0.3,-2.41c-0.22,-0.11 -0.43,-0.23 -0.64,-0.37l-2.24,0.94l-2.5,-4.33l1.94,-1.47C3.75,14.25 3.75,14.12 3.75,14s0,-0.25 0.01,-0.37l-1.94,-1.47l2.5,-4.33l2.24,0.94c0.2,-0.13 0.42,-0.26 0.64,-0.37L7.5,6h5l0.3,2.41c0.22,0.11 0.43,0.23 0.64,0.37l2.24,-0.94l2.5,4.33l-1.94,1.47c0.01,0.12 0.01,0.24 0.01,0.37S16.25,14.25 16.24,14.37zM13,14c0,-1.66 -1.34,-3 -3,-3s-3,1.34 -3,3s1.34,3 3,3S13,15.66 13,14z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="default,mediaconnect"
|
||||
android:icon="@drawable/ic_code"
|
||||
android:key="youtube_player_client"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
android:title="Player Client" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:icon="@drawable/ic_code"
|
||||
android:key="youtube_po_token"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
android:title="PO Token" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:icon="@drawable/ic_code"
|
||||
android:key="youtube_other_extractor_args"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
android:title="@string/other_youtube_extractor_args" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue=""
|
||||
android:icon="@drawable/ic_terminal"
|
||||
android:key="data_fetching_extra_commands"
|
||||
app:useSimpleSummaryProvider="true"
|
||||
android:title="@string/data_fetching_extra_commands" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Loading…
Reference in New Issue