mirror of
https://gitlab.com/openlp/android.git
synced 2024-12-22 11:52:49 +00:00
more fixes
This commit is contained in:
parent
8efc0e69df
commit
1168fb8c0a
48
app/app.iml
48
app/app.iml
@ -66,14 +66,6 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||||
@ -82,14 +74,30 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/22.2.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/24.2.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
|
||||||
@ -110,12 +118,20 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-compat-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-media-compat-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-fragment-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-core-ui-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="recyclerview-v7-24.2.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="classes" level="project" />
|
<orderEntry type="library" exported="" name="classes" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-24.2.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="design-22.2.1" level="project" />
|
<orderEntry type="library" exported="" name="support-vector-drawable-24.2.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
|
<orderEntry type="library" exported="" name="support-core-utils-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-annotations-24.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="design-24.2.1" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
@ -1,15 +1,16 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
project.archivesBaseName = 'OpenLP'
|
project.archivesBaseName = 'OpenLP'
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 24
|
||||||
buildToolsVersion "21.1.2"
|
buildToolsVersion "24.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.openlp.android2"
|
applicationId "org.openlp.android2"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 22
|
targetSdkVersion 24
|
||||||
versionCode 5
|
versionCode 5
|
||||||
versionName "2.0"
|
versionName "2.0"
|
||||||
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
android {
|
android {
|
||||||
lintOptions {
|
lintOptions {
|
||||||
@ -28,9 +29,9 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
compile 'com.android.support:appcompat-v7:22.2.1'
|
compile 'com.android.support:appcompat-v7:24.2.1'
|
||||||
compile 'com.android.support:support-v4:22.2.1'
|
compile 'com.android.support:support-v4:24.2.1'
|
||||||
compile 'com.android.support:design:22.2.1'
|
compile 'com.android.support:design:24.2.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -104,10 +104,10 @@ public class LiveListFragment extends OpenLPFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Keys used in Hashmap
|
// Keys used in Hashmap
|
||||||
String[] from = {"tag", "liveListNormal", "liveListSelected"};
|
String[] from = {"line", "tag", "liveListNormal", "liveListSelected"};
|
||||||
|
|
||||||
// Ids of views in live_list_fragment
|
// Ids of views in live_list_fragment
|
||||||
int[] to = {R.id.tag, R.id.liveListNormal, R.id.liveListSelected};
|
int[] to = {R.id.line, R.id.tag, R.id.liveListNormal, R.id.liveListSelected};
|
||||||
|
|
||||||
SharedPreferences prefs = context.getSharedPreferences(
|
SharedPreferences prefs = context.getSharedPreferences(
|
||||||
context.getString(R.string.key_shared_preferences),
|
context.getString(R.string.key_shared_preferences),
|
||||||
@ -123,15 +123,16 @@ 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 line = (TextView) view.findViewById(R.id.line);
|
||||||
TextView text1 = (TextView) view.findViewById(R.id.tag);
|
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.liveListNormal);
|
TextView text2 = (TextView) view.findViewById(R.id.liveListNormal);
|
||||||
text2.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
|
text2.setTextSize(TypedValue.COMPLEX_UNIT_SP, size);
|
||||||
if (selected == position) {
|
if (selected == position) {
|
||||||
text2.setTextColor(Color.parseColor("#000000"));
|
|
||||||
text2.setTypeface(null, Typeface.BOLD_ITALIC);
|
text2.setTypeface(null, Typeface.BOLD_ITALIC);
|
||||||
} else{
|
} else{
|
||||||
text2.setTypeface(null, Typeface.NORMAL);
|
text2.setTypeface(null, Typeface.NORMAL);
|
||||||
|
line.setBackgroundColor(0xffffff);
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
|
|
||||||
|
@ -263,6 +263,7 @@ public class SearchFragment extends Fragment {
|
|||||||
// Toast.LENGTH_SHORT).show();
|
// Toast.LENGTH_SHORT).show();
|
||||||
String it = "";
|
String it = "";
|
||||||
try {
|
try {
|
||||||
|
Log.i(LOG_TAG, "list.setOnItemClickListener" + item);
|
||||||
it = (String) item.get(1);
|
it = (String) item.get(1);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -283,18 +284,15 @@ public class SearchFragment extends Fragment {
|
|||||||
private class StableArrayAdapter extends ArrayAdapter<JSONArray> {
|
private class StableArrayAdapter extends ArrayAdapter<JSONArray> {
|
||||||
|
|
||||||
HashMap<String, Integer> mIdMap = new HashMap<String, Integer>();
|
HashMap<String, Integer> mIdMap = new HashMap<String, Integer>();
|
||||||
ArrayList<JSONArray> jsonCache = new ArrayList<JSONArray>();
|
|
||||||
|
|
||||||
public StableArrayAdapter(Context context,
|
public StableArrayAdapter(Context context,
|
||||||
int textViewResourceId,
|
int textViewResourceId,
|
||||||
List<JSONArray> objects) {
|
List<JSONArray> objects) {
|
||||||
super(context, textViewResourceId, objects);
|
super(context, textViewResourceId, objects);
|
||||||
jsonCache = new ArrayList<JSONArray>();
|
|
||||||
|
|
||||||
for (int i = 0; i < objects.size(); ++i) {
|
for (int i = 0; i < objects.size(); ++i) {
|
||||||
JSONArray item = objects.get(i);
|
JSONArray item = objects.get(i);
|
||||||
try {
|
try {
|
||||||
jsonCache.add(item);
|
|
||||||
mIdMap.put(item.get(1).toString(), i);
|
mIdMap.put(item.get(1).toString(), i);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -309,7 +307,6 @@ public class SearchFragment extends Fragment {
|
|||||||
String item = null;
|
String item = null;
|
||||||
try {
|
try {
|
||||||
item = getItem(position).get(1).toString();
|
item = getItem(position).get(1).toString();
|
||||||
Log.i(LOG_TAG, "getView" + item);
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -331,7 +328,6 @@ public class SearchFragment extends Fragment {
|
|||||||
String item = null;
|
String item = null;
|
||||||
try {
|
try {
|
||||||
item = getItem(position).get(1).toString();
|
item = getItem(position).get(1).toString();
|
||||||
Log.i(LOG_TAG, "getItemId" + item);
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:fromDegrees="90"
|
|
||||||
android:toDegrees="90">
|
|
||||||
<shape
|
|
||||||
android:shape="line"
|
|
||||||
android:left="1dp">
|
|
||||||
<stroke
|
|
||||||
android:width="2dp"
|
|
||||||
android:color="#0008ff"
|
|
||||||
android:dashWidth="1dp"
|
|
||||||
android:dashGap="2dp" />
|
|
||||||
</shape>
|
|
||||||
</rotate>
|
|
@ -10,6 +10,15 @@
|
|||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:longClickable="false"
|
android:longClickable="false"
|
||||||
android:background="@drawable/custom_border">
|
android:background="@drawable/custom_border">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="4dp"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingRight="1dp"
|
||||||
|
android:paddingLeft="1dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:background="#4d7bd8"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tag"
|
android:id="@+id/tag"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -10,7 +10,16 @@
|
|||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:longClickable="false"
|
android:longClickable="false"
|
||||||
android:background="@drawable/custom_border">
|
android:background="@drawable/custom_border">
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="75sp"
|
||||||
|
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
|
<TextView
|
||||||
android:id="@+id/tag"
|
android:id="@+id/tag"
|
||||||
android:layout_width="75sp"
|
android:layout_width="75sp"
|
||||||
|
Loading…
Reference in New Issue
Block a user