Videos per page settings added

This commit is contained in:
ivan agosto 2019-02-10 10:29:36 -06:00
parent 700559e28f
commit 329813d1b3
5 changed files with 14 additions and 6 deletions

View File

@ -272,12 +272,11 @@ class ReproductorActivity : AppCompatActivity() {
return return
} }
try { try {
this.mCustomView = paramView this.mCustomView = paramView
this.mOriginalSystemUiVisibility = this@ReproductorActivity.window.decorView.systemUiVisibility this.mOriginalSystemUiVisibility = this@ReproductorActivity.window.decorView.systemUiVisibility
this.mOriginalOrientation = this@ReproductorActivity.requestedOrientation this.mOriginalOrientation = this@ReproductorActivity.requestedOrientation
this.mCustomViewCallback = paramCustomViewCallback this.mCustomViewCallback = paramCustomViewCallback
(this@ReproductorActivity.window.decorView as FrameLayout).addView(this.mCustomView, FrameLayout.LayoutParams(-1, -1)) (this@ReproductorActivity.window.decorView as FrameLayout).addView(this.mCustomView, FrameLayout.LayoutParams(0, 0))
this@ReproductorActivity.window.decorView.systemUiVisibility = 3846 this@ReproductorActivity.window.decorView.systemUiVisibility = 3846
} }
catch (err: Exception){ catch (err: Exception){

View File

@ -14,11 +14,10 @@
<ImageView <ImageView
android:id="@+id/side_imageView" android:id="@+id/side_imageView"
android:layout_width="wrap_content" android:layout_width="50dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:contentDescription="@string/nav_header_desc" android:contentDescription="@string/nav_header_desc"
android:paddingTop="@dimen/nav_header_vertical_spacing" app:srcCompat="@drawable/default_avatar" />
app:srcCompat="@mipmap/ic_launcher_round" />
<TextView <TextView
android:id="@+id/side_usernameTxt" android:id="@+id/side_usernameTxt"

View File

@ -90,6 +90,7 @@
<string name="pref_nfsw_description">Si es activado podria mostrar contenido para adultos o sencible.</string> <string name="pref_nfsw_description">Si es activado podria mostrar contenido para adultos o sencible.</string>
<string name="pref_hostname_title">Instancia Peertube</string> <string name="pref_hostname_title">Instancia Peertube</string>
<string name="pref_message_exit">Reinicia para aplicar los cambios</string> <string name="pref_message_exit">Reinicia para aplicar los cambios</string>
<string name="pref_videos_count_title">Videos por pagina</string>
<!-- End Settings strings --> <!-- End Settings strings -->
</resources> </resources>

View File

@ -102,6 +102,7 @@
<string name="pref_hostname_title">Peertube instance</string> <string name="pref_hostname_title">Peertube instance</string>
<string name="pref_hostname_error" translatable="false">-</string> <string name="pref_hostname_error" translatable="false">-</string>
<string name="pref_message_exit">Restart app to apply changes</string> <string name="pref_message_exit">Restart app to apply changes</string>
<string name="pref_videos_count_title">Videos per page</string>
<!-- End Settings strings --> <!-- End Settings strings -->
</resources> </resources>

View File

@ -18,4 +18,12 @@
android:summary="@string/pref_nfsw_description" android:summary="@string/pref_nfsw_description"
android:title="@string/pref_nfsw_title" /> android:title="@string/pref_nfsw_title" />
<EditTextPreference
android:defaultValue="15"
android:inputType="number"
android:key="videos_count"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="@string/pref_videos_count_title" />
</PreferenceScreen> </PreferenceScreen>