Commit c85a3d38 authored by Adrien Maglo's avatar Adrien Maglo

Interface: display the title of the current fragment in the action bar

parent 35a01672
......@@ -14,5 +14,6 @@
<color name="darkorange">#ff8800</color>
<color name="black">#000001</color>
<color name="transparent_gray">#8000</color>
<color name="action_bar_title">#FFFFFF</color>
</resources>
\ No newline at end of file
......@@ -68,6 +68,12 @@
<style name="ActionBar" parent="Widget.Sherlock.Light.ActionBar">
<item name="android:background">@drawable/actionbar_background</item>
<item name="background">@drawable/actionbar_background</item>
<item name="android:titleTextStyle">@style/ActionBar.Text</item>
</style>
<style name="ActionBar.Text" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/action_bar_title</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="Theme.VLC.AlertMenu" parent="android:Theme.Dialog">
......
......@@ -78,6 +78,8 @@ public class DirectoryViewFragment extends SherlockListFragment implements ISort
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
getSherlockActivity().getSupportActionBar().setTitle(R.string.directories);
View v = inflater.inflate(R.layout.directory_view, container, false);
setListAdapter(mDirectoryAdapter);
final ListView listView = (ListView)v.findViewById(android.R.id.list);
......
......@@ -57,6 +57,8 @@ public class HistoryFragment extends SherlockListFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
getSherlockActivity().getSupportActionBar().setTitle(R.string.history);
View v = inflater.inflate(R.layout.history_list, container, false);
setListAdapter(mHistoryAdapter);
final ListView listView = (ListView)v.findViewById(android.R.id.list);
......
......@@ -283,7 +283,6 @@ public class MainActivity extends SherlockFragmentActivity {
private void prepareActionBar() {
mActionBar = getSupportActionBar();
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
mActionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
mActionBar.setDisplayHomeAsUpEnabled(true);
}
......
......@@ -105,6 +105,7 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mVideoAdapter = new VideoListAdapter(getActivity(), this);
mMediaLibrary = MediaLibrary.getInstance(getActivity());
setListAdapter(mVideoAdapter);
......@@ -118,6 +119,8 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
getSherlockActivity().getSupportActionBar().setTitle(R.string.video);
View v = inflater.inflate(R.layout.video_grid, container, false);
// init the information for the scan (1/2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment