validate settings

This commit is contained in:
Page Asgardius 2022-11-25 13:18:19 -07:00
parent 5899d333fe
commit 2fb9e1cbde
3 changed files with 4 additions and 0 deletions

View file

@ -95,6 +95,8 @@ public class Settings extends AppCompatActivity {
buffersize = bsizepick.getText().toString();
if (videocache.equals("") || videotime.equals("") || buffersize.equals("")) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.accountadd_null), Toast.LENGTH_SHORT).show();
} else if (videocache.equals("0") || videotime.equals("0")) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.not_zero), Toast.LENGTH_SHORT).show();
} else if (Integer.parseInt(buffersize) <= 2000) {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.buffersize_error), Toast.LENGTH_SHORT).show();
} else if (Integer.parseInt(videotime) > 168) {

View file

@ -93,4 +93,5 @@
<string name="buffersize_error">El tamaño del búfer debe ser de al menos 2001 milisegundos</string>
<string name="mediaplayer_multierror">Solo se puede reproducir un archivo multimedia a la vez</string>
<string name="playback_channel_name">Reproduccion de video</string>
<string name="not_zero">este valor no puede ser cero</string>
</resources>

View file

@ -97,4 +97,5 @@
<string name="buffersize_error">Buffer size must be at least 2001 milliseconds</string>
<string name="mediaplayer_multierror">Only one media file can be played at once</string>
<string name="playback_channel_name">Video Playback</string>
<string name="not_zero">This value cannot be zero</string>
</resources>