Skip to content
This repository
Browse code

updated README file.

  • Loading branch information...
commit 26cd43f5e387fb682df28cc1fd11f10a1cf2deb1 1 parent c77f6ad
Mariotaku authored

Showing 33 changed files with 320 additions and 260 deletions. Show diff stats Hide diff stats

  1. 22  AndroidManifest.xml
  2. 28  README.markdown
  3. 4  res/layout-large-v11/base_dialogwhenlarge.xml
  4. 25  res/layout-large-v11/base_list_dialogwhenlarge.xml
  5. 6  res/layout/base_list_dialogwhenlarge.xml
  6. 8  res/layout/donate.xml
  7. 6  res/values-large-v11/bools.xml
  8. 7  res/values-large-v11/themes.xml
  9. 1  res/values/bools.xml
  10. 2  res/values/dimens.xml
  11. 4  src/org/mariotaku/actionbarcompat/ActionBar.java
  12. 11  src/org/mariotaku/actionbarcompat/ActionBarCompat.java
  13. 5  src/org/mariotaku/actionbarcompat/ActionBarCompatBase.java
  14. 5  src/org/mariotaku/actionbarcompat/ActionBarCompatNative.java
  15. 2  src/org/mariotaku/actionbarcompat/ActionBarFragmentActivity.java
  16. 2  src/org/mariotaku/twidere/Constants.java
  17. 2  src/org/mariotaku/twidere/activity/BaseDialogActivity.java
  18. 90  src/org/mariotaku/twidere/activity/BaseDialogWhenLargeActivity.java
  19. 64  src/org/mariotaku/twidere/activity/ComposeActivity.java
  20. 12  src/org/mariotaku/twidere/activity/CustomTabsActivity.java
  21. 5  src/org/mariotaku/twidere/activity/DonateActivity.java
  22. 4  src/org/mariotaku/twidere/activity/DraftsActivity.java
  23. 8  src/org/mariotaku/twidere/activity/ExtensionsListActivity.java
  24. 52  src/org/mariotaku/twidere/activity/FiltersActivity.java
  25. 2  src/org/mariotaku/twidere/activity/HomeActivity.java
  26. 5  src/org/mariotaku/twidere/activity/HostMappingActivity.java
  27. 73  src/org/mariotaku/twidere/activity/InternalFiltersActivity.java
  28. 13  src/org/mariotaku/twidere/activity/SettingsActivity.java
  29. 2  src/org/mariotaku/twidere/fragment/BaseFragment.java
  30. 5  src/org/mariotaku/twidere/fragment/CustomTabsFragment.java
  31. 54  src/org/mariotaku/twidere/fragment/FiltersListFragment.java
  32. 32  src/org/mariotaku/twidere/service/TwidereService.java
  33. 19  src/org/mariotaku/twidere/util/AsyncTaskManager.java
22  AndroidManifest.xml
@@ -185,6 +185,7 @@
185 185
 			android:name=".activity.FiltersActivity"
186 186
 			android:exported="false"
187 187
 			android:label="@string/filter"
  188
+			android:theme="@style/Theme.Blank.DialogWhenLarge"
188 189
 			android:windowSoftInputMode="adjustResize">
189 190
 			<intent-filter>
190 191
 				<action android:name="android.intent.action.MAIN"/>
@@ -288,7 +289,8 @@
288 289
 		<activity
289 290
 			android:name=".activity.DraftsActivity"
290 291
 			android:exported="false"
291  
-			android:label="@string/drafts">
  292
+			android:label="@string/drafts"
  293
+			android:theme="@style/Theme.Blank.DialogWhenLarge">
292 294
 			<intent-filter>
293 295
 				<action android:name="android.intent.action.MAIN"/>
294 296
 				<action android:name="org.mariotaku.twidere.DRAFTS"/>
@@ -346,9 +348,6 @@
346 348
 			android:name=".activity.InternalSettingsDetailsActivity"
347 349
 			android:label="@string/settings"/>
348 350
 		<activity
349  
-			android:name=".activity.InternalFiltersActivity"
350  
-			android:label="@string/filter"/>
351  
-		<activity
352 351
 			android:name=".activity.FileSaveAsActivity"
353 352
 			android:exported="false"
354 353
 			android:label="@string/save_as">
@@ -371,7 +370,8 @@
371 370
 		<activity
372 371
 			android:name=".activity.ExtensionsListActivity"
373 372
 			android:exported="false"
374  
-			android:label="@string/extensions">
  373
+			android:label="@string/extensions"
  374
+			android:theme="@style/Theme.Blank.DialogWhenLarge">
375 375
 			<intent-filter>
376 376
 				<action android:name="org.mariotaku.twidere.EXTENSIONS"/>
377 377
 
@@ -381,7 +381,8 @@
381 381
 		<activity
382 382
 			android:name=".activity.CustomTabsActivity"
383 383
 			android:exported="false"
384  
-			android:label="@string/custom_tabs">
  384
+			android:label="@string/custom_tabs"
  385
+			android:theme="@style/Theme.Blank.DialogWhenLarge">
385 386
 			<intent-filter>
386 387
 				<action android:name="org.mariotaku.twidere.CUSTOM_TABS"/>
387 388
 
@@ -402,7 +403,8 @@
402 403
 		<activity
403 404
 			android:name=".activity.HostMappingActivity"
404 405
 			android:exported="false"
405  
-			android:label="@string/custom_host_mapping">
  406
+			android:label="@string/custom_host_mapping"
  407
+			android:theme="@style/Theme.Blank.DialogWhenLarge">
406 408
 			<intent-filter>
407 409
 				<action android:name="org.mariotaku.twidere.EDIT_HOST_MAPPING"/>
408 410
 
@@ -436,11 +438,10 @@
436 438
 				<category android:name="android.intent.category.DEFAULT"/>
437 439
 			</intent-filter>
438 440
 		</service>
439  
-
440 441
 		<service
441 442
 			android:name="edu.ucdavis.earlybird.UCDService"
442 443
 			android:settingsActivity=".activity.DataProfilingSettingsActivity"/>
443  
-		
  444
+
444 445
 		<provider
445 446
 			android:name=".provider.TweetStoreProvider"
446 447
 			android:authorities="org.mariotaku.twidere.provider.TweetStore"
@@ -458,7 +459,6 @@
458 459
 				<action android:name="android.intent.action.BOOT_COMPLETED"/>
459 460
 			</intent-filter>
460 461
 		</receiver>
461  
-
462 462
 		<receiver
463 463
 			android:name="edu.ucdavis.earlybird.UploadReceiver"
464 464
 			android:exported="false">
@@ -471,4 +471,4 @@
471 471
 		</receiver>
472 472
 	</application>
473 473
 
474  
-</manifest>
  474
+</manifest>
28  README.markdown
Source Rendered
@@ -2,6 +2,8 @@
2 2
 
3 3
 Twidere is a powerful twitter client for Android 1.6+, which gives you a full Holo theme and much more.
4 4
 
  5
+---
  6
+
5 7
 ###Features###
6 8
 
7 9
 * Pure & Clean Holo design works for pre-ICS devices
@@ -26,6 +28,8 @@ Twidere is a powerful twitter client for Android 1.6+, which gives you a full Ho
26 28
 
27 29
 <a href="https://play.google.com/store/apps/details?id=org.mariotaku.twidere"><img src="http://www.android.com/images/brand/get_it_on_play_logo_large.png"/></a>
28 30
 
  31
+---
  32
+
29 33
 ###Icon designers###
30 34
 
31 35
 [@lordfriend](https://twitter.com/#!/lordfriend)
@@ -36,17 +40,39 @@ Twidere is a powerful twitter client for Android 1.6+, which gives you a full Ho
36 40
 
37 41
 Thanks to their excellent design!
38 42
 
  43
+---
  44
+
39 45
 ###Translate twidere to your language###
40 46
 
41 47
 I started a crowdin project, so anyone can do something for Twidere. Visit this [crowdin project page](http://crowdin.net/project/twidere)
42 48
 
  49
+---
  50
+
43 51
 ###Consider donate?###
44 52
 
45 53
 Thanks to @huxim 's memory stick!!!
46 54
 
47 55
 Buy me a bread or anything you want :)
48 56
 
49  
-**[Donate Via Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mariotaku.lee@gmail.com&item_name=Donate to Twidere&currency_code=USD)**
  57
+**Donate Via Paypal**
  58
+
  59
+<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  60
+<input type="hidden" name="cmd" value="_xclick">
  61
+<input type="hidden" name="business" value="mariotaku.lee@gmail.com">
  62
+<input type="hidden" name="currency_code" value="USD">
  63
+<input type="hidden" name="item_name" value="Donate to Twidere">
  64
+<table>
  65
+  <tr>
  66
+    <td>Your name (for donators list)</td>
  67
+    <td><input type="text" name="os0"></td>
  68
+  </tr>
  69
+  <tr>
  70
+    <td>Amount</td>
  71
+    <td><input type="text" name="amount" value="5.00"></td>
  72
+  </tr>
  73
+</table>
  74
+<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
  75
+</form>
50 76
 
51 77
 **Donate Via Alipay(支付宝)**
52 78
 
4  res/layout-large-v11/base_dialogwhenlarge.xml
@@ -2,8 +2,8 @@
2 2
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
 	android:layout_width="match_parent"
4 4
 	android:layout_height="match_parent"
5  
-	android:minHeight="320dp"
6  
-	android:minWidth="480dp"
  5
+	android:minHeight="@dimen/dialogwhenlarge_min_height"
  6
+	android:minWidth="@dimen/dialogwhenlarge_min_width"
7 7
 	android:orientation="vertical">
8 8
 
9 9
 	<FrameLayout
25  res/layout-large-v11/base_list_dialogwhenlarge.xml
... ...
@@ -0,0 +1,25 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3
+	android:layout_width="match_parent"
  4
+	android:layout_height="match_parent"
  5
+	android:minHeight="@dimen/dialogwhenlarge_min_height"
  6
+	android:minWidth="@dimen/dialogwhenlarge_min_width"
  7
+	android:orientation="vertical">
  8
+
  9
+	<FrameLayout
  10
+		android:layout_width="match_parent"
  11
+		android:layout_height="@dimen/actionbar_height"
  12
+		android:background="?actionBarBackground">
  13
+
  14
+		<include layout="@layout/actionbar"/>
  15
+	</FrameLayout>
  16
+
  17
+	<FrameLayout
  18
+		android:layout_width="match_parent"
  19
+		android:layout_height="match_parent"
  20
+		android:background="@drawable/actionbar_shadow">
  21
+
  22
+		<include layout="@layout/base_list"/>
  23
+	</FrameLayout>
  24
+
  25
+</LinearLayout>
6  res/layout/base_list_dialogwhenlarge.xml
... ...
@@ -0,0 +1,6 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<merge>
  3
+
  4
+	<include layout="@layout/base_list"/>
  5
+
  6
+</merge>
8  res/layout/donate.xml
... ...
@@ -0,0 +1,8 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3
+	android:layout_width="match_parent"
  4
+	android:layout_height="match_parent"
  5
+	android:orientation="vertical">
  6
+	
  7
+
  8
+</LinearLayout>
6  res/values-large-v11/bools.xml
... ...
@@ -0,0 +1,6 @@
  1
+<?xml version="1.0" encoding="utf-8"?>
  2
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
  3
+
  4
+	<bool name="should_set_background">false</bool>
  5
+
  6
+</resources>
7  res/values-large-v11/themes.xml
@@ -17,13 +17,12 @@
17 17
 		<item name="actionModeBackground">@drawable/cab_background_top_holo_dark</item>
18 18
 	</style>
19 19
 
20  
-	<style name="Theme.Twidere.Light.DialogWhenLarge" parent="Theme.Twidere.Light.Dialog">
21  
-		<item name="android:windowActionBar">false</item>
  20
+	<style name="Theme.Twidere.Light.DialogWhenLarge" parent="Theme.Twidere.Light.Dialog"><item name="android:windowActionBar">false</item>
22 21
 		<item name="android:windowNoTitle">true</item>
23  
-		<item name="android:windowBackground">@drawable/dialog_full_holo_light_darkactionbar</item>
  22
+<item name="android:windowBackground">@drawable/dialog_full_holo_light_darkactionbar</item>
24 23
 
25 24
 		<!-- for programmatic instantiation -->
26  
-		<item name="actionBarBackground">@drawable/actionbar_bg_light_darkactionbar_holo</item>
  25
+		<item name="actionBarBackground">@drawable/bg_actionbar_light_theme</item>
27 26
 		<item name="actionBarTitleStyle">@style/Widget.ActionBarTitle.Inverse</item>
28 27
 		<item name="actionBarItemStyle">@style/Widget.ActionBarItem</item>
29 28
 		<item name="actionBarItemHomeStyle">@style/Widget.ActionBarHomeItem</item>
1  res/values/bools.xml
@@ -8,5 +8,6 @@
8 8
 	<bool name="should_disable_scroll">false</bool>
9 9
 	<bool name="default_shadow_slidable">true</bool>
10 10
 	<bool name="shadow_slidable">true</bool>
  11
+	<bool name="should_set_background">true</bool>
11 12
 
12 13
 </resources>
2  res/values/dimens.xml
@@ -15,5 +15,7 @@
15 15
 	<dimen name="default_slidepane_spacing_left">@dimen/pane_spacing_right</dimen>
16 16
 	<dimen name="default_slidepane_spacing_right">@dimen/pane_spacing_right</dimen>
17 17
 	<dimen name="default_slidingpane_shadow_width">32dp</dimen>
  18
+	<dimen name="dialogwhenlarge_min_height">480dp</dimen>
  19
+	<dimen name="dialogwhenlarge_min_width">480dp</dimen>
18 20
 
19 21
 </resources>
4  src/org/mariotaku/actionbarcompat/ActionBar.java
@@ -13,7 +13,7 @@
13 13
 
14 14
 	public CharSequence getTitle();
15 15
 
16  
-	public void setBackgroundDrawable(Drawable paramDrawable);
  16
+	public void setBackgroundDrawable(Drawable d);
17 17
 
18 18
 	public void setCustomView(int resId);
19 19
 
@@ -23,7 +23,7 @@
23 23
 
24 24
 	public void setDisplayShowCustomEnabled(boolean showCustom);
25 25
 
26  
-	public void setDisplayShowHomeEnabled(boolean sShowHome);
  26
+	public void setDisplayShowHomeEnabled(boolean showHome);
27 27
 
28 28
 	public void setDisplayShowTitleEnabled(boolean showTitle);
29 29
 
11  src/org/mariotaku/actionbarcompat/ActionBarCompat.java
@@ -4,17 +4,14 @@
4 4
 import android.os.Build;
5 5
 import android.view.MenuInflater;
6 6
 
7  
-abstract class ActionBarCompat {
  7
+public abstract class ActionBarCompat implements ActionBar {
  8
+
  9
+	public abstract boolean isAvailable();
8 10
 
9 11
 	ActionBar getActionBar() {
10  
-		if (this instanceof ActionBar) // if (!isActionBarAvailable()) return
11  
-										// null;
12  
-			return (ActionBar) this;
13  
-		return null;
  12
+		return this;
14 13
 	}
15 14
 
16  
-	// protected abstract boolean isActionBarAvailable();
17  
-
18 15
 	/**
19 16
 	 * Returns a {@link MenuInflater} for use when inflating menus. The
20 17
 	 * implementation of this method in {@link ActionBarHelperBase} returns a
5  src/org/mariotaku/actionbarcompat/ActionBarCompatBase.java
@@ -128,6 +128,11 @@ public void invalidateOptionsMenu() {
128 128
 	}
129 129
 
130 130
 	@Override
  131
+	public boolean isAvailable() {
  132
+		return mActionBarView != null;
  133
+	}
  134
+
  135
+	@Override
131 136
 	public void setBackgroundDrawable(final Drawable d) {
132 137
 		if (mActionBarView != null) {
133 138
 			mActionBarView.setBackgroundDrawable(d);
5  src/org/mariotaku/actionbarcompat/ActionBarCompatNative.java
@@ -40,6 +40,11 @@ public CharSequence getTitle() {
40 40
 	}
41 41
 
42 42
 	@Override
  43
+	public boolean isAvailable() {
  44
+		return mActivity != null && mActivity.getActionBar() != null;
  45
+	}
  46
+
  47
+	@Override
43 48
 	public void setBackgroundDrawable(final Drawable background) {
44 49
 		if (mActivity == null || mActivity.getActionBar() == null) return;
45 50
 		mActivity.getActionBar().setBackgroundDrawable(background);
2  src/org/mariotaku/actionbarcompat/ActionBarFragmentActivity.java
@@ -14,7 +14,7 @@
14 14
 @SuppressLint("Registered")
15 15
 public class ActionBarFragmentActivity extends FragmentActivity {
16 16
 
17  
-	private final ActionBarCompat mActionBarCompat = ActionBarCompat.getInstance(this);
  17
+	protected final ActionBarCompat mActionBarCompat = ActionBarCompat.getInstance(this);
18 18
 	private boolean mActionBarInitialized = false;
19 19
 
20 20
 	protected Fragment mAttachedFragment;
2  src/org/mariotaku/twidere/Constants.java
@@ -488,8 +488,10 @@
488 488
 	public static final String TASK_TAG_GET_MENTIONS = "get_mentions";
489 489
 	public static final String TASK_TAG_GET_SENT_DIRECT_MESSAGES = "get_sent_direct_messages";
490 490
 	public static final String TASK_TAG_GET_RECEIVED_DIRECT_MESSAGES = "get_received_direct_messages";
  491
+	public static final String TASK_TAG_GET_TRENDS = "get_trends";
491 492
 	public static final String TASK_TAG_STORE_HOME_TIMELINE = "store_home_tomeline";
492 493
 	public static final String TASK_TAG_STORE_MENTIONS = "store_mentions";
493 494
 	public static final String TASK_TAG_STORE_SENT_DIRECT_MESSAGES = "store_sent_direct_messages";
494 495
 	public static final String TASK_TAG_STORE_RECEIVED_DIRECT_MESSAGES = "store_received_direct_messages";
  496
+	public static final String TASK_TAG_STORE_TRENDS = "store_trends";
495 497
 }
2  src/org/mariotaku/twidere/activity/BaseDialogActivity.java
@@ -40,7 +40,7 @@
40 40
 @SuppressLint("Registered")
41 41
 class BaseDialogActivity extends FragmentActivity implements Constants, ActivityThemeChangeInterface {
42 42
 
43  
-private boolean mIsDarkTheme, mHardwareAccelerated;
  43
+	private boolean mIsDarkTheme, mHardwareAccelerated;
44 44
 
45 45
 	public TwidereApplication getTwidereApplication() {
46 46
 		return (TwidereApplication) getApplication();
90  src/org/mariotaku/twidere/activity/BaseDialogWhenLargeActivity.java
... ...
@@ -0,0 +1,90 @@
  1
+package org.mariotaku.twidere.activity;
  2
+
  3
+import org.mariotaku.actionbarcompat.ActionBar;
  4
+import org.mariotaku.actionbarcompat.ActionBarCompatBase;
  5
+import org.mariotaku.twidere.R;
  6
+
  7
+import android.os.Bundle;
  8
+import android.support.v4.app.Fragment;
  9
+import android.view.MenuInflater;
  10
+import android.view.View;
  11
+import android.view.ViewGroup.LayoutParams;
  12
+
  13
+public class BaseDialogWhenLargeActivity extends BaseActivity {
  14
+
  15
+	protected ActionBar mActionBar;
  16
+
  17
+	@Override
  18
+	public MenuInflater getMenuInflater() {
  19
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase)
  20
+			return ((ActionBarCompatBase) mActionBar).getMenuInflater(super.getBaseMenuInflater());
  21
+		return super.getMenuInflater();
  22
+	}
  23
+
  24
+	@Override
  25
+	public ActionBar getSupportActionBar() {
  26
+		return mActionBar;
  27
+	}
  28
+
  29
+	@Override
  30
+	public void invalidateSupportOptionsMenu() {
  31
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase) {
  32
+			((ActionBarCompatBase) mActionBar).invalidateOptionsMenu();
  33
+		} else {
  34
+			super.invalidateSupportOptionsMenu();
  35
+		}
  36
+	}
  37
+
  38
+	@Override
  39
+	public void onAttachFragment(final Fragment fragment) {
  40
+		super.onAttachFragment(fragment);
  41
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase) {
  42
+			((ActionBarCompatBase) mActionBar).createActionBarMenu();
  43
+		}
  44
+	}
  45
+
  46
+	@Override
  47
+	public void onCreate(final Bundle savedInstanceState) {
  48
+		super.onCreate(savedInstanceState);
  49
+		mActionBar = mActionBarCompat.isAvailable() ? mActionBarCompat : new ActionBarCompatBase(this);
  50
+	}
  51
+
  52
+	@Override
  53
+	public void setContentView(final int layoutResID) {
  54
+		super.setContentView(layoutResID);
  55
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase) {
  56
+			((ActionBarCompatBase) mActionBar).initViews();
  57
+		}
  58
+	}
  59
+
  60
+	@Override
  61
+	public void setContentView(final View view) {
  62
+		super.setContentView(view);
  63
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase) {
  64
+			((ActionBarCompatBase) mActionBar).initViews();
  65
+		}
  66
+	}
  67
+
  68
+	@Override
  69
+	public void setContentView(final View view, final LayoutParams params) {
  70
+		super.setContentView(view, params);
  71
+		if (!mActionBarCompat.isAvailable() && mActionBar instanceof ActionBarCompatBase) {
  72
+			((ActionBarCompatBase) mActionBar).initViews();
  73
+		}
  74
+	}
  75
+
  76
+	@Override
  77
+	protected int getDarkThemeRes() {
  78
+		return R.style.Theme_Twidere_DialogWhenLarge;
  79
+	}
  80
+
  81
+	@Override
  82
+	protected int getLightThemeRes() {
  83
+		return R.style.Theme_Twidere_Light_DialogWhenLarge;
  84
+	}
  85
+
  86
+	@Override
  87
+	protected boolean isSetBackgroundEnabled() {
  88
+		return getResources().getBoolean(R.bool.should_set_background);
  89
+	}
  90
+}
64  src/org/mariotaku/twidere/activity/ComposeActivity.java
@@ -33,7 +33,6 @@
33 33
 
34 34
 import java.io.File;
35 35
 
36  
-import org.mariotaku.actionbarcompat.ActionBarCompatBase;
37 36
 import org.mariotaku.menubar.MenuBar;
38 37
 import org.mariotaku.menubar.MenuBar.OnMenuItemClickListener;
39 38
 import org.mariotaku.popupmenu.PopupMenu;
@@ -84,7 +83,6 @@
84 83
 import android.text.TextWatcher;
85 84
 import android.view.KeyEvent;
86 85
 import android.view.Menu;
87  
-import android.view.MenuInflater;
88 86
 import android.view.MenuItem;
89 87
 import android.view.View;
90 88
 import android.view.View.OnClickListener;
@@ -97,9 +95,9 @@
97 95
 
98 96
 import com.twitter.Validator;
99 97
 
100  
-public class ComposeActivity extends BaseActivity implements TextWatcher, LocationListener, OnMenuItemClickListener,
101  
-		OnClickListener, OnLongClickListener, PopupMenu.OnMenuItemClickListener, OnEditorActionListener,
102  
-		LoaderCallbacks<Bitmap> {
  98
+public class ComposeActivity extends BaseDialogWhenLargeActivity implements TextWatcher, LocationListener,
  99
+		OnMenuItemClickListener, OnClickListener, OnLongClickListener, PopupMenu.OnMenuItemClickListener,
  100
+		OnEditorActionListener, LoaderCallbacks<Bitmap> {
103 101
 
104 102
 	private static final String FAKE_IMAGE_LINK = "https://www.example.com/fake_image.jpg";
105 103
 	private static final String INTENT_KEY_CONTENT_MODIFIED = "content_modified";
@@ -112,7 +110,6 @@
112 110
 	private ContentResolver mResolver;
113 111
 	private final Validator mValidator = new Validator();
114 112
 
115  
-	private ActionBarCompatBase mActionBarCompat;
116 113
 	private PopupMenu mPopupMenu;
117 114
 
118 115
 	private static final int THUMBNAIL_SIZE = 36;
@@ -146,16 +143,6 @@ public void beforeTextChanged(final CharSequence s, final int start, final int c
146 143
 	}
147 144
 
148 145
 	@Override
149  
-	public MenuInflater getMenuInflater() {
150  
-		return mActionBarCompat.getMenuInflater(super.getBaseMenuInflater());
151  
-	}
152  
-
153  
-	@Override
154  
-	public void invalidateSupportOptionsMenu() {
155  
-		mActionBarCompat.invalidateOptionsMenu();
156  
-	}
157  
-
158  
-	@Override
159 146
 	public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
160 147
 		switch (requestCode) {
161 148
 			case REQUEST_TAKE_PHOTO: {
@@ -256,12 +243,6 @@ public void onActivityResult(final int requestCode, final int resultCode, final
256 243
 	}
257 244
 
258 245
 	@Override
259  
-	public void onAttachFragment(final Fragment fragment) {
260  
-		super.onAttachFragment(fragment);
261  
-		mActionBarCompat.createActionBarMenu();
262  
-	}
263  
-
264  
-	@Override
265 246
 	public void onBackPressed() {
266 247
 		final String text = mEditText != null ? parseString(mEditText.getText()) : null;
267 248
 		if (mContentModified && !isEmpty(text)) {
@@ -309,7 +290,6 @@ public void onCreate(final Bundle savedInstanceState) {
309 290
 		mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
310 291
 		mService = getTwidereApplication().getServiceInterface();
311 292
 		mResolver = getContentResolver();
312  
-		mActionBarCompat = new ActionBarCompatBase(this);
313 293
 		super.onCreate(savedInstanceState);
314 294
 		final long[] account_ids = getAccountIds(this);
315 295
 		if (account_ids.length <= 0) {
@@ -321,8 +301,6 @@ public void onCreate(final Bundle savedInstanceState) {
321 301
 		}
322 302
 		setContentView(R.layout.compose_dialogwhenlarge);
323 303
 		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
324  
-		mActionBarCompat.initViews();
325  
-		mActionBarCompat.setDisplayHomeAsUpEnabled(true);
326 304
 
327 305
 		final Bundle bundle = savedInstanceState != null ? savedInstanceState : getIntent().getExtras();
328 306
 		final long account_id = bundle != null ? bundle.getLong(INTENT_KEY_ACCOUNT_ID) : -1;
@@ -461,9 +439,6 @@ public void onCreate(final Bundle savedInstanceState) {
461 439
 	@Override
462 440
 	public boolean onCreateOptionsMenu(final Menu menu) {
463 441
 		getMenuInflater().inflate(R.menu.menu_compose_actionbar, menu);
464  
-		if (mAttachedFragment != null) {
465  
-			mAttachedFragment.onCreateOptionsMenu(menu, getMenuInflater());
466  
-		}
467 442
 		return super.onCreateOptionsMenu(menu);
468 443
 	}
469 444
 
@@ -538,8 +513,7 @@ public boolean onMenuItemClick(final MenuItem item) {
538 513
 			case MENU_DELETE: {
539 514
 				if (mImageUri == null) return false;
540 515
 				if (mIsPhotoAttached && !mIsImageAttached) {
541  
-					final File image_file = "file".equals(mImageUri.getScheme()) ? new File(mImageUri.getPath())
542  
-							: null;
  516
+					final File image_file = "file".equals(mImageUri.getScheme()) ? new File(mImageUri.getPath()) : null;
543 517
 					if (image_file != null) {
544 518
 						image_file.delete();
545 519
 					}
@@ -627,8 +601,8 @@ public boolean onPrepareOptionsMenu(final Menu menu) {
627 601
 				FAKE_IMAGE_LINK, text_orig) : text_orig + " " + FAKE_IMAGE_LINK : text_orig;
628 602
 		final int count = mValidator.getTweetLength(text);
629 603
 		final float hue = count < Validator.MAX_TWEET_LENGTH ? count >= Validator.MAX_TWEET_LENGTH - 10 ? 5 * (Validator.MAX_TWEET_LENGTH - count)
630  
-					: 50
631  
-					: 0;
  604
+				: 50
  605
+				: 0;
632 606
 		final float[] hsv = new float[] { hue, 1.0f, 1.0f };
633 607
 		mTextCount.setTextColor(count >= Validator.MAX_TWEET_LENGTH - 10 ? Color.HSVToColor(0x80, hsv) : 0x80808080);
634 608
 		mTextCount.setText(parseString(Validator.MAX_TWEET_LENGTH - count));
@@ -675,11 +649,12 @@ public void onTextChanged(final CharSequence s, final int start, final int befor
675 649
 		mContentModified = true;
676 650
 	}
677 651
 
678  
-	@Override
679  
-	public void onTitleChanged(final CharSequence title, final int color) {
680  
-		mActionBarCompat.setTitle(title);
681  
-		super.onTitleChanged(title, color);
682  
-	}
  652
+	//
  653
+	// @Override
  654
+	// public void onTitleChanged(final CharSequence title, final int color) {
  655
+	// mActionBarCompat.setTitle(title);
  656
+	// super.onTitleChanged(title, color);
  657
+	// }
683 658
 
684 659
 	public void saveToDrafts() {
685 660
 		final String text = mEditText != null ? parseString(mEditText.getText()) : null;
@@ -699,21 +674,6 @@ public void saveToDrafts() {
699 674
 	}
700 675
 
701 676
 	@Override
702  
-	protected int getDarkThemeRes() {
703  
-		return R.style.Theme_Twidere_DialogWhenLarge;
704  
-	}
705  
-
706  
-	@Override
707  
-	protected int getLightThemeRes() {
708  
-		return R.style.Theme_Twidere_Light_DialogWhenLarge;
709  
-	}
710  
-
711  
-	@Override
712  
-	protected boolean isSetBackgroundEnabled() {
713  
-		return false;
714  
-	}
715  
-	
716  
-	@Override
717 677
 	protected void onStart() {
718 678
 		super.onStart();
719 679
 		final String uploader_component = mPreferences.getString(PREFERENCE_KEY_IMAGE_UPLOADER, null);
12  src/org/mariotaku/twidere/activity/CustomTabsActivity.java
@@ -19,24 +19,22 @@
19 19
 
20 20
 package org.mariotaku.twidere.activity;
21 21
 
  22
+import org.mariotaku.twidere.R;
22 23
 import org.mariotaku.twidere.fragment.CustomTabsFragment;
23 24
 
24 25
 import android.os.Bundle;
25  
-import android.support.v4.app.Fragment;
26 26
 import android.support.v4.app.FragmentTransaction;
27 27
 import android.view.MenuItem;
28  
-import android.widget.FrameLayout;
29 28
 
30  
-public class CustomTabsActivity extends BaseActivity {
  29
+public class CustomTabsActivity extends BaseDialogWhenLargeActivity {
31 30
 
32 31
 	@Override
33 32
 	public void onCreate(final Bundle savedInstanceState) {
34 33
 		super.onCreate(savedInstanceState);
35  
-		setContentView(new FrameLayout(this));
  34
+		setContentView(R.layout.base_dialogwhenlarge);
36 35
 		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
37  
-		final Fragment fragment = new CustomTabsFragment();
38 36
 		final FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
39  
-		ft.replace(android.R.id.content, fragment);
  37
+		ft.replace(R.id.main, new CustomTabsFragment());
40 38
 		ft.commit();
41 39
 	}
42 40
 
@@ -45,7 +43,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
45 43
 		switch (item.getItemId()) {
46 44
 			case MENU_HOME:
47 45
 				onBackPressed();
48  
-				break;
  46
+				return true;
49 47
 		}
50 48
 		return super.onOptionsItemSelected(item);
51 49
 	}
5  src/org/mariotaku/twidere/activity/DonateActivity.java
... ...
@@ -0,0 +1,5 @@
  1
+package org.mariotaku.twidere.activity;
  2
+
  3
+public class DonateActivity extends BaseDialogWhenLargeActivity {
  4
+
  5
+}
4  src/org/mariotaku/twidere/activity/DraftsActivity.java
@@ -48,8 +48,8 @@
48 48
 import android.widget.ListView;
49 49
 import android.widget.TextView;
50 50
 
51  
-public class DraftsActivity extends BaseActivity implements LoaderCallbacks<Cursor>, OnItemClickListener,
52  
-		OnItemLongClickListener, OnMenuItemClickListener {
  51
+public class DraftsActivity extends BaseDialogWhenLargeActivity implements LoaderCallbacks<Cursor>,
  52
+		OnItemClickListener, OnItemLongClickListener, OnMenuItemClickListener {
53 53
 
54 54
 	private ContentResolver mResolver;
55 55
 	private ServiceInterface mService;
8  src/org/mariotaku/twidere/activity/ExtensionsListActivity.java
@@ -19,24 +19,24 @@
19 19
 
20 20
 package org.mariotaku.twidere.activity;
21 21
 
  22
+import org.mariotaku.twidere.R;
22 23
 import org.mariotaku.twidere.fragment.ExtensionsListFragment;
23 24
 
24 25
 import android.os.Bundle;
25 26
 import android.support.v4.app.Fragment;
26 27
 import android.support.v4.app.FragmentTransaction;
27 28
 import android.view.MenuItem;
28  
-import android.widget.FrameLayout;
29 29
 
30  
-public class ExtensionsListActivity extends BaseActivity {
  30
+public class ExtensionsListActivity extends BaseDialogWhenLargeActivity {
31 31
 
32 32
 	@Override
33 33
 	public void onCreate(final Bundle savedInstanceState) {
34 34
 		super.onCreate(savedInstanceState);
35  
-		setContentView(new FrameLayout(this));
  35
+		setContentView(R.layout.base_dialogwhenlarge);
36 36
 		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
37 37
 		final Fragment fragment = new ExtensionsListFragment();
38 38
 		final FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
39  
-		ft.replace(android.R.id.content, fragment);
  39
+		ft.replace(R.id.main, fragment);
40 40
 		ft.commit();
41 41
 	}
42 42
 
52  src/org/mariotaku/twidere/activity/FiltersActivity.java
@@ -19,64 +19,30 @@
19 19
 
20 20
 package org.mariotaku.twidere.activity;
21 21
 
22  
-import org.mariotaku.actionbarcompat.ActionBar;
23 22
 import org.mariotaku.twidere.R;
24  
-import org.mariotaku.twidere.adapter.TabsAdapter;
25  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredKeywordsFragment;
26  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredSourcesFragment;
27  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredUsersFragment;
28  
-import org.mariotaku.twidere.view.ExtendedViewPager;
29  
-import org.mariotaku.twidere.view.TabPageIndicator;
  23
+import org.mariotaku.twidere.fragment.FiltersListFragment;
30 24
 
31 25
 import android.os.Bundle;
32  
-import android.view.Menu;
  26
+import android.support.v4.app.FragmentTransaction;
33 27
 import android.view.MenuItem;
34 28
 
35  
-public class FiltersActivity extends BaseActivity {
36  
-
37  
-	private ActionBar mActionBar;
38  
-
39  
-	private ExtendedViewPager mViewPager;
40  
-	private TabPageIndicator mIndicator;
41  
-
42  
-	private TabsAdapter mAdapter;
43  
-
44  
-	@Override
45  
-	public void onContentChanged() {
46  
-		super.onContentChanged();
47  
-		mViewPager = (ExtendedViewPager) findViewById(R.id.pager);
48  
-		mIndicator = (TabPageIndicator) findViewById(android.R.id.tabs);
49  
-	}
  29
+public class FiltersActivity extends BaseDialogWhenLargeActivity {
50 30
 
51 31
 	@Override
52 32
 	public void onCreate(final Bundle savedInstanceState) {
53 33
 		super.onCreate(savedInstanceState);
54  
-		setContentView(R.layout.filters);
55  
-		mActionBar = getSupportActionBar();
56  
-		if (mActionBar != null) {
57  
-			mActionBar.setDisplayHomeAsUpEnabled(true);
58  
-		}
59  
-		mAdapter = new TabsAdapter(this, getSupportFragmentManager(), mIndicator);
60  
-		mAdapter.addTab(FilteredUsersFragment.class, null, getString(R.string.users), null, 0);
61  
-		mAdapter.addTab(FilteredKeywordsFragment.class, null, getString(R.string.keywords), null, 1);
62  
-		mAdapter.addTab(FilteredSourcesFragment.class, null, getString(R.string.sources), null, 2);
63  
-		mViewPager.setAdapter(mAdapter);
64  
-		mIndicator.setViewPager(mViewPager);
65  
-		mIndicator.setDisplayLabel(true);
66  
-		mIndicator.setDisplayIcon(false);
67  
-	}
68  
-
69  
-	@Override
70  
-	public boolean onCreateOptionsMenu(final Menu menu) {
71  
-		getMenuInflater().inflate(R.menu.menu_filter, menu);
72  
-		return true;
  34
+		setContentView(R.layout.base_dialogwhenlarge);
  35
+		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  36
+		final FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
  37
+		ft.replace(R.id.main, new FiltersListFragment());
  38
+		ft.commit();
73 39
 	}
74 40
 
75 41
 	@Override
76 42
 	public boolean onOptionsItemSelected(final MenuItem item) {
77 43
 		switch (item.getItemId()) {
78 44
 			case MENU_HOME:
79  
-				finish();
  45
+				onBackPressed();
80 46
 				return true;
81 47
 		}
82 48
 		return false;
2  src/org/mariotaku/twidere/activity/HomeActivity.java
@@ -22,7 +22,6 @@
22 22
 import static org.mariotaku.twidere.util.Utils.cleanDatabasesByItemLimit;
23 23
 import static org.mariotaku.twidere.util.Utils.getAccountIds;
24 24
 import static org.mariotaku.twidere.util.Utils.getActivatedAccountIds;
25  
-import static org.mariotaku.twidere.util.Utils.getNewestMessageIdsFromDatabase;
26 25
 import static org.mariotaku.twidere.util.Utils.getTabs;
27 26
 import static org.mariotaku.twidere.util.Utils.openDirectMessagesConversation;
28 27
 
@@ -41,7 +40,6 @@
41 40
 import org.mariotaku.twidere.fragment.MentionsFragment;
42 41
 import org.mariotaku.twidere.model.TabSpec;
43 42
 import org.mariotaku.twidere.provider.TweetStore.Accounts;
44  
-import org.mariotaku.twidere.provider.TweetStore.DirectMessages.Inbox;
45 43
 import org.mariotaku.twidere.util.ArrayUtils;
46 44
 import org.mariotaku.twidere.util.ServiceInterface;
47 45
 import org.mariotaku.twidere.util.SetHomeButtonEnabledAccessor;
5  src/org/mariotaku/twidere/activity/HostMappingActivity.java
@@ -50,7 +50,8 @@
50 50
 import android.widget.TextView;
51 51
 import android.widget.Toast;
52 52
 
53  
-public class HostMappingActivity extends BaseActivity implements OnItemClickListener, OnItemLongClickListener {
  53
+public class HostMappingActivity extends BaseDialogWhenLargeActivity implements OnItemClickListener,
  54
+		OnItemLongClickListener {
54 55
 
55 56
 	private ListView mListView;
56 57
 	private HostMappingAdapter mAdapter;
@@ -62,7 +63,7 @@
62 63
 	public void onCreate(final Bundle savedInstanceState) {
63 64
 		super.onCreate(savedInstanceState);
64 65
 		mPreferences = getSharedPreferences(HOST_MAPPING_PREFERENCES_NAME, Context.MODE_PRIVATE);
65  
-		setContentView(R.layout.base_list);
  66
+		setContentView(R.layout.base_list_dialogwhenlarge);
66 67
 		getSupportActionBar().setDisplayHomeAsUpEnabled(true);
67 68
 		mAdapter = new HostMappingAdapter(this);
68 69
 		mListView = (ListView) findViewById(android.R.id.list);
73  src/org/mariotaku/twidere/activity/InternalFiltersActivity.java
... ...
@@ -1,73 +0,0 @@
1  
-/*
2  
- *				Twidere - Twitter client for Android
3  
- * 
4  
- * Copyright (C) 2012 Mariotaku Lee <mariotaku.lee@gmail.com>
5  
- *
6  
- * This program is free software: you can redistribute it and/or modify
7  
- * it under the terms of the GNU General Public License as published by
8  
- * the Free Software Foundation, either version 3 of the License, or
9  
- * (at your option) any later version.
10  
- *
11  
- * This program is distributed in the hope that it will be useful,
12  
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  
- * GNU General Public License for more details.
15  
- *
16  
- * You should have received a copy of the GNU General Public License
17  
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  
- */
19  
-
20  
-package org.mariotaku.twidere.activity;
21  
-
22  
-import org.mariotaku.twidere.R;
23  
-import org.mariotaku.twidere.adapter.TabsAdapter;
24  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredKeywordsFragment;
25  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredSourcesFragment;
26  
-import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredUsersFragment;
27  
-import org.mariotaku.twidere.view.ExtendedViewPager;
28  
-import org.mariotaku.twidere.view.TabPageIndicator;
29  
-
30  
-import android.os.Bundle;
31  
-import android.view.Menu;
32  
-import android.view.MenuItem;
33  
-import android.support.v4.app.FragmentActivity;
34  
-
35  
-public class InternalFiltersActivity extends FragmentActivity {
36  
-
37  
-	private ExtendedViewPager mViewPager;
38  
-	private TabPageIndicator mIndicator;
39  
-
40  
-	private TabsAdapter mAdapter;
41  
-
42  
-	@Override
43  
-	public void onContentChanged() {
44  
-		super.onContentChanged();
45  
-		mViewPager = (ExtendedViewPager) findViewById(R.id.pager);
46  
-		mIndicator = (TabPageIndicator) findViewById(android.R.id.tabs);
47  
-	}
48  
-
49  
-	@Override
50  
-	public void onCreate(final Bundle savedInstanceState) {
51  
-		super.onCreate(savedInstanceState);
52  
-		setContentView(R.layout.filters);
53  
-		mAdapter = new TabsAdapter(this, getSupportFragmentManager(), mIndicator);
54  
-		mAdapter.addTab(FilteredUsersFragment.class, null, getString(R.string.users), null, 0);
55  
-		mAdapter.addTab(FilteredKeywordsFragment.class, null, getString(R.string.keywords), null, 1);
56  
-		mAdapter.addTab(FilteredSourcesFragment.class, null, getString(R.string.sources), null, 2);
57  
-		mViewPager.setAdapter(mAdapter);
58  
-		mIndicator.setViewPager(mViewPager);
59  
-		mIndicator.setDisplayLabel(true);
60  
-		mIndicator.setDisplayIcon(false);
61  
-	}
62  
-
63  
-	@Override
64  
-	public boolean onCreateOptionsMenu(final Menu menu) {
65  
-		getMenuInflater().inflate(R.menu.menu_filter, menu);
66  
-		return true;
67  
-	}
68  
-
69  
-	@Override
70  
-	public boolean onOptionsItemSelected(final MenuItem item) {
71  
-		return false;
72  
-	}
73  
-}
13  src/org/mariotaku/twidere/activity/SettingsActivity.java
@@ -106,8 +106,7 @@ public boolean onPreferenceClick(final Preference preference) {
106 106
 		final int res_id;
107 107
 		if (KEY_CUSTOM_TABS.equals(key)) {
108 108
 			if (isDualPaneMode()) {
109  
-				final Fragment fragment = new CustomTabsFragment();
110  
-				showFragment(fragment, true);
  109
+				showFragment(new CustomTabsFragment());
111 110
 			} else {
112 111
 				final Intent intent = new Intent(INTENT_ACTION_CUSTOM_TABS);
113 112
 				intent.setPackage(getPackageName());
@@ -125,8 +124,7 @@ public boolean onPreferenceClick(final Preference preference) {
125 124
 			}
126 125
 		} else if (KEY_EXTENSIONS.equals(key)) {
127 126
 			if (isDualPaneMode()) {
128  
-				final Fragment fragment = new ExtensionsListFragment();
129  
-				showFragment(fragment, true);
  127
+				showFragment(new ExtensionsListFragment());
130 128
 			} else {
131 129
 				final Intent intent = new Intent(INTENT_ACTION_EXTENSIONS);
132 130
 				intent.setPackage(getPackageName());
@@ -135,8 +133,7 @@ public boolean onPreferenceClick(final Preference preference) {
135 133
 			return true;
136 134
 		} else if (KEY_FILTERS.equals(key)) {
137 135
 			if (isDualPaneMode()) {
138  
-				final Fragment fragment = new FiltersListFragment();
139  
-				showFragment(fragment, true);
  136
+				showFragment(new FiltersListFragment());
140 137
 			} else {
141 138
 				final Intent intent = new Intent(INTENT_ACTION_FILTERS);
142 139
 				intent.setClass(this, FiltersActivity.class);
@@ -186,4 +183,8 @@ public void onSharedPreferenceChanged(final SharedPreferences preferences, final
186 183
 		}
187 184
 	}
188 185
 
  186
+	void showFragment(final Fragment fragment) {
  187
+		showFragment(fragment, true);
  188
+	}
  189
+
189 190
 }
2  src/org/mariotaku/twidere/fragment/BaseFragment.java
@@ -57,7 +57,7 @@ public ContentResolver getContentResolver() {
57 57
 	}
58 58
 
59 59
 	public ServiceInterface getServiceInterface() {
60  
-		return getApplication().getServiceInterface();
  60
+		return getApplication() != null ? getApplication().getServiceInterface() : null;
61 61
 	}
62 62
 
63 63
 	public SharedPreferences getSharedPreferences(final String name, final int mode) {
5  src/org/mariotaku/twidere/fragment/CustomTabsFragment.java
@@ -164,7 +164,6 @@ public void onActivityResult(final int requestCode, final int resultCode, final
164 164
 	@Override
165 165
 	public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
166 166
 		inflater.inflate(R.menu.menu_custom_tabs, menu);
167  
-		super.onCreateOptionsMenu(menu, inflater);
168 167
 	}
169 168
 
170 169
 	@Override
@@ -294,10 +293,10 @@ public boolean onOptionsItemSelected(final MenuItem item) {
294 293
 				intent.setPackage(getActivity().getPackageName());
295 294
 				intent.putExtras(extras);
296 295
 				startActivityForResult(intent, REQUEST_ADD_TAB);
297  
-				break;
  296
+				return true;
298 297
 			}
299 298
 		}
300  
-		return super.onOptionsItemSelected(item);
  299
+		return false;
301 300
 	}
302 301
 
303 302
 	@Override
54  src/org/mariotaku/twidere/fragment/FiltersListFragment.java
@@ -19,21 +19,67 @@
19 19
 
20 20
 package org.mariotaku.twidere.fragment;
21 21
 
22  
-import org.mariotaku.twidere.activity.InternalFiltersActivity;
  22
+import org.mariotaku.twidere.R;
  23
+import org.mariotaku.twidere.adapter.TabsAdapter;
  24
+import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredKeywordsFragment;
  25
+import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredSourcesFragment;
  26
+import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredUsersFragment;
23 27
 import org.mariotaku.twidere.model.Panes;
  28
+import org.mariotaku.twidere.view.ExtendedViewPager;
  29
+import org.mariotaku.twidere.view.TabPageIndicator;
24 30
 
25 31
 import android.os.Bundle;
  32
+import android.os.Handler;
  33
+import android.view.LayoutInflater;
  34
+import android.view.Menu;
  35
+import android.view.MenuInflater;
  36
+import android.view.MenuItem;
  37
+import android.view.View;
  38
+import android.view.ViewGroup;
26 39
 
27  
-public class FiltersListFragment extends ActivityHostFragment<InternalFiltersActivity> implements Panes.Right {
  40
+public class FiltersListFragment extends BaseFragment implements Panes.Right {
  41
+
  42
+	private ExtendedViewPager mViewPager;
  43
+	private TabPageIndicator mIndicator;
  44
+
  45
+	private TabsAdapter mAdapter;
28 46
 
29 47
 	@Override
30 48
 	public void onActivityCreated(final Bundle savedInstanceState) {
31 49
 		super.onActivityCreated(savedInstanceState);
32 50
 		setHasOptionsMenu(true);
  51
+		new Handler().post(new Runnable() {
  52
+
  53
+			@Override
  54
+			public void run() {
  55
+				mAdapter = new TabsAdapter(getActivity(), getFragmentManager(), mIndicator);
  56
+				mAdapter.addTab(FilteredUsersFragment.class, null, getString(R.string.users), null, 0);
  57
+				mAdapter.addTab(FilteredKeywordsFragment.class, null, getString(R.string.keywords), null, 1);
  58
+				mAdapter.addTab(FilteredSourcesFragment.class, null, getString(R.string.sources), null, 2);
  59
+				mViewPager.setAdapter(mAdapter);
  60
+				mIndicator.setViewPager(mViewPager);
  61
+				mIndicator.setDisplayLabel(true);
  62
+				mIndicator.setDisplayIcon(false);
  63
+			}
  64
+
  65
+		});
  66
+	}
  67
+
  68
+	@Override
  69
+	public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
  70
+		inflater.inflate(R.menu.menu_filter, menu);
  71
+	}
  72
+
  73
+	@Override
  74
+	public View onCreateView(final LayoutInflater inflater, final ViewGroup parent, final Bundle savedInstanceState) {
  75
+		final View view = inflater.inflate(R.layout.filters, null);
  76
+		mViewPager = (ExtendedViewPager) view.findViewById(R.id.pager);
  77
+		mIndicator = (TabPageIndicator) view.findViewById(android.R.id.tabs);
  78
+		return view;
33 79
 	}
34 80
 
35 81
 	@Override
36  
-	protected Class<InternalFiltersActivity> getActivityClass() {
37  
-		return InternalFiltersActivity.class;
  82
+	public boolean onOptionsItemSelected(final MenuItem item) {
  83
+		return false;
38 84
 	}
39 85
 }
32  src/org/mariotaku/twidere/service/TwidereService.java
@@ -109,11 +109,8 @@
109 109
 	private ContentResolver mResolver;
110 110
 
111 111
 	private int mGetHomeTimelineTaskId, mGetMentionsTaskId;
112  
-	private int mStoreStatusesTaskId, mStoreMentionsTaskId;
113 112
 	private int mGetReceivedDirectMessagesTaskId, mGetSentDirectMessagesTaskId;
114  
-	private int mStoreReceivedDirectMessagesTaskId, mStoreSentDirectMessagesTaskId;
115 113
 	private int mGetLocalTrendsTaskId;
116  
-	private int mStoreLocalTrendsTaskId;
117 114
 
118 115
 	private boolean mShouldShutdown = false;
119 116
 	private boolean mBatteryLow = false;
@@ -285,8 +282,8 @@ public boolean isHomeTimelineRefreshing() {
285 282
 	}
286 283