1
0
mirror of https://gitlab.com/openlp/android.git synced 2024-12-22 11:52:49 +00:00

Latest set

This commit is contained in:
Tim Bentley 2015-10-04 22:02:13 +01:00
parent d76013d616
commit aea3b07f78
9 changed files with 33 additions and 8 deletions

View File

@ -167,8 +167,7 @@ public class SettingsActivity extends PreferenceActivity {
// Set the listener to watch for value changes.
preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
// Trigger the listener immediately with the preference's
// current value.
// Trigger the listener immediately with the preference's current value.
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
PreferenceManager
.getDefaultSharedPreferences(preference.getContext())

View File

@ -85,7 +85,7 @@ public class OpenLPHttpClient {
public String getBaseUrl(){
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
useSSL =sharedPrefs.getBoolean(context.getString(R.string.key_ssl_use), false);
useSSL = sharedPrefs.getBoolean(context.getString(R.string.key_ssl_use), false);
String host = sharedPrefs.getString(context.getString(R.string.key_host),
context.getString(R.string.host_default_value));
String port = sharedPrefs.getString(context.getString(R.string.key_port), "4316");

View File

@ -23,6 +23,7 @@ import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.Html;
import android.util.Log;
import android.util.TypedValue;
@ -139,7 +140,14 @@ public class LiveListFragment extends OpenLPFragment {
}
};
setListAdapter(adapter);
//getListView().setSelection(selected - 1);
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
Boolean autoscroll =
sharedPrefs.getBoolean(context.getString(R.string.key_auto_scroll), false);
if (autoscroll){
getListView().setSelection(selected - 1);
}
Log.i(LOG_TAG, "populate_display - exit");
}

View File

@ -24,6 +24,7 @@ import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
@ -44,6 +45,7 @@ import org.openlp.android2.common.OpenLPHttpClient;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ServiceListFragment extends OpenLPFragment {
@ -167,11 +169,17 @@ public class ServiceListFragment extends OpenLPFragment {
text1.setTypeface(null, Typeface.NORMAL);
}
return view;
}
};
setListAdapter(adapter);
//getListView().setSelection(selected - 1);
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
Boolean autoscroll =
sharedPrefs.getBoolean(context.getString(R.string.key_auto_scroll), false);
if (autoscroll){
getListView().setSelection(selected - 1);
}
Log.i(LOG_TAG, "populate_display - exit");
}

View File

@ -8,4 +8,5 @@
<!-- INTEGER -->
<integer name="connectionTimeoutDefaultValue">3000</integer>
<integer name="textSizeDefaultValue">14</integer>
</resources>

View File

@ -1,4 +1,5 @@
<resources>
<string name="key_auto_scroll">key_auto_scroll</string>
<string name="key_enable_custom_timeout">key_enable_custom_timeout</string>
<string name="key_connection_timeout">key_connection_timeout</string>
<string name="key_text_size">key_text_size</string>

View File

@ -28,11 +28,14 @@
<string name="custom_timeout">Set Custom Timeout</string>
<string name="display_blank_summary">Select the required display</string>
<string name="display_desktop">Display Desktop background</string>
<string name="display_list_autoscroll">Allow the selected item to sctoll to the centre of the list</string>
<string name="display_reset">Show Live display</string>
<string name="display_settings">Display Setting</string>
<string name="display_screen">Display Black only</string>
<string name="display_theme">Display Theme only</string>
<string name="enable_custom_timeouts">Enable Custom Timeouts</string>
<string name="enter_alert_text">Enter Alert Text</string>
<string name="enable_autoscroll">Allow displays to auto center</string>
<string name="home">Home</string>
<string name="httpreturn_unauthorised">Unauthorised Access, please enter valid username and password</string>
<string name="live_list">Live List</string>
@ -44,7 +47,6 @@
<string name="process">Process</string>
<string name="service_list">Service List</string>
<string name="stage_view">Stage View</string>
<string name="text_size_type">Display Text Size</string>
<string name="text_size">Select display text size</string>
<string name="text_size_summary">Change the Service text size</string>
<string name="title_activity_settings">Settings</string>

View File

@ -8,4 +8,10 @@
android:summary="@string/text_size_summary"
android:title="@string/text_size" />
<CheckBoxPreference
android:key="key_auto_scroll"
android:defaultValue="false"
android:summary="@string/display_list_autoscroll"
android:title="@string/enable_autoscroll"/>
</PreferenceScreen>

View File

@ -4,7 +4,7 @@
<header
android:fragment="org.openlp.android2.activities.SettingsActivity$GeneralPreferenceFragment"
android:title="@string/text_size_type" />
android:title="@string/display_settings" />
<header
android:fragment="org.openlp.android2.activities.SettingsActivity$NotificationPreferenceFragment"