merge in search

This commit is contained in:
Tim Bentley 2016-05-15 19:24:46 +01:00
parent 94c6b998bb
commit da8a6cbb2b
4 changed files with 31 additions and 2 deletions

View File

@ -43,6 +43,7 @@ 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.SearchFragment;
import org.openlp.android2.fragments.ServiceListFragment;
import org.openlp.android2.fragments.StageWebFragment;
@ -165,6 +166,24 @@ public class OpenLP extends ActionBarActivity
toggerContainer(R.id.next_button, View.GONE);
toggerContainer(R.id.prev_button, View.GONE);
break;
case NavigationOptions.Search:
singleTab();
fragmentManager.beginTransaction()
.replace(R.id.container, SearchFragment.newInstance())
.commit();
mTitle = getString(R.string.action_search);
toggerContainer(R.id.next_button, View.GONE);
toggerContainer(R.id.prev_button, View.GONE);
break;
default:
singleTab();
fragmentManager.beginTransaction()
.replace(R.id.container, HomeFragment.newInstance())
.commit();
mTitle = getString(R.string.home);
toggerContainer(R.id.next_button, View.GONE);
toggerContainer(R.id.prev_button, View.GONE);
break;
}
}

View File

@ -24,4 +24,5 @@ public class NavigationOptions{
public final static int LiveList = 2;
public final static int StageView = 3;
public final static int LiveView = 4;
public final static int Search = 5;
}

View File

@ -152,6 +152,11 @@ public class NavigationDrawerFragment extends Fragment {
hm4.put("icon", Integer.toString(R.drawable.ic_ondemand_video_black));
aList.add(hm4);
HashMap<String, String> hm5 = new HashMap<String, String>();
hm5.put("title", getString(R.string.action_search));
hm5.put("icon", Integer.toString(R.drawable.ic_search_black));
aList.add(hm5);
// Keys used in Hashmap
String[] from = {"icon", "title"};

View File

@ -29,14 +29,14 @@
<string name="display_blank_summary">Select the required display</string>
<string name="display_desktop">Display Desktop background</string>
<string name="display_list_autoscroll">Allow the selected item to scroll to the centre of the list</string>
<string name="display_reset">Show Live display</string>
<string name="display_reset">Live display</string>
<string name="display_settings">Display Setting</string>
<string name="display_screen">Display Black only</string>
<string name="display_theme">Display Theme only</string>
<string name="enable_custom_timeouts">Enable Custom Timeouts</string>
<string name="enter_alert_text">Enter Alert Text</string>
<string name="enable_autoscroll">Allow displays to auto center</string>
<string name="home">Home</string>
<string name="home">Home</string>
<string name="httpreturn_unauthorised">Unauthorised Access, please enter valid username and password</string>
<string name="live_list">Live List</string>
<string name="live_view">Live View</string>
@ -48,6 +48,10 @@
<string name="previous">Previous</string>
<string name="process">Process</string>
<string name="service_list">Service List</string>
<string name="searchResults">Search Results</string>
<string name="searchSendLive">Send Live</string>
<string name="searchAddToService">Add to Service</string>
<string name="showingResults">Showing Results for \'%s\'</string>
<string name="stage_view">Stage View</string>
<string name="text_size">Select display text size</string>
<string name="text_size_summary">Change the Service text size</string>