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
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mariotaku.twidere" package="org.mariotaku.twidere"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="51" android:versionCode="52"
android:versionName="@string/app_version"> android:versionName="@string/app_version">


<uses-sdk <uses-sdk
Expand Down Expand Up @@ -90,8 +90,8 @@
android:name=".activity.ComposeActivity" android:name=".activity.ComposeActivity"
android:label="@string/compose" android:label="@string/compose"
android:launchMode="singleTop" 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"> <intent-filter android:label="@string/compose">
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<action android:name="org.mariotaku.twidere.COMPOSE"/> <action android:name="org.mariotaku.twidere.COMPOSE"/>
Expand Down Expand Up @@ -460,4 +460,4 @@
</receiver> </receiver>
</application> </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
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
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
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
Expand Up @@ -2,31 +2,24 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"> <merge xmlns:android="http://schemas.android.com/apk/res/android">


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


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


<FrameLayout <include layout="@layout/base_pane_left_content"/>
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 <View
android:layout_width="match_parent" android:layout_width="@dimen/default_slidingpane_shadow_width"
android:layout_height="match_parent"/> android:layout_height="match_parent"
</org.mariotaku.twidere.view.ExtendedFrameLayout> android:layout_gravity="right"
android:background="@drawable/shadow_holo"/>
</FrameLayout>


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


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


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


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


<org.mariotaku.twidere.view.ExtendedViewPager <include layout="@layout/home_pane_left_content"/>
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 <View
android:layout_width="match_parent" android:layout_width="@dimen/default_slidingpane_shadow_width"
android:layout_height="match_parent"/> android:layout_height="match_parent"
</org.mariotaku.twidere.view.ExtendedFrameLayout> android:layout_gravity="right"
android:background="@drawable/shadow_holo"/>

</FrameLayout>


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


</merge> </merge>
31 changes: 31 additions & 0 deletions res/layout-land/search_dual_pane.xml
@@ -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
Expand Up @@ -2,38 +2,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android" <merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere"> xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">


<org.mariotaku.twidere.view.SlidingPanel <org.mariotaku.twidere.view.SlidingPaneView
android:id="@+id/main_container" android:id="@+id/sliding_pane"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
twidere:anchor="@+id/panel_anchor" twidere:fadeType="left"
twidere:content="@+id/fragment_container_right" twidere:layoutLeft="@layout/base_pane_left_content"
twidere:closedLimit="@dimen/pane_closed_limit"> 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 </merge>
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>
16 changes: 16 additions & 0 deletions res/layout/base_pane_left_content.xml
@@ -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
@@ -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
@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.mariotaku.twidere.view.ExtendedViewPager xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">


<android.support.v4.view.PagerTabStrip <view
android:id="@+id/pager_tab" android:id="@android:id/tabs"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="48dp"
android:layout_gravity="top"/> 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
Expand Up @@ -2,39 +2,17 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android" <merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere"> xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">


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

twidere:shadowDrawable="@drawable/shadow_holo"
<org.mariotaku.twidere.view.ExtendedFrameLayout twidere:shadowWidth="@dimen/default_slidingpane_shadow_width"
android:id="@+id/panel_anchor" twidere:spacingLeft="@dimen/pane_spacing_right"
android:layout_width="@dimen/pane_left_width" twidere:spacingRight="@dimen/pane_spacing_right"/>
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>


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


</merge> </merge>
16 changes: 16 additions & 0 deletions res/layout/home_pane_left_content.xml
@@ -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
Expand Up @@ -2,46 +2,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android" <merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere"> xmlns:twidere="http://schemas.android.com/apk/res/org.mariotaku.twidere">


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

twidere:shadowDrawable="@drawable/shadow_holo"
<org.mariotaku.twidere.view.ExtendedFrameLayout twidere:shadowWidth="@dimen/default_slidingpane_shadow_width"
android:id="@+id/panel_anchor" twidere:spacingLeft="@dimen/pane_spacing_right"
android:layout_width="@dimen/pane_left_width" twidere:spacingRight="@dimen/pane_spacing_right"/>
android:layout_height="match_parent">

</merge>
<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>

0 comments on commit 1ed722d

Please sign in to comment.