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:
parent
57e5422547
commit
8953a8edb7
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<component name="FacetManager">
|
||||||
<facet type="java-gradle" name="Java-Gradle">
|
<facet type="java-gradle" name="Java-Gradle">
|
||||||
<configuration>
|
<configuration>
|
||||||
@ -7,7 +7,9 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</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 />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
12
app/app.iml
12
app/app.iml
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<component name="FacetManager">
|
||||||
<facet type="android-gradle" name="Android-Gradle">
|
<facet type="android-gradle" name="Android-Gradle">
|
||||||
<configuration>
|
<configuration>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
<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="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
|
||||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
||||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
|
<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/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/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/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/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/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/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/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/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/res" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" 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" />
|
<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/rs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<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="android-async-http-1.4.6" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-21.0.0" level="project" />
|
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
@ -2,25 +2,26 @@ apply plugin: 'com.android.application'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 21
|
compileSdkVersion 21
|
||||||
buildToolsVersion "20.0.0"
|
buildToolsVersion "21.1.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.openlp.android2"
|
applicationId "org.openlp.android2"
|
||||||
minSdkVersion 14
|
minSdkVersion 15
|
||||||
targetSdkVersion 21
|
targetSdkVersion 21
|
||||||
versionCode 2
|
versionCode 2
|
||||||
versionName "2.0"
|
versionName "2.0"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
runProguard false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
compile 'com.android.support:support-v4:21.0.0'
|
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'
|
compile 'com.loopj.android:android-async-http:1.4.6'
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.openlp.android2" >
|
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" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
@ -18,6 +20,10 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".fragments.SettingsActivity"
|
||||||
|
android:label="@string/title_activity_settings" >
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SettingsActivity"
|
android:name=".activities.SettingsActivity"
|
||||||
android:label="@string/title_activity_settings"
|
android:label="@string/title_activity_settings"
|
||||||
@ -27,12 +33,12 @@
|
|||||||
android:value="org.openlp.android2.OpenLP" />
|
android:value="org.openlp.android2.OpenLP" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.ConnectionActivity"
|
android:name=".activities.ConnectionActivity"
|
||||||
android:label="@string/title_activity_settings"
|
android:label="@string/title_activity_settings"
|
||||||
android:parentActivityName=".OpenLP" >
|
android:parentActivityName=".OpenLP" >
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value="org.openlp.android2.OpenLP" />
|
android:value="org.openlp.android2.OpenLP" />
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
@ -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;
|
package org.openlp.android2;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ActionBar;
|
|
||||||
import android.app.FragmentManager;
|
|
||||||
import android.content.Intent;
|
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.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
|
||||||
import org.openlp.android2.activities.ConnectionActivity;
|
import org.openlp.android2.activities.ConnectionActivity;
|
||||||
import org.openlp.android2.activities.SettingsActivity;
|
import org.openlp.android2.activities.SettingsActivity;
|
||||||
import org.openlp.android2.common.NavigationOptions;
|
import org.openlp.android2.common.NavigationOptions;
|
||||||
import org.openlp.android2.dialogs.AlertDisplayDialog;
|
import org.openlp.android2.dialogs.AlertDisplayDialog;
|
||||||
import org.openlp.android2.dialogs.BlankDisplayDialog;
|
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 {
|
implements NavigationDrawerFragment.NavigationDrawerCallbacks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,14 +41,16 @@ public class OpenLP extends Activity
|
|||||||
* Used to store the last screen title. For use in {@link #restoreActionBar()}.
|
* Used to store the last screen title. For use in {@link #restoreActionBar()}.
|
||||||
*/
|
*/
|
||||||
private CharSequence mTitle;
|
private CharSequence mTitle;
|
||||||
|
private boolean backArrowActive = false;
|
||||||
|
private Menu dropdownMenu;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_open_lp);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
mNavigationDrawerFragment = (NavigationDrawerFragment)
|
mNavigationDrawerFragment = (NavigationDrawerFragment)
|
||||||
getFragmentManager().findFragmentById(R.id.navigation_drawer);
|
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
|
||||||
mTitle = getTitle();
|
mTitle = getTitle();
|
||||||
|
|
||||||
// Set up the drawer.
|
// Set up the drawer.
|
||||||
@ -100,15 +95,39 @@ public class OpenLP extends Activity
|
|||||||
mTitle = getString(R.string.live_view);
|
mTitle = getString(R.string.live_view);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
menuVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restoreActionBar() {
|
public void restoreActionBar() {
|
||||||
ActionBar actionBar = getActionBar();
|
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
try {
|
||||||
actionBar.setDisplayShowTitleEnabled(true);
|
ActionBar actionBar = getActionBar();
|
||||||
actionBar.setTitle(mTitle);
|
//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
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
@ -130,14 +149,13 @@ public class OpenLP extends Activity
|
|||||||
// as you specify a parent activity in AndroidManifest.xml.
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
Intent intent;
|
Intent intent;
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
|
case R.id.action_back:
|
||||||
|
onNavigationDrawerItemSelected(NavigationOptions.ServiceList);
|
||||||
|
return true;
|
||||||
case R.id.action_preferences:
|
case R.id.action_preferences:
|
||||||
intent = new Intent(this, SettingsActivity.class);
|
intent = new Intent(this, SettingsActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_connections:
|
|
||||||
intent = new Intent(this, ConnectionActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
|
||||||
case R.id.action_refresh:
|
case R.id.action_refresh:
|
||||||
if (this.mTitle.equals(getString(R.string.service_list))) {
|
if (this.mTitle.equals(getString(R.string.service_list))) {
|
||||||
ServiceListFragment fragment = (ServiceListFragment)
|
ServiceListFragment fragment = (ServiceListFragment)
|
||||||
@ -156,11 +174,51 @@ public class OpenLP extends Activity
|
|||||||
new AlertDisplayDialog().show(getFragmentManager(), "AlertDialog");
|
new AlertDisplayDialog().show(getFragmentManager(), "AlertDialog");
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_about:
|
case R.id.action_about:
|
||||||
getFragmentManager().beginTransaction()
|
getFragmentManager().beginTransaction().replace(R.id.container,
|
||||||
.replace(R.id.container, AboutFragment.newInstance())
|
new AboutFragment()).commit();
|
||||||
.commit();
|
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,10 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.openlp.android2.activities;
|
package org.openlp.android2.activities;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.preference.Preference;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.preference.PreferenceFragment;
|
import android.preference.PreferenceFragment;
|
||||||
import org.openlp.android2.R;
|
import org.openlp.android2.R;
|
||||||
@ -32,9 +35,45 @@ public class SettingsActivity extends PreferenceActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
getFragmentManager().beginTransaction()
|
//todo fix this code to work with fragments but not now!
|
||||||
.replace(android.R.id.content, new SettingsFragment())
|
//getFragmentManager().beginTransaction()
|
||||||
.commit();
|
// .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));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
package org.openlp.android2.fragments;
|
package org.openlp.android2.fragments;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
@ -49,6 +52,8 @@ import java.util.List;
|
|||||||
|
|
||||||
public class LiveListFragment extends OpenLPFragment {
|
public class LiveListFragment extends OpenLPFragment {
|
||||||
|
|
||||||
|
private int selected = 0;
|
||||||
|
|
||||||
private String LOG_TAG = LiveListFragment.class.getName();
|
private String LOG_TAG = LiveListFragment.class.getName();
|
||||||
|
|
||||||
public static LiveListFragment newInstance() {
|
public static LiveListFragment newInstance() {
|
||||||
@ -80,7 +85,7 @@ public class LiveListFragment extends OpenLPFragment {
|
|||||||
public void populateDisplay(String json) {
|
public void populateDisplay(String json) {
|
||||||
Log.i(LOG_TAG, "populate_display - entry");
|
Log.i(LOG_TAG, "populate_display - entry");
|
||||||
List<HashMap<String, String>> aList = new ArrayList<HashMap<String, String>>();
|
List<HashMap<String, String>> aList = new ArrayList<HashMap<String, String>>();
|
||||||
int selected = 0;
|
selected = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSONArray items = new JSONObject(json).getJSONObject("results").getJSONArray("slides");
|
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>();
|
HashMap<String, String> hm = new HashMap<String, String>();
|
||||||
hm.put("tag", item.getString("tag"));
|
hm.put("tag", item.getString("tag"));
|
||||||
if (item.getString("selected").equals("true")) {
|
if (item.getString("selected").equals("true")) {
|
||||||
hm.put("liveListSelected", Html.fromHtml(item.getString("html")).toString());
|
|
||||||
selected = i;
|
selected = i;
|
||||||
} else {
|
|
||||||
hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString());
|
|
||||||
}
|
}
|
||||||
|
hm.put("liveListNormal", Html.fromHtml(item.getString("html")).toString());
|
||||||
aList.add(hm);
|
aList.add(hm);
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
@ -121,12 +124,14 @@ public class LiveListFragment extends OpenLPFragment {
|
|||||||
R.layout.fragment_livelist, from, to){
|
R.layout.fragment_livelist, from, to){
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
View view = super.getView(position, convertView, 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);
|
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);
|
text2.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
|
||||||
TextView text3 = (TextView) view.findViewById(R.id.tag);
|
if (selected == position){
|
||||||
text3.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
|
text2.setTextColor(Color.parseColor("#000000"));
|
||||||
|
text2.setTypeface(null, Typeface.BOLD_ITALIC);
|
||||||
|
}
|
||||||
return view;
|
return view;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package org.openlp.android2.fragments;
|
package org.openlp.android2.fragments;
|
||||||
|
|
||||||
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.ActionBarDrawerToggle;
|
import android.support.v4.app.ActionBarDrawerToggle;
|
||||||
import android.support.v4.view.GravityCompat;
|
import android.support.v4.view.GravityCompat;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
@ -17,7 +17,13 @@ import android.view.MenuInflater;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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 org.openlp.android2.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -82,7 +88,7 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityCreated (Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
// Indicate that this fragment would like to influence the set of actions in the action bar.
|
// Indicate that this fragment would like to influence the set of actions in the action bar.
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
@ -90,7 +96,7 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
mDrawerListView = (ListView) inflater.inflate(
|
mDrawerListView = (ListView) inflater.inflate(
|
||||||
R.layout.fragment_navigation_drawer, container, false);
|
R.layout.fragment_navigation_drawer, container, false);
|
||||||
mDrawerListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
mDrawerListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
@ -136,17 +142,6 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
R.layout.fragment_navigation_drawer_list, from, to);
|
R.layout.fragment_navigation_drawer_list, from, to);
|
||||||
|
|
||||||
mDrawerListView.setAdapter(adapter);
|
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);
|
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
|
||||||
return mDrawerListView;
|
return mDrawerListView;
|
||||||
}
|
}
|
||||||
@ -189,7 +184,7 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
getActivity().invalidateOptionsMenu(); // calls onPrepareOptionsMenu()
|
getActivity().supportInvalidateOptionsMenu(); // calls onPrepareOptionsMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -208,7 +203,7 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
sp.edit().putBoolean(PREF_USER_LEARNED_DRAWER, true).apply();
|
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;
|
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();
|
Toast.makeText(getActivity(), "Example action.", Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -308,7 +303,7 @@ public class NavigationDrawerFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ActionBar getActionBar() {
|
private ActionBar getActionBar() {
|
||||||
return getActivity().getActionBar();
|
return ((ActionBarActivity) getActivity()).getSupportActionBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,8 +82,7 @@ public class ServiceListFragment extends OpenLPFragment {
|
|||||||
itemClicked(position);
|
itemClicked(position);
|
||||||
noScreenUpdate = true;
|
noScreenUpdate = true;
|
||||||
isDoubleClick = true;
|
isDoubleClick = true;
|
||||||
//((OpenLP) getActivity()).makeBackArrowVisible(true);
|
((OpenLP) getActivity()).setMenuActive();
|
||||||
//((OpenLP) getActivity()).menuVisible(R.id.action_back);
|
|
||||||
((OpenLP) getActivity()).onNavigationDrawerItemSelected(NavigationOptions.LiveList);
|
((OpenLP) getActivity()).onNavigationDrawerItemSelected(NavigationOptions.LiveList);
|
||||||
((OpenLP) getActivity()).restoreActionBar();
|
((OpenLP) getActivity()).restoreActionBar();
|
||||||
return false;
|
return false;
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
42
app/src/main/res/layout-xlarge/fragment_livelist_list.xml
Normal file
42
app/src/main/res/layout-xlarge/fragment_livelist_list.xml
Normal 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>
|
24
app/src/main/res/layout/activity_main.xml
Normal file
24
app/src/main/res/layout/activity_main.xml
Normal 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>
|
@ -5,4 +5,5 @@
|
|||||||
android:background="#000000"
|
android:background="#000000"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:linksClickable="true"
|
android:linksClickable="true"
|
||||||
android:padding="32dp" />
|
android:padding="32dp"
|
||||||
|
android:textColor="#ffffffff" />
|
@ -11,10 +11,35 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:numColumns="2" />
|
android:numColumns="2" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@android:id/empty"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/fragment_live_list_layout"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center" />
|
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"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -11,30 +11,32 @@
|
|||||||
android:longClickable="false">
|
android:longClickable="false">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tag"
|
android:id="@+id/tag"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingRight="5dp"
|
android:paddingRight="5dp"
|
||||||
android:paddingLeft="5dp"
|
android:paddingLeft="5dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
/>
|
android:layout_weight="1"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/liveListNormal"
|
android:id="@+id/liveListNormal"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#ff2a2a2a"
|
android:textColor="#ff2a2a2a"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:textStyle="normal"/>
|
android:textStyle="normal"
|
||||||
|
android:layout_weight="1"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/liveListSelected"
|
android:id="@+id/liveListSelected"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:textStyle="bold|italic"/>
|
android:textStyle="bold|italic"
|
||||||
|
android:layout_weight="1"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
12
app/src/main/res/layout/fragment_main.xml
Normal file
12
app/src/main/res/layout/fragment_main.xml
Normal 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>
|
@ -1,12 +1,5 @@
|
|||||||
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent" android:choiceMode="singleChoice"
|
||||||
android:layout_height="match_parent"
|
android:divider="@android:color/transparent" android:dividerHeight="0dp"
|
||||||
android:choiceMode="singleChoice"
|
android:background="#cccc" tools:context=".NavigationDrawerFragment" />
|
||||||
android:divider="@android:color/darker_gray"
|
|
||||||
android:dividerHeight="2dp"
|
|
||||||
android:background="#DADADC"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
tools:context=".NavigationDrawerFragment"
|
|
||||||
android:drawSelectorOnTop="false"
|
|
||||||
/>
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<item android:id="@+id/action_settings"
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
android:title="@string/action_settings"
|
<item android:id="@+id/action_settings" android:title="@string/action_settings"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100" app:showAsAction="never" />
|
||||||
android:showAsAction="never" />
|
|
||||||
</menu>
|
</menu>
|
||||||
|
8
app/src/main/res/menu/main.xml
Normal file
8
app/src/main/res/menu/main.xml
Normal 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>
|
@ -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"
|
<item android:id="@+id/action_back"
|
||||||
android:checkable="true"
|
android:checkable="true"
|
||||||
android:visible="false"
|
android:visible="false"
|
||||||
android:icon="@drawable/ic_arrow_back"
|
android:icon="@drawable/ic_arrow_back"
|
||||||
android:title="@string/action_back"
|
android:title="@string/action_back"
|
||||||
android:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
<item android:id="@+id/action_blank"
|
<item android:id="@+id/action_blank"
|
||||||
android:checkable="true"
|
android:checkable="true"
|
||||||
android:visible="true"
|
android:visible="true"
|
||||||
android:icon="@drawable/ic_settings_display"
|
android:icon="@drawable/ic_settings_display"
|
||||||
android:title="@string/action_blank"
|
android:title="@string/action_blank"
|
||||||
android:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
<item android:id="@+id/action_alert"
|
<item android:id="@+id/action_alert"
|
||||||
android:checkable="true"
|
android:checkable="true"
|
||||||
android:visible="true"
|
android:visible="true"
|
||||||
android:icon="@drawable/ic_alarm_add"
|
android:icon="@drawable/ic_alarm_add"
|
||||||
android:title="@string/action_alert"
|
android:title="@string/action_alert"
|
||||||
android:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
<item android:id="@+id/action_refresh"
|
<item android:id="@+id/action_refresh"
|
||||||
android:icon="@drawable/ic_refresh"
|
android:icon="@drawable/ic_refresh"
|
||||||
android:title="@string/action_refresh"
|
android:title="@string/action_refresh"
|
||||||
android:showAsAction="never|withText" />
|
app:showAsAction="never|withText" />
|
||||||
<item android:id="@+id/action_search"
|
<item android:id="@+id/action_search"
|
||||||
android:icon="@drawable/ic_search"
|
android:icon="@drawable/ic_search"
|
||||||
android:title="@string/action_search"
|
android:title="@string/action_search"
|
||||||
android:showAsAction="never|withText" />
|
app:showAsAction="never|withText" />
|
||||||
<item android:id="@+id/action_preferences"
|
<item android:id="@+id/action_preferences"
|
||||||
android:icon="@android:drawable/ic_menu_preferences"
|
android:icon="@android:drawable/ic_menu_preferences"
|
||||||
android:title="@string/action_preferences"
|
android:title="@string/action_preferences"
|
||||||
android:showAsAction="never|withText" />
|
app: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" />
|
|
||||||
<item android:id="@+id/action_about"
|
<item android:id="@+id/action_about"
|
||||||
android:icon="@android:drawable/ic_menu_preferences"
|
android:icon="@android:drawable/ic_menu_preferences"
|
||||||
android:title="@string/action_about"
|
android:title="@string/action_about"
|
||||||
android:showAsAction="never|withText" />
|
app:showAsAction="never|withText" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -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>
|
|
@ -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>
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="AppTheme" parent="android:Theme.Material.Light">
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="about_text">Version</string>
|
<string name="about_text">Version</string>
|
||||||
<string name="about_display_1">OpenLP is free church presentation software</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>
|
<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_timedout">Connection timed out</string>
|
||||||
<string name="connection_timeout_summary">Select a value (milliseconds)</string>
|
<string name="connection_timeout_summary">Select a value (milliseconds)</string>
|
||||||
<string name="connection_userid">Userid</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="custom_timeouts_summary">Check to modify timeout settings</string>
|
||||||
<string name="display_blank_summary">Select the required blank type</string>
|
<string name="display_blank_summary">Select the required blank type</string>
|
||||||
<string name="display_desktop">Blank display to Desktop</string>
|
<string name="display_desktop">Blank display to Desktop</string>
|
||||||
@ -58,7 +60,8 @@
|
|||||||
<string name="process">Process</string>
|
<string name="process">Process</string>
|
||||||
<string name="service_list">Service List</string>
|
<string name="service_list">Service List</string>
|
||||||
<string name="stage_view">Stage View</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="text_size_summary">Change the Service text size</string>
|
||||||
<string name="url">Server</string>
|
<string name="url">Server</string>
|
||||||
<string name="url_hint">Hostname or IP</string>
|
<string name="url_hint">Hostname or IP</string>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="title_activity_settings">Settings</string>
|
<string name="title_activity_settings">Settings</string>
|
||||||
|
|
||||||
<!-- Strings related to Settings -->
|
<!-- Strings related to Settings -->
|
||||||
|
|
||||||
@ -7,7 +7,9 @@
|
|||||||
<string name="pref_header_general">General</string>
|
<string name="pref_header_general">General</string>
|
||||||
|
|
||||||
<string name="pref_title_social_recommendations">Enable social recommendations</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_title_display_name">Display name</string>
|
||||||
<string name="pref_default_display_name">John Smith</string>
|
<string name="pref_default_display_name">John Smith</string>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Light">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -1,24 +1,41 @@
|
|||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
<ListPreference
|
android:title="@string/connection_profile_active"
|
||||||
android:title="@string/text_size_type"
|
android:key="category.server">
|
||||||
android:key="@string/keyTextSize"
|
<Preference
|
||||||
android:summary="@string/text_size_summary"
|
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:defaultValue="@integer/textSizeDefaultValue"
|
||||||
android:entries="@array/textSizeValueEntries"
|
android:entries="@array/textSizeValueEntries"
|
||||||
android:entryValues="@array/textSizeValues"
|
android:entryValues="@array/textSizeValues"
|
||||||
android:defaultValue="@integer/textSizeDefaultValue"/>
|
android:key="@string/keyTextSize"
|
||||||
<CheckBoxPreference
|
android:summary="@string/text_size_summary"
|
||||||
android:title="@string/enable_custom_timeouts"
|
android:title="@string/text_size" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="pref_key_custom_timeout_setting"
|
||||||
|
android:title="@string/custom_timeout">
|
||||||
|
<CheckBoxPreference
|
||||||
android:key="@string/keyEnableCustomTimeout"
|
android:key="@string/keyEnableCustomTimeout"
|
||||||
android:summary="@string/custom_timeouts_summary"/>
|
android:summary="@string/custom_timeouts_summary"
|
||||||
<ListPreference
|
android:title="@string/enable_custom_timeouts" />
|
||||||
android:title="@string/connection_timeout"
|
<ListPreference
|
||||||
android:key="@string/keyConnectionTimeout"
|
android:defaultValue="@integer/connectionTimeoutDefaultValue"
|
||||||
android:summary="@string/connection_timeout_summary"
|
|
||||||
android:dependency="@string/keyEnableCustomTimeout"
|
android:dependency="@string/keyEnableCustomTimeout"
|
||||||
android:entries="@array/socketValueEntries"
|
android:entries="@array/socketValueEntries"
|
||||||
android:entryValues="@array/socketValues"
|
android:entryValues="@array/socketValues"
|
||||||
android:defaultValue="@integer/connectionTimeoutDefaultValue"/>
|
android:key="@string/keyConnectionTimeout"
|
||||||
</PreferenceCategory>
|
android:summary="@string/connection_timeout_summary"
|
||||||
|
android:title="@string/connection_timeout" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
<!-- These settings headers are only used on tablets. -->
|
<!-- These settings headers are only used on tablets. -->
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="org.openlp.android2.activities.SettingsActivity$GeneralPreferenceFragment"
|
android:fragment="org.openlp.android2.fragments.SettingsActivity$GeneralPreferenceFragment"
|
||||||
android:title="@string/pref_header_general" />
|
android:title="@string/pref_header_general" />
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="org.openlp.android2.activities.SettingsActivity$NotificationPreferenceFragment"
|
android:fragment="org.openlp.android2.fragments.SettingsActivity$NotificationPreferenceFragment"
|
||||||
android:title="@string/pref_header_notifications" />
|
android:title="@string/pref_header_notifications" />
|
||||||
|
|
||||||
<header
|
<header
|
||||||
android:fragment="org.openlp.android2.activities.SettingsActivity$DataSyncPreferenceFragment"
|
android:fragment="org.openlp.android2.fragments.SettingsActivity$DataSyncPreferenceFragment"
|
||||||
android:title="@string/pref_header_data_sync" />
|
android:title="@string/pref_header_data_sync" />
|
||||||
|
|
||||||
</preference-headers>
|
</preference-headers>
|
||||||
|
@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Project-wide Gradle settings.
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
# IDE (e.g. Android Studio) users:
|
# IDE (e.g. Android Studio) users:
|
||||||
# Settings specified in this file will override any Gradle settings
|
# Gradle settings configured through the IDE *will override*
|
||||||
# configured through the IDE.
|
# any settings specified in this file.
|
||||||
|
|
||||||
# For more details on how to configure your build environment visit
|
# For more details on how to configure your build environment visit
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user