1
0
mirror of https://gitlab.com/openlp/android.git synced 2024-11-01 00:57:06 +00:00

Add contrast for slides and add code comments

This commit is contained in:
Tim Bentley 2015-04-19 21:12:18 +01:00
parent 0219435011
commit f4ab1065ca
6 changed files with 38 additions and 4 deletions

View File

@ -75,6 +75,11 @@ public class OpenLP extends ActionBarActivity
(DrawerLayout) findViewById(R.id.drawer_layout));
}
/**
* Check the preferences have been set at startup and if not redirect them to be set.
*
*/
private void doPreferenceCheck() {
SharedPreferences sharedPrefs = PreferenceManager
.getDefaultSharedPreferences(this);
@ -87,6 +92,10 @@ public class OpenLP extends ActionBarActivity
}
}
/**
*
* @param newConfig
*/
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
@ -140,18 +149,29 @@ public class OpenLP extends ActionBarActivity
}
}
/**
* Set Display to allow for Duel Columns
*/
protected void duelTab(){
toggerContainer(R.id.container, View.GONE);
toggerContainer(R.id.container_right, View.VISIBLE);
toggerContainer(R.id.container_left, View.VISIBLE);
}
/**
* Set Display to allow for Single Columns
*/
protected void singleTab(){
toggerContainer(R.id.container_right, View.GONE);
toggerContainer(R.id.container_left, View.GONE);
toggerContainer(R.id.container, View.VISIBLE);
}
/**
*
* @param container The container id to be accesses
* @param direction What visibility to use on the container
*/
protected void toggerContainer(int container, int direction){
View cTainer = this.findViewById(container);
if (cTainer != null) {

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp"/>
<padding android:left="10dp"
android:right="10dp"
android:top="10dp"
android:bottom="10dp"/>
<solid android:color="#CCCCCC"/>
</shape>

View File

@ -8,7 +8,8 @@
android:orientation="horizontal"
android:smoothScrollbar="true"
android:clickable="false"
android:longClickable="false">
android:longClickable="false"
android:background="@drawable/customborder">
<TextView
android:id="@+id/tag"
android:layout_width="0dp"

View File

@ -8,7 +8,9 @@
android:orientation="horizontal"
android:smoothScrollbar="true"
android:clickable="false"
android:longClickable="false">
android:longClickable="false"
android:background="@drawable/customborder">
<TextView
android:id="@+id/tag"
android:layout_width="0dp"

View File

@ -6,7 +6,8 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity$PlaceholderFragment">
<TextView android:id="@+id/section_label" android:layout_width="wrap_content"
<TextView android:id="@+id/section_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>

View File

@ -9,7 +9,7 @@
android:smoothScrollbar="true"
android:clickable="false"
android:longClickable="false"
>
android:background="@drawable/customborder">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"