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

Updates for Tablet

This commit is contained in:
Tim Bentley 2015-01-19 20:26:35 +00:00
parent 57e5422547
commit 8953a8edb7
31 changed files with 389 additions and 243 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
@ -7,7 +7,9 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="OpenLP" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
@ -10,7 +10,7 @@
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugJava" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
@ -31,11 +31,13 @@
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
@ -77,12 +79,14 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-21.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="android-async-http-1.4.6" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.0" level="project" />
</component>
</module>

View File

@ -2,25 +2,26 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "org.openlp.android2"
minSdkVersion 14
minSdkVersion 15
targetSdkVersion 21
versionCode 2
versionName "2.0"
}
buildTypes {
release {
runProguard false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.loopj.android:android-async-http:1.4.6'
}

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.openlp.android2" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
@ -18,6 +20,10 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".fragments.SettingsActivity"
android:label="@string/title_activity_settings" >
</activity>
<activity
android:name=".activities.SettingsActivity"
android:label="@string/title_activity_settings"

View File

@ -1,42 +1,35 @@
/******************************************************************************
* OpenLP - Open Source Lyrics Projection *
* --------------------------------------------------------------------------- *
* Copyright (c) 2011-2014 Raoul Snyman *
* Portions copyright (c) 2011-2014 Tim Bentley, Johan Mynhardt *
* *
* --------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the Free *
* Software Foundation; version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
* more details. *
* *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., 59 *
* Temple Place, Suite 330, Boston, MA 02111-1307 USA *
*******************************************************************************/
package org.openlp.android2;
import android.app.Activity;
import android.app.ActionBar;
import android.app.FragmentManager;
import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.app.ActionBar;
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.support.v4.widget.DrawerLayout;
import org.openlp.android2.activities.ConnectionActivity;
import org.openlp.android2.activities.SettingsActivity;
import org.openlp.android2.common.NavigationOptions;
import org.openlp.android2.dialogs.AlertDisplayDialog;
import org.openlp.android2.dialogs.BlankDisplayDialog;
import org.openlp.android2.fragments.*;
import org.openlp.android2.fragments.AboutFragment;
import org.openlp.android2.fragments.HomeFragment;
import org.openlp.android2.fragments.LiveListFragment;
import org.openlp.android2.fragments.LiveWebFragment;
import org.openlp.android2.fragments.NavigationDrawerFragment;
import org.openlp.android2.fragments.ServiceListFragment;
import org.openlp.android2.fragments.StageWebFragment;
public class OpenLP extends Activity
public class OpenLP extends ActionBarActivity
implements NavigationDrawerFragment.NavigationDrawerCallbacks {
/**
@ -48,14 +41,16 @@ public class OpenLP extends Activity
* Used to store the last screen title. For use in {@link #restoreActionBar()}.
*/
private CharSequence mTitle;
private boolean backArrowActive = false;
private Menu dropdownMenu;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_open_lp);
setContentView(R.layout.activity_main);
mNavigationDrawerFragment = (NavigationDrawerFragment)
getFragmentManager().findFragmentById(R.id.navigation_drawer);
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
mTitle = getTitle();
// Set up the drawer.
@ -100,15 +95,39 @@ public class OpenLP extends Activity
mTitle = getString(R.string.live_view);
break;
}
menuVisible();
}
public void restoreActionBar() {
try {
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
//actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(mTitle);
} catch (Exception e) {
e.printStackTrace();
}
}
public void setMenuActive(){
backArrowActive = true;
}
public void menuVisible() {
if (dropdownMenu != null){
MenuItem checkable = dropdownMenu.findItem(R.id.action_back);
if (checkable != null) {
if (backArrowActive) {
checkable.setVisible(true);
} else {
checkable.setVisible(false);
}
}
}
backArrowActive = false;
//restoreActionBar();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
@ -130,14 +149,13 @@ public class OpenLP extends Activity
// as you specify a parent activity in AndroidManifest.xml.
Intent intent;
switch (item.getItemId()) {
case R.id.action_back:
onNavigationDrawerItemSelected(NavigationOptions.ServiceList);
return true;
case R.id.action_preferences:
intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
return true;
case R.id.action_connections:
intent = new Intent(this, ConnectionActivity.class);
startActivity(intent);
return true;
case R.id.action_refresh:
if (this.mTitle.equals(getString(R.string.service_list))) {
ServiceListFragment fragment = (ServiceListFragment)
@ -156,11 +174,51 @@ public class OpenLP extends Activity
new AlertDisplayDialog().show(getFragmentManager(), "AlertDialog");
return true;
case R.id.action_about:
getFragmentManager().beginTransaction()
.replace(R.id.container, AboutFragment.newInstance())
.commit();
getFragmentManager().beginTransaction().replace(R.id.container,
new AboutFragment()).commit();
default:
return super.onOptionsItemSelected(item);
}
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {
/**
* The fragment argument representing the section number for this
* fragment.
*/
private static final String ARG_SECTION_NUMBER = "section_number";
/**
* Returns a new instance of this fragment for the given section
* number.
*/
public static PlaceholderFragment newInstance(int sectionNumber) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
}
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
return rootView;
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
//((OpenLP) activity).onSectionAttached(
// getArguments().getInt(ARG_SECTION_NUMBER));
}
}
}

View File

@ -20,7 +20,10 @@
*******************************************************************************/
package org.openlp.android2.activities;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import org.openlp.android2.R;
@ -32,9 +35,45 @@ public class SettingsActivity extends PreferenceActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();
//todo fix this code to work with fragments but not now!
//getFragmentManager().beginTransaction()
// .replace(android.R.id.content, new SettingsFragment())
// .commit();
getPreferenceManager()
.setSharedPreferencesName(getString(R.string.keySharedPreferences));
addPreferencesFromResource(R.xml.pref_general);
final SharedPreferences sharedPreferences = getPreferenceManager()
.getSharedPreferences();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(sharedPreferences.getString(
getString(R.string.keyHost),
getString(R.string.not_set)));
stringBuilder.append(":");
Boolean useSsl = sharedPreferences.getBoolean(
getString(R.string.key_ssl_use), false);
stringBuilder.append(
String.format("%s %s",
sharedPreferences.getString(
getString(R.string.keyPort),
getString(R.string.not_set)), useSsl ? "(SSL)" : ""));
final Preference hostPreference = findPreference(getString(R.string.keyHost));
hostPreference.setTitle(
getPreferenceManager().getSharedPreferences()
.getString(
getString(R.string.key_profile_selected_title),
getString(R.string.url)
)
);
hostPreference.setSummary(stringBuilder.toString());
Preference preference = findPreference(getString(R.string.keyHost));
preference.setIntent(new Intent(this, ConnectionActivity.class));
}

View File

@ -21,6 +21,9 @@
package org.openlp.android2.fragments;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.content.SharedPreferences;
import android.text.Html;
@ -49,6 +52,8 @@ import java.util.List;
public class LiveListFragment extends OpenLPFragment {
private int selected = 0;
private String LOG_TAG = LiveListFragment.class.getName();
public static LiveListFragment newInstance() {
@ -80,7 +85,7 @@ public class LiveListFragment extends OpenLPFragment {
public void populateDisplay(String json) {
Log.i(LOG_TAG, "populate_display - entry");
List<HashMap<String, String>> aList = new ArrayList<HashMap<String, String>>();
int selected = 0;
selected = 0;
try {
JSONArray items = new JSONObject(json).getJSONObject("results").getJSONArray("slides");
@ -90,11 +95,9 @@ public class LiveListFragment extends OpenLPFragment {
HashMap<String, String> hm = new HashMap<String, String>();
hm.put("tag", item.getString("tag"));
if (item.getString("selected").equals("true")) {
hm.put("liveListSelected", Html.fromHtml(item.getString("html")).toString());
selected = i;
} else {
hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString());
}
hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString());
aList.add(hm);
}
} catch (JSONException e) {
@ -121,12 +124,14 @@ public class LiveListFragment extends OpenLPFragment {
R.layout.fragment_livelist, from, to){
public View getView(int position, View convertView, ViewGroup parent) {
View view = super.getView(position, convertView, parent);
TextView text1 = (TextView) view.findViewById(R.id.liveListNormal);
TextView text1 = (TextView) view.findViewById(R.id.tag);
text1.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
TextView text2 = (TextView) view.findViewById(R.id.liveListSelected);
TextView text2 = (TextView) view.findViewById(R.id.liveListNormal);
text2.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
TextView text3 = (TextView) view.findViewById(R.id.tag);
text3.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
if (selected == position){
text2.setTextColor(Color.parseColor("#000000"));
text2.setTypeface(null, Typeface.BOLD_ITALIC);
}
return view;
};

View File

@ -1,9 +1,9 @@
package org.openlp.android2.fragments;
import android.support.v7.app.ActionBarActivity;
import android.app.Activity;
import android.app.ActionBar;
import android.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
@ -17,7 +17,13 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import org.openlp.android2.R;
import java.util.ArrayList;
@ -82,7 +88,7 @@ public class NavigationDrawerFragment extends Fragment {
}
@Override
public void onActivityCreated (Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// Indicate that this fragment would like to influence the set of actions in the action bar.
setHasOptionsMenu(true);
@ -136,17 +142,6 @@ public class NavigationDrawerFragment extends Fragment {
R.layout.fragment_navigation_drawer_list, from, to);
mDrawerListView.setAdapter(adapter);
// new ArrayAdapter<String>(
// getActionBar().getThemedContext(),
// R.layout.fragment_navigation_drawer_list,
// R.id.drawer_text,
// new String[]{
// getString(R.string.home),
// getString(R.string.service_list),
// getString(R.string.live_list),
// getString(R.string.stage_view),
// getString(R.string.live_view),
// }));
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
return mDrawerListView;
}
@ -189,7 +184,7 @@ public class NavigationDrawerFragment extends Fragment {
return;
}
getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
getActivity().supportInvalidateOptionsMenu(); // calls onPrepareOptionsMenu()
}
@Override
@ -208,7 +203,7 @@ public class NavigationDrawerFragment extends Fragment {
sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER, true).apply();
}
getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
getActivity().supportInvalidateOptionsMenu(); // calls onPrepareOptionsMenu()
}
};
@ -288,7 +283,7 @@ public class NavigationDrawerFragment extends Fragment {
return true;
}
if (item.getItemId() == R.id.action_alert) {
if (item.getItemId() == R.id.action_example) {
Toast.makeText(getActivity(), "Example action.", Toast.LENGTH_SHORT).show();
return true;
}
@ -308,7 +303,7 @@ public class NavigationDrawerFragment extends Fragment {
}
private ActionBar getActionBar() {
return getActivity().getActionBar();
return ((ActionBarActivity) getActivity()).getSupportActionBar();
}
/**

View File

@ -82,8 +82,7 @@ public class ServiceListFragment extends OpenLPFragment {
itemClicked(position);
noScreenUpdate = true;
isDoubleClick = true;
//((OpenLP) getActivity()).makeBackArrowVisible(true);
//((OpenLP) getActivity()).menuVisible(R.id.action_back);
((OpenLP) getActivity()).setMenuActive();
((OpenLP) getActivity()).onNavigationDrawerItemSelected(NavigationOptions.LiveList);
((OpenLP) getActivity()).restoreActionBar();
return false;

View File

@ -1,55 +0,0 @@
package org.openlp.android2.fragments.dummy;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Helper class for providing sample content for user interfaces created by
* Android template wizards.
* <p>
* TODO: Replace all uses of this class before publishing your app.
*/
public class DummyContent {
/**
* An array of sample (dummy) items.
*/
public static List<DummyItem> ITEMS = new ArrayList<DummyItem>();
/**
* A map of sample (dummy) items, by ID.
*/
public static Map<String, DummyItem> ITEM_MAP = new HashMap<String, DummyItem>();
static {
// Add 3 sample items.
addItem(new DummyItem("1", "Item 1"));
addItem(new DummyItem("2", "Item 2"));
addItem(new DummyItem("3", "Item 3"));
}
private static void addItem(DummyItem item) {
ITEMS.add(item);
ITEM_MAP.put(item.id, item);
}
/**
* A dummy item representing a piece of content.
*/
public static class DummyItem {
public String id;
public String content;
public DummyItem(String id, String content) {
this.id = id;
this.content = content;
}
@Override
public String toString() {
return content;
}
}
}

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_live_list_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:smoothScrollbar="true"
android:clickable="false"
android:longClickable="false">
<TextView
android:id="@+id/tag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:paddingBottom="10dp"
android:layout_weight="1"/>
<TextView
android:id="@+id/liveListNormal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#ff2a2a2a"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textStyle="normal"
android:layout_weight="1"/>
<TextView
android:id="@+id/liveListSelected"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textStyle="bold|italic"
android:layout_weight="1"/>
</LinearLayout>

View File

@ -0,0 +1,24 @@
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".MainActivity">
<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout android:id="@+id/container" android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- android:layout_gravity="start" tells DrawerLayout to treat
this as a sliding drawer on the left side for left-to-right
languages and on the right side for right-to-left languages.
If you're not building against API 17 or higher, use
android:layout_gravity="left" instead. -->
<!-- The drawer is given a fixed width in dp and extends the full height of
the container. -->
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent"
android:layout_gravity="start" android:name="org.openlp.android2.fragments.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>

View File

@ -5,4 +5,5 @@
android:background="#000000"
android:gravity="center"
android:linksClickable="true"
android:padding="32dp" />
android:padding="32dp"
android:textColor="#ffffffff" />

View File

@ -11,10 +11,35 @@
android:layout_height="match_parent"
android:numColumns="2" />
<TextView
android:id="@android:id/empty"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_live_list_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" />
android:orientation="horizontal"
android:smoothScrollbar="true"
android:clickable="false"
android:longClickable="false">
<TextView
android:id="@+id/tag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:paddingBottom="10dp"
android:layout_weight="1"/>
<TextView
android:id="@+id/liveListNormal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#ff2a2a2a"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textStyle="normal"
android:layout_weight="1"/>
</LinearLayout>
</FrameLayout>

View File

@ -11,30 +11,32 @@
android:longClickable="false">
<TextView
android:id="@+id/tag"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:paddingBottom="10dp"
/>
android:layout_weight="1"/>
<TextView
android:id="@+id/liveListNormal"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#ff2a2a2a"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textStyle="normal"/>
android:textStyle="normal"
android:layout_weight="1"/>
<TextView
android:id="@+id/liveListSelected"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="14sp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:textStyle="bold|italic"/>
android:textStyle="bold|italic"
android:layout_weight="1"/>
</LinearLayout>

View File

@ -0,0 +1,12 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity$PlaceholderFragment">
<TextView android:id="@+id/section_label" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>

View File

@ -1,12 +1,5 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/darker_gray"
android:dividerHeight="2dp"
android:background="#DADADC"
android:textAppearance="?android:attr/textAppearanceLarge"
tools:context=".NavigationDrawerFragment"
android:drawSelectorOnTop="false"
/>
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:choiceMode="singleChoice"
android:divider="@android:color/transparent" android:dividerHeight="0dp"
android:background="#cccc" tools:context=".NavigationDrawerFragment" />

View File

@ -1,6 +1,5 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:showAsAction="never" />
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>

View File

@ -0,0 +1,8 @@
<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=".MainActivity">
<item android:id="@+id/action_example" android:title="@string/action_settings"
app:showAsAction="withText|ifRoom" />
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>

View File

@ -1,40 +1,37 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_back"
android:checkable="true"
android:visible="false"
android:icon="@drawable/ic_arrow_back"
android:title="@string/action_back"
android:showAsAction="always" />
app:showAsAction="always" />
<item android:id="@+id/action_blank"
android:checkable="true"
android:visible="true"
android:icon="@drawable/ic_settings_display"
android:title="@string/action_blank"
android:showAsAction="always" />
app:showAsAction="always" />
<item android:id="@+id/action_alert"
android:checkable="true"
android:visible="true"
android:icon="@drawable/ic_alarm_add"
android:title="@string/action_alert"
android:showAsAction="always" />
app:showAsAction="always" />
<item android:id="@+id/action_refresh"
android:icon="@drawable/ic_refresh"
android:title="@string/action_refresh"
android:showAsAction="never|withText" />
app:showAsAction="never|withText" />
<item android:id="@+id/action_search"
android:icon="@drawable/ic_search"
android:title="@string/action_search"
android:showAsAction="never|withText" />
app:showAsAction="never|withText" />
<item android:id="@+id/action_preferences"
android:icon="@android:drawable/ic_menu_preferences"
android:title="@string/action_preferences"
android:showAsAction="never|withText" />
<item android:id="@+id/action_connections"
android:icon="@android:drawable/ic_menu_preferences"
android:title="@string/action_connections"
android:showAsAction="never|withText" />
app:showAsAction="never|withText" />
<item android:id="@+id/action_about"
android:icon="@android:drawable/ic_menu_preferences"
android:title="@string/action_about"
android:showAsAction="never|withText" />
app:showAsAction="never|withText" />
</menu>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Layout alias to replace the single-pane version of the layout with a
two-pane version on Large screens.
For more on layout aliases, see:
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
-->
<item name="fragment_servicelist" type="layout">@layout/fragment_servicelist_grid</item>
<item name="fragment_livelist" type="layout">@layout/fragment_livelist_grid</item>
</resources>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Layout alias to replace the single-pane version of the layout with a
two-pane version on Large screens.
For more on layout aliases, see:
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
-->
<item name="fragment_servicelist" type="layout">@layout/fragment_servicelist_grid</item>
<item name="fragment_livelist" type="layout">@layout/fragment_livelist_grid</item>
</resources>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:Theme.Material.Light">
</style>
</resources>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="about_text">Version</string>
<string name="about_display_1">OpenLP is free church presentation software</string>
<string name="about_display_2">Find out more about visit the OpenLP website_</string>
@ -38,6 +39,7 @@
<string name="connection_timedout">Connection timed out</string>
<string name="connection_timeout_summary">Select a value (milliseconds)</string>
<string name="connection_userid">Userid</string>
<string name="custom_timeout">Set Custom Timeout</string>
<string name="custom_timeouts_summary">Check to modify timeout settings</string>
<string name="display_blank_summary">Select the required blank type</string>
<string name="display_desktop">Blank display to Desktop</string>
@ -58,7 +60,8 @@
<string name="process">Process</string>
<string name="service_list">Service List</string>
<string name="stage_view">Stage View</string>
<string name="text_size_type">Text Size Type</string>
<string name="text_size_type">Set 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="url">Server</string>
<string name="url_hint">Hostname or IP</string>

View File

@ -7,7 +7,9 @@
<string name="pref_header_general">General</string>
<string name="pref_title_social_recommendations">Enable social recommendations</string>
<string name="pref_description_social_recommendations">Recommendations for people to contact based on your message history</string>
<string name="pref_description_social_recommendations">Recommendations for people to contact
based on your message history
</string>
<string name="pref_title_display_name">Display name</string>
<string name="pref_default_display_name">John Smith</string>

View File

@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Light">
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>

View File

@ -1,24 +1,41 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory>
<PreferenceCategory
android:title="@string/connection_profile_active"
android:key="category.server">
<Preference
android:title="@string/url"
android:key="@string/keyHost"
android:hint="@string/url_hint"
android:inputType="textUri"
android:editable="false"
android:name="@string/url"/>
</PreferenceCategory>
<PreferenceCategory
android:key="pref_key_test_size_setting"
android:title="@string/text_size_type">
<ListPreference
android:title="@string/text_size_type"
android:key="@string/keyTextSize"
android:summary="@string/text_size_summary"
android:defaultValue="@integer/textSizeDefaultValue"
android:entries="@array/textSizeValueEntries"
android:entryValues="@array/textSizeValues"
android:defaultValue="@integer/textSizeDefaultValue"/>
android:key="@string/keyTextSize"
android:summary="@string/text_size_summary"
android:title="@string/text_size" />
</PreferenceCategory>
<PreferenceCategory
android:key="pref_key_custom_timeout_setting"
android:title="@string/custom_timeout">
<CheckBoxPreference
android:title="@string/enable_custom_timeouts"
android:key="@string/keyEnableCustomTimeout"
android:summary="@string/custom_timeouts_summary"/>
android:summary="@string/custom_timeouts_summary"
android:title="@string/enable_custom_timeouts" />
<ListPreference
android:title="@string/connection_timeout"
android:key="@string/keyConnectionTimeout"
android:summary="@string/connection_timeout_summary"
android:defaultValue="@integer/connectionTimeoutDefaultValue"
android:dependency="@string/keyEnableCustomTimeout"
android:entries="@array/socketValueEntries"
android:entryValues="@array/socketValues"
android:defaultValue="@integer/connectionTimeoutDefaultValue"/>
</PreferenceCategory>
android:key="@string/keyConnectionTimeout"
android:summary="@string/connection_timeout_summary"
android:title="@string/connection_timeout" />
</PreferenceCategory>
</PreferenceScreen>

View File

@ -3,15 +3,15 @@
<!-- These settings headers are only used on tablets. -->
<header
android:fragment="org.openlp.android2.activities.SettingsActivity$GeneralPreferenceFragment"
android:fragment="org.openlp.android2.fragments.SettingsActivity$GeneralPreferenceFragment"
android:title="@string/pref_header_general" />
<header
android:fragment="org.openlp.android2.activities.SettingsActivity$NotificationPreferenceFragment"
android:fragment="org.openlp.android2.fragments.SettingsActivity$NotificationPreferenceFragment"
android:title="@string/pref_header_notifications" />
<header
android:fragment="org.openlp.android2.activities.SettingsActivity$DataSyncPreferenceFragment"
android:fragment="org.openlp.android2.fragments.SettingsActivity$DataSyncPreferenceFragment"
android:title="@string/pref_header_data_sync" />
</preference-headers>

View File

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.android.tools.build:gradle:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -1,8 +1,8 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip