Skip to content

Commit

Permalink
sliding pane feature finished.
Browse files Browse the repository at this point in the history
removed some unused resources.
  • Loading branch information
mariotaku committed Nov 18, 2012
1 parent d3de0c3 commit 1ed722d
Show file tree
Hide file tree
Showing 42 changed files with 1,098 additions and 428 deletions.
8 changes: 4 additions & 4 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mariotaku.twidere"
android:installLocation="auto"
android:versionCode="51"
android:versionCode="52"
android:versionName="@string/app_version">

<uses-sdk
Expand Down Expand Up @@ -90,8 +90,8 @@
android:name=".activity.ComposeActivity"
android:label="@string/compose"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.Twidere.Light.Dialog">
android:theme="@style/Theme.Twidere.Light.Dialog"
android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/compose">
<action android:name="android.intent.action.MAIN"/>
<action android:name="org.mariotaku.twidere.COMPOSE"/>
Expand Down Expand Up @@ -460,4 +460,4 @@
</receiver>
</application>

</manifest>
</manifest>
Binary file removed res/drawable-hdpi/right_pane_shadow.9.png
Binary file not shown.
Binary file added res/drawable-hdpi/shadow_holo.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-mdpi/right_pane_shadow.9.png
Binary file not shown.
Binary file added res/drawable-mdpi/shadow_holo.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/drawable-xhdpi/right_pane_shadow.9.png
Binary file not shown.
Binary file added res/drawable-xhdpi/shadow_holo.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 9 additions & 16 deletions res/layout-land/base_dual_pane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,24 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/panel_anchor"
<FrameLayout
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent"
android:layout_weight="0">

<FrameLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<include layout="@layout/base_pane_left_content"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>
android:layout_width="@dimen/default_slidingpane_shadow_width"
android:layout_height="match_parent"
android:layout_gravity="right"
android:background="@drawable/shadow_holo"/>
</FrameLayout>

<FrameLayout
android:id="@+id/fragment_container_right"
Expand All @@ -35,4 +28,4 @@
android:layout_weight="1"/>
</LinearLayout>

</merge>
</merge>
26 changes: 10 additions & 16 deletions res/layout-land/home_dual_pane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,25 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/panel_anchor"
<FrameLayout
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent"
android:layout_weight="0">

<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<include layout="@layout/home_pane_left_content"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>
android:layout_width="@dimen/default_slidingpane_shadow_width"
android:layout_height="match_parent"
android:layout_gravity="right"
android:background="@drawable/shadow_holo"/>

</FrameLayout>

<FrameLayout
android:id="@+id/fragment_container_right"
Expand All @@ -44,4 +38,4 @@
android:onClick="onClick"
android:src="@drawable/ic_menu_tweet"/>

</merge>
</merge>
31 changes: 31 additions & 0 deletions res/layout-land/search_dual_pane.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">

<FrameLayout
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent"
android:layout_weight="0">

<include layout="@layout/search_pane_left_content"/>

<View
android:layout_width="@dimen/default_slidingpane_shadow_width"
android:layout_height="match_parent"
android:layout_gravity="right"
android:background="@drawable/shadow_holo"/>
</FrameLayout>

<FrameLayout
android:id="@+id/fragment_container_right"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>

</merge>
42 changes: 10 additions & 32 deletions res/layout/base_dual_pane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">

<org.mariotaku.twidere.view.SlidingPanel
android:id="@+id/main_container"
<org.mariotaku.twidere.view.SlidingPaneView
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
twidere:anchor="@+id/panel_anchor"
twidere:content="@+id/fragment_container_right"
twidere:closedLimit="@dimen/pane_closed_limit">
twidere:fadeType="left"
twidere:layoutLeft="@layout/base_pane_left_content"
twidere:layoutRight="@layout/base_pane_right_content"
twidere:shadowDrawable="@drawable/shadow_holo"
twidere:shadowWidth="@dimen/default_slidingpane_shadow_width"
twidere:spacingLeft="@dimen/pane_spacing_right"
twidere:spacingRight="@dimen/pane_spacing_right"/>

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/panel_anchor"
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/fragment_container_right"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.SlidingPanel>

</merge>
</merge>
16 changes: 16 additions & 0 deletions res/layout/base_pane_left_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<FrameLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</FrameLayout>
5 changes: 5 additions & 0 deletions res/layout/base_pane_right_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container_right"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
26 changes: 17 additions & 9 deletions res/layout/filters.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<org.mariotaku.twidere.view.ExtendedViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"/>
<view
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_weight="0"
class="org.mariotaku.twidere.view.TabPageIndicator"
android:background="?actionBarBackground"/>

</org.mariotaku.twidere.view.ExtendedViewPager>
<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

</LinearLayout>
42 changes: 10 additions & 32 deletions res/layout/home_dual_pane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,17 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">

<org.mariotaku.twidere.view.SlidingPanel
android:id="@+id/main_container"
<org.mariotaku.twidere.view.SlidingPaneView
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
twidere:anchor="@+id/panel_anchor"
twidere:content="@+id/fragment_container_right"
twidere:closedLimit="@dimen/pane_closed_limit">

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/panel_anchor"
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent">

<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/fragment_container_right"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.SlidingPanel>
twidere:fadeType="left"
twidere:layoutLeft="@layout/home_pane_left_content"
twidere:layoutRight="@layout/base_pane_right_content"
twidere:shadowDrawable="@drawable/shadow_holo"
twidere:shadowWidth="@dimen/default_slidingpane_shadow_width"
twidere:spacingLeft="@dimen/pane_spacing_right"
twidere:spacingRight="@dimen/pane_spacing_right"/>

<ImageButton
android:id="@+id/button_compose"
Expand All @@ -45,4 +23,4 @@
android:onClick="onClick"
android:src="@drawable/ic_menu_tweet"/>

</merge>
</merge>
16 changes: 16 additions & 0 deletions res/layout/home_pane_left_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</FrameLayout>
52 changes: 11 additions & 41 deletions res/layout/search_dual_pane.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">

<org.mariotaku.twidere.view.SlidingPanel
android:id="@+id/main_container"
<org.mariotaku.twidere.view.SlidingPaneView
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
twidere:anchor="@+id/panel_anchor"
twidere:content="@+id/fragment_container_right"
twidere:closedLimit="@dimen/pane_closed_limit">

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/panel_anchor"
android:layout_width="@dimen/pane_left_width"
android:layout_height="match_parent">

<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_tab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"/>

</org.mariotaku.twidere.view.ExtendedViewPager>

<FrameLayout
android:id="@+id/fragment_container_left"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

<View
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>

<org.mariotaku.twidere.view.ExtendedFrameLayout
android:id="@+id/fragment_container_right"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</org.mariotaku.twidere.view.SlidingPanel>

</merge>
twidere:fadeType="left"
twidere:layoutLeft="@layout/search_pane_left_content"
twidere:layoutRight="@layout/base_pane_right_content"
twidere:shadowDrawable="@drawable/shadow_holo"
twidere:shadowWidth="@dimen/default_slidingpane_shadow_width"
twidere:spacingLeft="@dimen/pane_spacing_right"
twidere:spacingRight="@dimen/pane_spacing_right"/>

</merge>
Loading

0 comments on commit 1ed722d

Please sign in to comment.