Permalink
Browse files

mainly UI changes. better support for tablets.

  • Loading branch information...
1 parent 73c8d5f commit 540223ac917bb71a2417146cf17d2dab667c3d93 @mariotaku committed Nov 25, 2012
Showing with 704 additions and 264 deletions.
  1. +2 −1 AndroidManifest.xml
  2. BIN res/drawable-hdpi/dialog_full_holo_light_darkactionbar.9.png
  3. +36 −0 res/drawable-v14/progress_large_holo.xml
  4. +36 −0 res/drawable-v14/progress_medium_holo.xml
  5. +36 −0 res/drawable-v14/progress_small_holo.xml
  6. +1 −1 res/drawable/actionbar_item_background_holo_dark.xml
  7. +1 −1 res/drawable/actionbar_item_background_holo_light.xml
  8. +1 −1 res/drawable/item_background_holo_dark.xml
  9. +1 −1 res/drawable/item_background_holo_light.xml
  10. +1 −2 res/drawable/list_selector_background_transition_holo.xml
  11. +1 −1 res/drawable/list_selector_holo_dark.xml
  12. +1 −1 res/drawable/list_selector_holo_light.xml
  13. 0 res/drawable/{image_viewer_background.xml → viewer_background.xml}
  14. +1 −1 res/drawable/vpi__tab_indicator.xml
  15. +25 −0 res/layout-large-v11/base_dialogwhenlarge.xml
  16. +23 −0 res/layout-large-v11/compose_dialogwhenlarge.xml
  17. +1 −1 res/layout/actionbar.xml
  18. +6 −0 res/layout/base_dialogwhenlarge.xml
  19. +6 −0 res/layout/compose_dialogwhenlarge.xml
  20. +34 −0 res/values-large-v11/themes.xml
  21. +24 −0 res/values-large/actionbar__dimens.xml
  22. +11 −1 res/values-v11/actionbar__themes.xml
  23. +1 −1 res/values-v11/themes.xml
  24. +1 −0 res/values/actionbar__dimens.xml
  25. +11 −3 res/values/actionbar__themes.xml
  26. +17 −5 res/values/themes.xml
  27. +7 −6 src/org/mariotaku/actionbarcompat/ActionBarCompat.java
  28. +35 −34 src/org/mariotaku/actionbarcompat/ActionBarCompatBase.java
  29. +2 −3 src/org/mariotaku/actionbarcompat/ActionBarFragmentActivity.java
  30. +1 −1 src/org/mariotaku/menubar/MenuBar.java
  31. +1 −1 src/org/mariotaku/twidere/Constants.java
  32. +14 −2 src/org/mariotaku/twidere/activity/BaseActivity.java
  33. +7 −73 src/org/mariotaku/twidere/activity/BaseDialogActivity.java
  34. +43 −6 src/org/mariotaku/twidere/activity/ComposeActivity.java
  35. +8 −8 src/org/mariotaku/twidere/activity/DualPaneActivity.java
  36. +1 −1 src/org/mariotaku/twidere/activity/FiltersActivity.java
  37. +12 −11 src/org/mariotaku/twidere/activity/HomeActivity.java
  38. +68 −7 src/org/mariotaku/twidere/activity/LinkHandlerActivity.java
  39. +11 −10 src/org/mariotaku/twidere/activity/SearchActivity.java
  40. +1 −1 src/org/mariotaku/twidere/adapter/DirectMessagesConversationAdapter.java
  41. +10 −9 src/org/mariotaku/twidere/fragment/BaseListFragment.java
  42. +4 −3 src/org/mariotaku/twidere/fragment/StatusFragment.java
  43. +6 −3 src/org/mariotaku/twidere/provider/TweetStore.java
  44. +103 −0 src/org/mariotaku/twidere/util/AsyncTask.java
  45. +1 −3 src/org/mariotaku/twidere/util/AsyncTaskManager.java
  46. +20 −10 src/org/mariotaku/twidere/util/CacheUsersStatusesTask.java
  47. +2 −0 src/org/mariotaku/twidere/util/ExtendedViewGroupInterface.java
  48. +4 −6 src/org/mariotaku/twidere/util/HtmlBuilder.java
  49. +0 −1 src/org/mariotaku/twidere/util/ManagedAsyncTask.java
  50. +4 −9 src/org/mariotaku/twidere/util/Utils.java
  51. +1 −1 src/org/mariotaku/twidere/util/imageloader/ImageLoaderUtils.java
  52. +22 −3 src/org/mariotaku/twidere/util/imageloader/ImageWorker.java
  53. +8 −0 src/org/mariotaku/twidere/view/ExtendedFrameLayout.java
  54. +1 −1 src/org/mariotaku/twidere/view/ExtendedLinearLayout.java
  55. +4 −4 src/org/mariotaku/twidere/view/HoloProgressBar.java
  56. +25 −26 src/org/mariotaku/twidere/view/SlidingPaneView.java
View
@@ -91,7 +91,7 @@
android:name=".activity.ComposeActivity"
android:label="@string/compose"
android:launchMode="singleTop"
- android:theme="@style/Theme.Twidere.Light.Dialog"
+ android:theme="@style/Theme.Twidere.Light.DialogWhenLarge"
android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/compose">
<action android:name="android.intent.action.MAIN"/>
@@ -199,6 +199,7 @@
android:theme="@style/Theme.Twidere.Light.Dialog"/>
<activity
android:name=".activity.LinkHandlerActivity"
+ android:theme="@style/Theme.Twidere.Light.DialogWhenLarge"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_76_outer_holo"
+ android:fromDegrees="0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="1080"/>
+ </item>
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_76_inner_holo"
+ android:fromDegrees="720"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="0"/>
+ </item>
+
+</layer-list>
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_48_outer_holo"
+ android:fromDegrees="0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="1080"/>
+ </item>
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_48_inner_holo"
+ android:fromDegrees="720"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="0"/>
+ </item>
+
+</layer-list>
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_16_outer_holo"
+ android:fromDegrees="0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="1080"/>
+ </item>
+ <item>
+ <rotate
+ android:drawable="@drawable/spinner_16_inner_holo"
+ android:fromDegrees="720"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="0"/>
+ </item>
+
+</layer-list>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false" android:state_focused="true" android:state_pressed="true"/>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:drawable="@drawable/list_selector_disabled_holo_dark" android:state_enabled="false" android:state_focused="true" android:state_pressed="true"/>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:drawable="@drawable/list_selector_disabled_holo_light" android:state_enabled="false" android:state_focused="true" android:state_pressed="true"/>
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<transition xmlns:android="http://schemas.android.com/apk/res/android"
- android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<transition xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_pressed_holo"/>
<item android:drawable="@drawable/list_longpressed_holo"/>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/transparent" android:state_window_focused="false"/>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/transparent" android:state_window_focused="false"/>
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:drawable="@drawable/vpi__tab_unselected_holo" android:state_focused="false" android:state_pressed="false" android:state_selected="false"/>
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:minHeight="320dp"
+ android:minWidth="480dp"
+ android:orientation="vertical">
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/actionbar_height"
+ android:background="?actionBarBackground">
+
+ <include layout="@layout/actionbar"/>
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/actionbar_shadow">
+
+ <include layout="@layout/base"/>
+ </FrameLayout>
+
+</LinearLayout>
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/actionbar_height"
+ android:background="?actionBarBackground">
+
+ <include layout="@layout/actionbar"/>
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/actionbar_shadow">
+
+ <include layout="@layout/compose"/>
+ </FrameLayout>
+
+</LinearLayout>
View
@@ -29,7 +29,7 @@
<ImageView
android:id="@id/actionbar_icon"
- android:layout_width="32dp"
+ android:layout_width="@dimen/actionbar_home_width"
android:layout_height="match_parent"
android:gravity="center_vertical|left"
android:scaleType="fitCenter"/>
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge>
+
+ <include layout="@layout/base"/>
+
+</merge>
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merge>
+
+ <include layout="@layout/compose"/>
+
+</merge>
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="Theme.Twidere.DialogWhenLarge" parent="Theme.Twidere.Dialog">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+
+ <!-- for programmatic instantiation -->
+ <item name="actionBarBackground">@drawable/actionbar_bg_dark_holo</item>
+ <item name="actionBarTitleStyle">@style/Widget.ActionBarTitle</item>
+ <item name="actionBarItemStyle">@style/Widget.ActionBarItem</item>
+ <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem</item>
+ <item name="actionBarHomeAsUpIndicator">@drawable/actionbar_back_dark</item>
+ <item name="actionBarIndeterminateProgressStyle">?android:attr/progressBarStyle</item>
+ <item name="actionModeBackground">@drawable/cab_background_top_holo_dark</item>
+ </style>
+
+ <style name="Theme.Twidere.Light.DialogWhenLarge" parent="Theme.Twidere.Light.Dialog">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowBackground">@drawable/dialog_full_holo_light_darkactionbar</item>
+
+ <!-- for programmatic instantiation -->
+ <item name="actionBarBackground">@drawable/actionbar_bg_light_darkactionbar_holo</item>
+ <item name="actionBarTitleStyle">@style/Widget.ActionBarTitle.Inverse</item>
+ <item name="actionBarItemStyle">@style/Widget.ActionBarItem</item>
+ <item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem</item>
+ <item name="actionBarHomeAsUpIndicator">@drawable/actionbar_back_dark</item>
+ <item name="actionBarIndeterminateProgressStyle">?android:attr/progressBarStyle</item>
+ <item name="actionModeBackground">@drawable/cab_background_top_holo_dark</item>
+ <item name="menuBarBackground">@drawable/actionbar_bg_bottom_light_darkactionbar_holo</item>
+ </style>
+
+</resources>
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+
+ <dimen name="actionbar_height">56dp</dimen>
+ <dimen name="actionbar_button_width">64dp</dimen>
+ <dimen name="actionbar_home_width">48dp</dimen>
+
+</resources>
@@ -50,4 +50,14 @@
<item name="popupBackground">@drawable/popup_holo_light</item>
</style>
-</resources>
+ <style name="Theme.ActionBar.Dialog.NoActionBar" parent="android:Theme.Holo.Dialog.NoActionBar">
+ <item name="menuBarBackground">@drawable/actionbar_bg_bottom_dark_holo</item>
+ <item name="popupBackground">@drawable/popup_holo_light</item>
+ </style>
+
+ <style name="Theme.ActionBar.Light.Dialog.NoActionBar" parent="android:Theme.Holo.Light.Dialog.NoActionBar">
+ <item name="menuBarBackground">@drawable/actionbar_bg_bottom_light_holo</item>
+ <item name="popupBackground">@drawable/popup_holo_light</item>
+ </style>
+
+</resources>
@@ -6,7 +6,7 @@
<style name="Theme.Twidere.Viewer" parent="android:Theme.Holo.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
- <item name="android:windowBackground">@drawable/image_viewer_background</item>
+ <item name="android:windowBackground">@drawable/viewer_background</item>
<item name="android:windowAnimationStyle">@style/Animation.ImageViewer</item>
<item name="android:galleryItemBackground">@drawable/gallery_item_background</item>
<item name="preferenceTitleStyle">@style/TextAppearance.Holo.Medium</item>
@@ -18,6 +18,7 @@
<resources>
<dimen name="actionbar_height">48dp</dimen>
+ <dimen name="actionbar_home_width">32dp</dimen>
<dimen name="actionbar_button_width">56dp</dimen>
</resources>
@@ -41,7 +41,7 @@
<style name="Theme.ActionBar.Dialog" parent="android:Theme">
<item name="android:windowFrame">@null</item>
<item name="android:windowTitleStyle">@style/DialogWindowTitle.Holo</item>
- <item name="android:windowBackground">@drawable/popup_holo_dark</item>
+ <item name="android:windowBackground">@drawable/dialog_full_holo_dark</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
@@ -54,7 +54,7 @@
<style name="Theme.ActionBar.Light.Dialog" parent="android:Theme.Light">
<item name="android:windowFrame">@null</item>
<item name="android:windowTitleStyle">@style/DialogWindowTitle.Holo.Light</item>
- <item name="android:windowBackground">@drawable/popup_holo_light</item>
+ <item name="android:windowBackground">@drawable/dialog_full_holo_light</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
@@ -64,4 +64,12 @@
<item name="actionModeBackground">@drawable/cab_background_top_holo_light</item>
</style>
-</resources>
+ <style name="Theme.ActionBar.NoActionBar" parent="Theme.ActionBar">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
+ <style name="Theme.ActionBar.Light.NoActionBar" parent="Theme.ActionBar.Light.DarkActionBar">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
+</resources>
Oops, something went wrong.

0 comments on commit 540223a

Please sign in to comment.