Commit a6f5e5ad authored by Geoffrey Métais's avatar Geoffrey Métais

Switch to Toolbar as an ActionBar

parent 441523f9
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root_container"
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nextFocusLeft="@+id/ml_menu_search"
android:nextFocusRight="@+id/ml_menu_search"
android:nextFocusUp="@+id/ml_menu_search"
android:nextFocusDown="@+id/ml_menu_search"
android:nextFocusForward="@+id/ml_menu_search">
android:orientation="vertical">
<org.videolan.vlc.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vlc="http://schemas.android.com/apk/res-auto"
android:id="@+id/pane"
<android.support.v4.widget.DrawerLayout
android:id="@+id/root_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
vlc:overhangSize="60dp" >
android:nextFocusLeft="@+id/ml_menu_search"
android:nextFocusRight="@+id/ml_menu_search"
android:nextFocusUp="@+id/ml_menu_search"
android:nextFocusDown="@+id/ml_menu_search"
android:nextFocusForward="@+id/ml_menu_search"
android:fitsSystemWindows="true">
<org.videolan.vlc.widget.ContentLinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<org.videolan.vlc.widget.SlidingPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:vlc="http://schemas.android.com/apk/res-auto"
android:id="@+id/pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
vlc:overhangSize="60dp" >
<View
android:layout_width="fill_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/actionbar_background" />
<FrameLayout
android:id="@+id/fragment_placeholder"
<org.videolan.vlc.widget.ContentLinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/info_layout"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:visibility="gone" >
<View
android:layout_width="fill_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/actionbar_background" />
<FrameLayout
android:id="@+id/fragment_placeholder"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ProgressBar
android:id="@+id/info_progress"
style="?android:attr/progressBarStyleHorizontal"
<RelativeLayout
android:id="@+id/info_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:progressDrawable="@drawable/progress" />
android:layout_height="20dp"
android:visibility="gone" >
<TextView
android:id="@+id/info_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:shadowColor="#CC000000"
android:shadowDx="1"
android:shadowDy="1"
android:shadowRadius="1.5"
android:singleLine="true"
android:textColor="#FFFFFFFF" />
</RelativeLayout>
<ProgressBar
android:id="@+id/info_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:progressDrawable="@drawable/progress" />
<View
android:id="@+id/audio_player_filling"
<TextView
android:id="@+id/info_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:shadowColor="#CC000000"
android:shadowDx="1"
android:shadowDy="1"
android:shadowRadius="1.5"
android:singleLine="true"
android:textColor="#FFFFFFFF" />
</RelativeLayout>
<View
android:id="@+id/audio_player_filling"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:visibility="gone" />
</org.videolan.vlc.widget.ContentLinearLayout>
<FrameLayout
android:id="@+id/audio_player"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:visibility="gone" />
</org.videolan.vlc.widget.ContentLinearLayout>
android:layout_height="fill_parent" />
</org.videolan.vlc.widget.SlidingPaneLayout>
<FrameLayout
android:id="@+id/audio_player"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</org.videolan.vlc.widget.SlidingPaneLayout>
<!-- The navigation drawer -->
<include layout="@layout/sidebar"/>
</android.support.v4.widget.DrawerLayout>
<!-- The navigation drawer -->
<include layout="@layout/sidebar"/>
</android.support.v4.widget.DrawerLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/main_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:background="@drawable/actionbar_background" />
</FrameLayout>
......@@ -16,7 +16,7 @@
<item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
</style>
<style name="Theme.VLC.Apearance" parent="Theme.AppCompat.Light">
<style name="Theme.VLC.Apearance" parent="Theme.AppCompat.Light.NoActionBar">
<item name="marginTopContent">50dp</item>
<item name="android:listViewStyle">@style/Theme.VLC.List</item>
......@@ -86,7 +86,7 @@
<item name="drawerArrowStyle">@style/ActionBar.ArrowToggle</item>
</style>
<style name="Theme.VLC.Apearance.Black" parent="Theme.AppCompat">
<style name="Theme.VLC.Apearance.Black" parent="Theme.AppCompat.NoActionBar">
<item name="marginTopContent">50dp</item>
<item name="android:listViewStyle">@style/Theme.VLC.List</item>
......
......@@ -42,6 +42,7 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
......@@ -187,6 +188,9 @@ public class MainActivity extends ActionBarActivity implements OnItemClickListen
setContentView(R.layout.main);
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
setSupportActionBar(toolbar);
mSlidingPane = (SlidingPaneLayout) findViewById(R.id.pane);
mSlidingPane.setPanelSlideListener(mPanelSlideListener);
......
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