Permalink
Browse files

code cleanup

+ better image viewer.
  • Loading branch information...
1 parent bad6af8 commit 46c355690517fdb9c9d94ec7349a83ec366d49a6 @mariotaku committed Dec 7, 2012
Showing with 2,456 additions and 1,446 deletions.
  1. +7 −7 AndroidManifest.xml
  2. BIN libs/android-support-v4.jar
  3. +1 −1 project.properties
  4. BIN res/drawable-hdpi/fastscroll_thumb_default_holo.png
  5. BIN res/drawable-hdpi/fastscroll_thumb_pressed_holo.png
  6. BIN res/drawable-hdpi/fastscroll_track_default_holo_dark.9.png
  7. BIN res/drawable-hdpi/fastscroll_track_default_holo_light.9.png
  8. BIN res/drawable-hdpi/fastscroll_track_pressed_holo_dark.9.png
  9. BIN res/drawable-hdpi/fastscroll_track_pressed_holo_light.9.png
  10. BIN res/drawable-xhdpi/fastscroll_thumb_default_holo.png
  11. BIN res/drawable-xhdpi/fastscroll_thumb_pressed_holo.png
  12. BIN res/drawable-xhdpi/fastscroll_track_default_holo_dark.9.png
  13. BIN res/drawable-xhdpi/fastscroll_track_default_holo_light.9.png
  14. BIN res/drawable-xhdpi/fastscroll_track_pressed_holo_dark.9.png
  15. BIN res/drawable-xhdpi/fastscroll_track_pressed_holo_light.9.png
  16. BIN res/drawable-xhdpi/ic_menu_conversation.png
  17. BIN res/drawable-xhdpi/ic_menu_hashtag.png
  18. +0 −1 res/drawable/edit_text_holo_dark.xml
  19. +20 −0 res/drawable/fastscroll_thumb_holo.xml
  20. +20 −0 res/drawable/fastscroll_track_holo_dark.xml
  21. +20 −0 res/drawable/fastscroll_track_holo_light.xml
  22. +1 −28 res/layout-ar/status_content.xml
  23. +4 −4 res/layout-large-land/base_dual_pane.xml
  24. +4 −5 res/layout-large-land/home_dual_pane.xml
  25. +4 −4 res/layout-large-land/search_dual_pane.xml
  26. +0 −15 res/layout-v14/spinner_dropdown_item.xml
  27. +0 −15 res/layout/actionbar_spinner_navigation.xml
  28. +0 −6 res/layout/donate_dialogwhenlarge.xml
  29. +1 −1 res/layout/image_viewer.xml
  30. +5 −3 res/layout/images_preview.xml
  31. +0 −11 res/layout/spinner_dropdown_item.xml
  32. +0 −8 res/layout/spinner_item_white_text.xml
  33. +1 −28 res/layout/status_content.xml
  34. +2 −3 res/layout/user_profile_header.xml
  35. +265 −275 res/values-ar/strings.xml
  36. +2 −2 res/values-ca/strings.xml
  37. +309 −312 res/values-de/strings.xml
  38. +4 −4 res/values-es-rES/strings.xml
  39. +4 −4 res/values-fr/strings.xml
  40. +2 −2 res/values-hi/strings.xml
  41. +2 −2 res/values-hu/strings.xml
  42. +4 −4 res/values-id/strings.xml
  43. +4 −4 res/values-it/strings.xml
  44. +2 −2 res/values-ja/pull_refresh_strings.xml
  45. +4 −4 res/values-ja/strings.xml
  46. +2 −2 res/values-ko/strings.xml
  47. +7 −0 res/values-large-land/integers.xml
  48. +2 −2 res/values-nl/strings.xml
  49. +2 −2 res/values-pt-rBR/pull_refresh_strings.xml
  50. +4 −4 res/values-pt-rBR/strings.xml
  51. +4 −4 res/values-ru/strings.xml
  52. +1 −1 res/values-tr/strings.xml
  53. +4 −4 res/values-zh-rCN/strings.xml
  54. +4 −4 res/values-zh/strings.xml
  55. +0 −1 res/values/bools.xml
  56. +0 −1 res/values/dimens.xml
  57. +13 −5 res/values/holo__themes.xml
  58. +0 −2 res/values/integers.xml
  59. +0 −8 res/values/plurals.xml
  60. +1 −14 res/values/strings.xml
  61. +39 −3 res/values/themes.xml
  62. +250 −0 src/it/sephiroth/android/library/imagezoom/ImageViewTouch.java
  63. +506 −0 src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java
  64. +488 −0 src/it/sephiroth/android/library/imagezoom/ScaleGestureDetector.java
  65. +20 −0 src/it/sephiroth/android/library/imagezoom/easing/Cubic.java
  66. +10 −0 src/it/sephiroth/android/library/imagezoom/easing/Easing.java
  67. +86 −0 src/it/sephiroth/android/library/imagezoom/graphics/FastBitmapDrawable.java
  68. +15 −0 src/it/sephiroth/android/library/imagezoom/graphics/IBitmapDrawable.java
  69. +6 −0 src/it/sephiroth/android/library/imagezoom/utils/IDisposable.java
  70. +22 −22 src/org/mariotaku/actionbarcompat/ActionBarCompatBase.java
  71. +4 −7 src/org/mariotaku/actionbarcompat/ActionBarFragmentActivity.java
  72. +16 −17 src/org/mariotaku/actionbarcompat/ActionBarPreferenceActivity.java
  73. +4 −3 src/org/mariotaku/twidere/Constants.java
  74. +2 −0 src/org/mariotaku/twidere/activity/BaseDialogWhenLargeActivity.java
  75. +1 −1 src/org/mariotaku/twidere/activity/BasePreferenceActivity.java
  76. +0 −1 src/org/mariotaku/twidere/activity/BrowserActivity.java
  77. +2 −2 src/org/mariotaku/twidere/activity/ComposeActivity.java
  78. +2 −2 src/org/mariotaku/twidere/activity/DualPaneActivity.java
  79. +2 −2 src/org/mariotaku/twidere/activity/EditCustomTabActivity.java
  80. +1 −1 src/org/mariotaku/twidere/activity/HomeActivity.java
  81. +7 −8 src/org/mariotaku/twidere/activity/ImageViewerActivity.java
  82. +6 −6 src/org/mariotaku/twidere/activity/InternalSettingsDetailsActivity.java
  83. +2 −3 src/org/mariotaku/twidere/activity/LinkHandlerActivity.java
  84. +2 −1 src/org/mariotaku/twidere/activity/MultiSelectActivity.java
  85. +1 −2 src/org/mariotaku/twidere/activity/SettingsDetailsActivity.java
  86. +18 −20 src/org/mariotaku/twidere/adapter/{UserAutoCompleteAdapter.java → AutoCompleteAdapter.java}
  87. +6 −4 src/org/mariotaku/twidere/adapter/CursorStatusesAdapter.java
  88. +3 −5 src/org/mariotaku/twidere/app/TwidereApplication.java
  89. +3 −3 src/org/mariotaku/twidere/fragment/ActivityHostFragment.java
  90. +10 −10 src/org/mariotaku/twidere/fragment/BaseFiltersFragment.java
  91. +4 −4 src/org/mariotaku/twidere/fragment/BaseFragment.java
  92. +6 −6 src/org/mariotaku/twidere/fragment/BaseListFragment.java
  93. +1 −1 src/org/mariotaku/twidere/fragment/BaseStatusesListFragment.java
  94. +1 −0 src/org/mariotaku/twidere/fragment/CustomTabsFragment.java
  95. +3 −3 src/org/mariotaku/twidere/fragment/DirectMessagesConversationFragment.java
  96. +3 −2 src/org/mariotaku/twidere/fragment/DirectMessagesFragment.java
  97. +1 −1 src/org/mariotaku/twidere/fragment/FiltersListFragment.java
  98. +1 −1 src/org/mariotaku/twidere/fragment/StatusFragment.java
  99. +4 −4 src/org/mariotaku/twidere/fragment/UserListDetailsFragment.java
  100. +1 −1 src/org/mariotaku/twidere/fragment/UserProfileFragment.java
  101. +23 −16 src/org/mariotaku/twidere/provider/CommandProvider.java
  102. +3 −2 src/org/mariotaku/twidere/provider/TweetStore.java
  103. +34 −24 src/org/mariotaku/twidere/provider/TweetStoreProvider.java
  104. +2 −2 src/org/mariotaku/twidere/receiver/ConnectivityStateReceiver.java
  105. +15 −32 src/org/mariotaku/twidere/service/RefreshService.java
  106. +0 −1 src/org/mariotaku/twidere/util/ArrayUtils.java
  107. +7 −3 src/org/mariotaku/twidere/util/CacheUsersStatusesTask.java
  108. +4 −4 src/org/mariotaku/twidere/util/ListUtils.java
  109. +32 −21 src/org/mariotaku/twidere/util/PermissionManager.java
  110. +15 −9 src/org/mariotaku/twidere/util/TwitterWrapper.java
  111. +12 −7 src/org/mariotaku/twidere/util/Utils.java
  112. +0 −355 src/org/mariotaku/twidere/view/ImageViewer.java
  113. +7 −8 src/org/mariotaku/twidere/view/SlidingPaneView.java
  114. +7 −7 src/org/mariotaku/twidere/view/StatusComposeEditText.java
View
@@ -35,6 +35,7 @@
<application
android:name=".app.TwidereApplication"
+ android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
@@ -402,23 +403,22 @@
<service
android:name=".service.RefreshService"
- android:settingsActivity=".activity.SettingsActivity"
- android:label="@string/label_refresh_service"/>
+ android:label="@string/label_refresh_service"
+ android:settingsActivity=".activity.SettingsActivity"/>
<service
android:name="edu.ucdavis.earlybird.UCDService"
android:settingsActivity=".activity.DataProfilingSettingsActivity"/>
<provider
android:name=".provider.TweetStoreProvider"
android:authorities="twidere"
- android:label="@string/label_tweetstore_provider"
- android:exported="true"/>
+ android:exported="true"
+ android:label="@string/label_tweetstore_provider"/>
<provider
android:name=".provider.RecentSearchProvider"
android:authorities="org.mariotaku.twidere.provider.SearchRecentSuggestions"/>
- <receiver
- android:name=".receiver.ConnectivityStateReceiver">
+ <receiver android:name=".receiver.ConnectivityStateReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
@@ -435,4 +435,4 @@
</receiver>
</application>
-</manifest>
+</manifest>
View
Binary file not shown.
View
@@ -9,4 +9,4 @@
#
# Project target.
-target=Google Inc.:Google APIs:15
+target=Google Inc.:Google APIs:17
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -5,7 +5,6 @@
<item android:drawable="@drawable/textfield_disabled_holo_dark" android:state_enabled="false" android:state_window_focused="false"/>
<item android:drawable="@drawable/textfield_activated_holo" android:state_enabled="true" android:state_focused="true"/>
<item android:drawable="@drawable/textfield_focused_holo" android:state_enabled="true"/>
- <item android:drawable="@drawable/textfield_default_holo_dark" android:state_enabled="true"/>
<item android:drawable="@drawable/textfield_disabled_focused_holo_dark" android:state_focused="true"/>
<item android:drawable="@drawable/textfield_disabled_holo_dark"/>
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/fastscroll_thumb_pressed_holo" />
+ <item android:drawable="@drawable/fastscroll_thumb_default_holo" />
+</selector>
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/fastscroll_track_pressed_holo_dark" />
+ <item android:drawable="@drawable/fastscroll_track_default_holo_dark" />
+</selector>
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/fastscroll_track_pressed_holo_light" />
+ <item android:drawable="@drawable/fastscroll_track_default_holo_light" />
+</selector>
@@ -99,34 +99,7 @@
android:singleLine="false"
android:textAppearance="?android:attr/textAppearanceMedium"/>
- <FrameLayout
- android:id="@+id/images_preview"
- android:layout_width="match_parent"
- android:layout_height="144dp">
-
- <Gallery
- android:id="@+id/preview_gallery"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-
- <FrameLayout
- android:id="@+id/load_images"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/item_background_holo_light">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:drawableLeft="@drawable/ic_menu_gallery"
- android:gravity="center"
- android:layerType="software"
- android:text="@string/load_images"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"/>
- </FrameLayout>
- </FrameLayout>
+ <include layout="@layout/images_preview"/>
<TextView
android:id="@+id/retweet_view"
@@ -8,9 +8,9 @@
android:orientation="horizontal">
<FrameLayout
- android:layout_width="@dimen/pane_spacing_left"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="0">
+ android:layout_weight="@integer/pane_left_content_weight">
<include layout="@layout/base_pane_left_content"/>
@@ -23,9 +23,9 @@
<FrameLayout
android:id="@+id/fragment_container_right"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"/>
+ android:layout_weight="@integer/pane_right_content_weight"/>
</LinearLayout>
</merge>
@@ -8,9 +8,9 @@
android:orientation="horizontal">
<FrameLayout
- android:layout_width="@dimen/pane_spacing_left"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="0">
+ android:layout_weight="@integer/pane_left_content_weight">
<include layout="@layout/home_pane_left_content"/>
@@ -19,14 +19,13 @@
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_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"/>
+ android:layout_weight="@integer/pane_right_content_weight"/>
</LinearLayout>
<ImageButton
@@ -8,9 +8,9 @@
android:orientation="horizontal">
<FrameLayout
- android:layout_width="@dimen/pane_spacing_left"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="0">
+ android:layout_weight="@integer/pane_left_content_weight">
<include layout="@layout/search_pane_left_content"/>
@@ -23,9 +23,9 @@
<FrameLayout
android:id="@+id/fragment_container_right"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"/>
+ android:layout_weight="@integer/pane_right_content_weight"/>
</LinearLayout>
</merge>
@@ -1,15 +0,0 @@
-<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- style="?android:attr/spinnerDropDownItemStyle"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- android:drawablePadding="16dp"
- android:ellipsize="marquee"
- android:gravity="center_vertical"
- android:paddingLeft="16dp"
- android:paddingTop="6dp"
- android:paddingRight="16dp"
- android:paddingBottom="6dp"
- android:singleLine="true"
- android:textColor="#ffffff"/>
-
@@ -1,15 +0,0 @@
-<?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:layout_gravity="right"
- android:orientation="horizontal"
- android:paddingRight="4dp">
-
- <Spinner
- android:id="@+id/navigate"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical"/>
-
-</LinearLayout>
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge>
-
- <include layout="@layout/donate"/>
-
-</merge>
@@ -8,7 +8,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"/>
- <org.mariotaku.twidere.view.ImageViewer
+ <it.sephiroth.android.library.imagezoom.ImageViewTouch
android:id="@+id/image_viewer"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/images_preview"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="144dp">
<Gallery
android:id="@+id/preview_gallery"
@@ -14,15 +15,16 @@
android:layout_height="match_parent"
android:background="@drawable/item_background_holo_light">
- <TextView android:layerType="software"
+ <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawableLeft="@drawable/ic_menu_gallery"
android:gravity="center"
+ android:layerType="software"
android:text="@string/load_images"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"/>
</FrameLayout>
-</FrameLayout>
+</FrameLayout>
@@ -1,11 +0,0 @@
-<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- style="?android:attr/spinnerDropDownItemStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ellipsize="marquee"
- android:gravity="center_vertical"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:paddingLeft="8dp"
- android:paddingRight="8dp"
- android:singleLine="true"/>
@@ -1,8 +0,0 @@
-<TextView android:layerType="software" xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/text1"
- style="?android:attr/spinnerItemStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ellipsize="marquee"
- android:singleLine="true"
- android:textColor="#ffffff"/>
@@ -101,34 +101,7 @@
android:singleLine="false"
android:textAppearance="?android:attr/textAppearanceMedium"/>
- <FrameLayout
- android:id="@+id/images_preview"
- android:layout_width="match_parent"
- android:layout_height="144dp">
-
- <Gallery
- android:id="@+id/preview_gallery"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-
- <FrameLayout
- android:id="@+id/load_images"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/item_background_holo_light">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:drawableLeft="@drawable/ic_menu_gallery"
- android:gravity="center"
- android:layerType="software"
- android:text="@string/load_images"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"/>
- </FrameLayout>
- </FrameLayout>
+ <include layout="@layout/images_preview"/>
<TextView
android:id="@+id/retweet_view"
@@ -8,8 +8,7 @@
<FrameLayout
android:id="@+id/profile_name_banner_container"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true">
+ android:layout_height="wrap_content">
<org.mariotaku.twidere.view.ColorLabelRelativeLayout
android:id="@+id/profile_name_container"
@@ -371,4 +370,4 @@
android:layout_height="0.2dp"
android:background="#40808080"/>
-</LinearLayout>
+</LinearLayout>
Oops, something went wrong.

0 comments on commit 46c3556

Please sign in to comment.