Clean up Menu
@ -4,7 +4,6 @@ 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;
|
||||
@ -12,7 +11,6 @@ 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;
|
||||
@ -22,6 +20,10 @@ import android.view.ViewGroup;
|
||||
import android.widget.*;
|
||||
import org.openlp.android2.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Fragment used for managing interactions for and presentation of a navigation drawer.
|
||||
* See the <a href="https://developer.android.com/design/patterns/navigation-drawer.html#Interaction">
|
||||
@ -97,17 +99,54 @@ public class NavigationDrawerFragment extends Fragment {
|
||||
selectItem(position);
|
||||
}
|
||||
});
|
||||
mDrawerListView.setAdapter(new ArrayAdapter<String>(
|
||||
getActionBar().getThemedContext(),
|
||||
R.layout.fragment_navigation_drawer_list,
|
||||
android.R.id.text1,
|
||||
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),
|
||||
}));
|
||||
|
||||
List<HashMap<String, String>> aList = new ArrayList<HashMap<String, String>>();
|
||||
HashMap<String, String> hm = new HashMap<String, String>();
|
||||
hm.put("title", getString(R.string.home));
|
||||
hm.put("icon", Integer.toString(R.drawable.ic_home));
|
||||
aList.add(hm);
|
||||
|
||||
HashMap<String, String> hm1 = new HashMap<String, String>();
|
||||
hm1.put("title", getString(R.string.service_list));
|
||||
hm1.put("icon", Integer.toString(R.drawable.ic_inbox));
|
||||
aList.add(hm1);
|
||||
|
||||
HashMap<String, String> hm2 = new HashMap<String, String>();
|
||||
hm2.put("title", getString(R.string.live_list));
|
||||
hm2.put("icon", Integer.toString(R.drawable.ic_list));
|
||||
aList.add(hm2);
|
||||
|
||||
HashMap<String, String> hm3 = new HashMap<String, String>();
|
||||
hm3.put("title", getString(R.string.stage_view));
|
||||
hm3.put("icon", Integer.toString(R.drawable.ic_local_play));
|
||||
aList.add(hm3);
|
||||
|
||||
HashMap<String, String> hm4 = new HashMap<String, String>();
|
||||
hm4.put("title", getString(R.string.live_view));
|
||||
hm4.put("icon", Integer.toString(R.drawable.ic_desktop_windows));
|
||||
aList.add(hm4);
|
||||
|
||||
// Keys used in Hashmap
|
||||
String[] from = {"icon", "title"};
|
||||
|
||||
// Ids of views in service_list_fragment
|
||||
int[] to = {R.id.drawer_icon, R.id.drawer_text};
|
||||
|
||||
ListAdapter adapter = new SimpleAdapter(getActivity().getBaseContext(), aList,
|
||||
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;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class ServiceListFragment extends OpenLPFragment {
|
||||
} else if (item.getString("plugin").equals("media")) {
|
||||
hm.put("icon", Integer.toString(R.drawable.ic_local_movies));
|
||||
} else if (item.getString("plugin").equals("presentations")) {
|
||||
hm.put("icon", Integer.toString(R.drawable.ic_dvr));
|
||||
hm.put("icon", Integer.toString(R.drawable.ic_video_collection));
|
||||
} else if (item.getString("plugin").equals("images")) {
|
||||
hm.put("icon", Integer.toString(R.drawable.ic_image));
|
||||
} else {
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_desktop_windows.png
Normal file
After Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 235 B |
BIN
app/src/main/res/drawable-hdpi/ic_home.png
Normal file
After Width: | Height: | Size: 321 B |
BIN
app/src/main/res/drawable-hdpi/ic_inbox.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
app/src/main/res/drawable-hdpi/ic_list.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
app/src/main/res/drawable-hdpi/ic_local_play.png
Normal file
After Width: | Height: | Size: 580 B |
BIN
app/src/main/res/drawable-hdpi/ic_video_collection.png
Normal file
After Width: | Height: | Size: 300 B |
BIN
app/src/main/res/drawable-mdpi/ic_desktop_windows.png
Normal file
After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 270 B |
BIN
app/src/main/res/drawable-mdpi/ic_home.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
app/src/main/res/drawable-mdpi/ic_inbox.png
Normal file
After Width: | Height: | Size: 296 B |
BIN
app/src/main/res/drawable-mdpi/ic_list.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
app/src/main/res/drawable-mdpi/ic_local.png
Normal file
After Width: | Height: | Size: 314 B |
BIN
app/src/main/res/drawable-mdpi/ic_video_collection.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
app/src/main/res/drawable-xhdpi/ic_desktop_windows.png
Normal file
After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 292 B |
BIN
app/src/main/res/drawable-xhdpi/ic_home.png
Normal file
After Width: | Height: | Size: 433 B |
BIN
app/src/main/res/drawable-xhdpi/ic_inbox.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
app/src/main/res/drawable-xhdpi/ic_list.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
app/src/main/res/drawable-xhdpi/ic_local_play.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
app/src/main/res/drawable-xhdpi/ic_video_collection.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_desktop_windows.png
Normal file
After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 522 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_home.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_inbox.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_list.png
Normal file
After Width: | Height: | Size: 258 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_local_play.png
Normal file
After Width: | Height: | Size: 580 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_video_collection.png
Normal file
After Width: | Height: | Size: 518 B |
@ -5,10 +5,8 @@
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/darker_gray"
|
||||
android:dividerHeight="2dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:textAppearance="?android:attr/textAppearanceSmallInverse"
|
||||
android:background="#DADADC"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
tools:context=".NavigationDrawerFragment"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingStart="20dp"/>
|
||||
/>
|
||||
|
@ -10,13 +10,35 @@
|
||||
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"
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragment_navigation_drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:smoothScrollbar="true"
|
||||
android:clickable="false"
|
||||
android:longClickable="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/drawer_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:background="#FFFFFF"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:textSize="14sp"/>
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingLeft="50dp"
|
||||
android:paddingStart="50dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="10dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
@ -16,6 +16,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingBottom="10dp"
|
||||
/>
|
||||
<TextView
|
||||
@ -24,9 +26,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14dp"
|
||||
android:textSize="14sp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="10dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="android:Theme.Light">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
|