1
0
mirror of https://gitlab.com/openlp/android.git synced 2024-10-31 16:54:41 +00:00
This commit is contained in:
Tim Bentley 2014-11-16 19:17:34 +00:00
parent aa19ff205e
commit a8689e84ed
5 changed files with 34 additions and 12 deletions

View File

@ -42,7 +42,7 @@ public class SettingsActivity extends PreferenceActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getPreferenceManager().setSharedPreferencesName(getString(R.string.keySharedPreferences));
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.pref_general);
}

View File

@ -4,6 +4,7 @@ package org.openlp.android2.fragments;
import android.app.Activity;
import android.app.ActionBar;
import android.app.Fragment;
import android.content.res.Resources;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
@ -11,16 +12,14 @@ import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import android.widget.*;
import org.openlp.android2.R;
/**
@ -100,7 +99,7 @@ public class NavigationDrawerFragment extends Fragment {
});
mDrawerListView.setAdapter(new ArrayAdapter<String>(
getActionBar().getThemedContext(),
android.R.layout.simple_list_item_activated_1,
R.layout.fragment_navigation_drawer_list,
android.R.id.text1,
new String[]{
getString(R.string.service_list),

View File

@ -193,8 +193,6 @@ public class ServiceListFragment extends OpenLPFragment {
return view;
}
;
};
setListAdapter(adapter);
Log.i(LOG_TAG, "populate_display - exit");

View File

@ -3,7 +3,12 @@
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" />
android:divider="@android:color/darker_gray"
android:dividerHeight="2dp"
android:background="#c8ffffff"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceSmall"
tools:context=".NavigationDrawerFragment"
android:drawSelectorOnTop="false"
android:paddingLeft="20dp"
android:paddingStart="20dp"/>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:gravity="center_vertical"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall" />