mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-16 19:50:53 +01:00
theme fixes
This commit is contained in:
parent
c9806ef363
commit
a160204fac
@ -148,6 +148,8 @@ public class ParcelableAccount implements Parcelable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// Dummy account
|
||||
if (account_key == null) return 0;
|
||||
return account_key.hashCode();
|
||||
}
|
||||
|
||||
|
@ -80,10 +80,10 @@ dependencies {
|
||||
apt 'com.google.dagger:dagger-compiler:2.1'
|
||||
apt "com.github.mariotaku.ObjectCursor:processor:0.9.6"
|
||||
|
||||
compile('com.github.afollestad.app-theme-engine:library:1.0.2-SNAPSHOT@aar') {
|
||||
compile('com.github.mariotaku:app-theme-engine:1efc6237e1@aar') {
|
||||
transitive = true
|
||||
}
|
||||
compile('com.github.afollestad.material-dialogs:commons:0.8.5.8-SNAPSHOT@aar') {
|
||||
compile('com.github.mariotaku.material-dialogs:commons:bf2f2c5c57@aar') {
|
||||
transitive = true
|
||||
}
|
||||
// compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.7'
|
||||
@ -136,7 +136,6 @@ dependencies {
|
||||
compile 'org.apache.commons:commons-lang3:3.4'
|
||||
compile 'commons-primitives:commons-primitives:1.0'
|
||||
compile 'com.bluelinelabs:logansquare:1.3.7'
|
||||
compile 'com.makeramen:roundedimageview:2.1.1'
|
||||
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
|
||||
compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'
|
||||
compile 'com.github.mariotaku:PickNCrop:0.9.3'
|
||||
|
1
twidere/proguard-rules.pro
vendored
1
twidere/proguard-rules.pro
vendored
@ -23,6 +23,7 @@
|
||||
-dontwarn com.makeramen.roundedimageview.**
|
||||
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes EnclosingMethod
|
||||
|
||||
# https://github.com/bluelinelabs/LoganSquare
|
||||
-keep class com.bluelinelabs.logansquare.** { *; }
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.graphics.Point;
|
||||
import android.graphics.drawable.Drawable;
|
@ -22,7 +22,7 @@ package org.mariotaku.twidere.util;
|
||||
import android.content.Context;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import org.mariotaku.twidere.fragment.support.OpenStreetMapViewerFragment;
|
||||
import org.mariotaku.twidere.fragment.OpenStreetMapViewerFragment;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 15/4/27.
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Rect;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
@ -25,8 +25,8 @@ import android.support.v4.app.Fragment;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
|
||||
import org.mariotaku.twidere.fragment.support.GoogleMapFragment;
|
||||
import org.mariotaku.twidere.fragment.support.WebMapFragment;
|
||||
import org.mariotaku.twidere.fragment.GoogleMapFragment;
|
||||
import org.mariotaku.twidere.fragment.WebMapFragment;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 15/4/27.
|
||||
|
@ -1,67 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.mariotaku.twidere"
|
||||
android:installLocation="auto" >
|
||||
<manifest package="org.mariotaku.twidere"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-sdk />
|
||||
<uses-sdk/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.location"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.location.gps"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.location.network"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.nfc"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
android:required="true" />
|
||||
android:required="true"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.SHORTEN_STATUS" />
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.UPLOAD_MEDIA" />
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.SYNC_TIMELINE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.SHORTEN_STATUS"/>
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.UPLOAD_MEDIA"/>
|
||||
<uses-permission android:name="org.mariotaku.twidere.permission.SYNC_TIMELINE"/>
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_PHONE_STATE"
|
||||
tools:node="remove" />
|
||||
tools:node="remove"/>
|
||||
|
||||
<permission-group
|
||||
android:name="org.mariotaku.twidere.permission.PERMISSION_GROUP"
|
||||
android:label="@string/app_name" />
|
||||
android:label="@string/app_name"/>
|
||||
|
||||
<permission
|
||||
android:name="org.mariotaku.twidere.permission.SHORTEN_STATUS"
|
||||
android:description="@string/permission_description_shorten_status"
|
||||
android:label="@string/permission_label_shorten_status"
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP" />
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP"/>
|
||||
<permission
|
||||
android:name="org.mariotaku.twidere.permission.UPLOAD_MEDIA"
|
||||
android:description="@string/permission_description_upload_media"
|
||||
android:label="@string/permission_label_upload_media"
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP" />
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP"/>
|
||||
<permission
|
||||
android:name="org.mariotaku.twidere.permission.SYNC_TIMELINE"
|
||||
android:description="@string/permission_description_sync_timeline"
|
||||
android:label="@string/permission_label_sync_timeline"
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP" />
|
||||
android:permissionGroup="org.mariotaku.twidere.permission.PERMISSION_GROUP"/>
|
||||
|
||||
<application
|
||||
android:name=".app.TwidereApplication"
|
||||
@ -74,35 +74,35 @@
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"
|
||||
tools:ignore="UnusedAttribute" >
|
||||
tools:ignore="UnusedAttribute">
|
||||
<uses-library
|
||||
android:name="com.sec.android.app.multiwindow"
|
||||
android:required="false" />
|
||||
android:required="false"/>
|
||||
|
||||
<meta-data
|
||||
android:name="io.fabric.ApiKey"
|
||||
android:value="dc4ee756d3b705e00011782f1426fc8656ad3bd9" />
|
||||
android:value="dc4ee756d3b705e00011782f1426fc8656ad3bd9"/>
|
||||
<meta-data
|
||||
android:name="com.google.android.backup.api_key"
|
||||
android:value="AEdPqrEAAAAIKbKATV1AGbLB4kem3w8QaPVJSPVVumbMHxkfwA" />
|
||||
android:value="AEdPqrEAAAAIKbKATV1AGbLB4kem3w8QaPVJSPVVumbMHxkfwA"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.support.multiwindow"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
|
||||
android:value="480dp" />
|
||||
android:value="480dp"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
|
||||
android:value="640dp" />
|
||||
android:value="640dp"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
|
||||
android:value="240dp" />
|
||||
android:value="240dp"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
|
||||
android:value="320dp" />
|
||||
android:value="320dp"/>
|
||||
<meta-data
|
||||
android:name="override_tinted_status_bar_defaults"
|
||||
android:value="true" />
|
||||
android:value="true"/>
|
||||
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
@ -110,13 +110,13 @@
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"
|
||||
android:windowSoftInputMode="adjustNothing" >
|
||||
android:windowSoftInputMode="adjustNothing">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -126,13 +126,13 @@
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -140,24 +140,24 @@
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.HOME" />
|
||||
<action android:name="org.mariotaku.twidere.HOME"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
<action android:name="android.intent.action.SEARCH"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
android:resource="@xml/searchable"/>
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value=".activity.support.HomeActivity" />
|
||||
android:value=".activity.support.HomeActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.ComposeActivity"
|
||||
@ -166,64 +166,64 @@
|
||||
android:launchMode="singleTop"
|
||||
android:parentActivityName=".activity.HomeActivity"
|
||||
android:theme="@style/Theme.Twidere.Compose"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
<intent-filter android:label="@string/compose" >
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="org.mariotaku.twidere.COMPOSE" />
|
||||
<action android:name="org.mariotaku.twidere.REPLY" />
|
||||
<action android:name="org.mariotaku.twidere.QUOTE" />
|
||||
<action android:name="org.mariotaku.twidere.EDIT_DRAFT" />
|
||||
<action android:name="org.mariotaku.twidere.MENTION" />
|
||||
<action android:name="org.mariotaku.twidere.REPLY_MULTIPLE" />
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter android:label="@string/compose">
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<action android:name="org.mariotaku.twidere.COMPOSE"/>
|
||||
<action android:name="org.mariotaku.twidere.REPLY"/>
|
||||
<action android:name="org.mariotaku.twidere.QUOTE"/>
|
||||
<action android:name="org.mariotaku.twidere.EDIT_DRAFT"/>
|
||||
<action android:name="org.mariotaku.twidere.MENTION"/>
|
||||
<action android:name="org.mariotaku.twidere.REPLY_MULTIPLE"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
<intent-filter android:label="@string/app_name" >
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.SEND"/>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="text/plain" />
|
||||
<data android:mimeType="image/*"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activity.HomeActivity" />
|
||||
android:value=".activity.HomeActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.QuickSearchBarActivity"
|
||||
android:label="@string/search"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Twidere.QuickSearchBar"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.GLOBAL_SEARCH" />
|
||||
<action android:name="org.mariotaku.twidere.GLOBAL_SEARCH"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.SignInActivity"
|
||||
android:label="@string/sign_in"
|
||||
android:theme="@style/Theme.Twidere"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.TWITTER_LOGIN" />
|
||||
<action android:name="org.mariotaku.twidere.TWITTER_LOGIN"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.BrowserSignInActivity"
|
||||
android:label="@string/browser_sign_in"
|
||||
android:theme="@style/Theme.Twidere"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.TWITTER_BROWSER_LOGIN" />
|
||||
<action android:name="org.mariotaku.twidere.TWITTER_BROWSER_LOGIN"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -231,53 +231,53 @@
|
||||
android:label="@string/settings"
|
||||
android:parentActivityName=".activity.HomeActivity"
|
||||
android:theme="@style/Theme.Twidere"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
|
||||
<action android:name="org.mariotaku.twidere.SETTINGS" />
|
||||
<action android:name="android.intent.action.MANAGE_NETWORK_USAGE"/>
|
||||
<action android:name="org.mariotaku.twidere.SETTINGS"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activity.HomeActivity" />
|
||||
android:value=".activity.HomeActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.APIEditorActivity"
|
||||
android:label="@string/edit_api"
|
||||
android:theme="@style/Theme.Twidere.Dialog"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
<activity
|
||||
android:name=".activity.AccountSelectorActivity"
|
||||
android:label="@string/select_account"
|
||||
android:theme="@style/Theme.Twidere.Dialog" >
|
||||
android:theme="@style/Theme.Twidere.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.SELECT_ACCOUNT" />
|
||||
<action android:name="org.mariotaku.twidere.SELECT_ACCOUNT"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.ColorPickerDialogActivity"
|
||||
android:label="@string/set_color"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" />
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".activity.LinkHandlerActivity"
|
||||
android:parentActivityName=".activity.HomeActivity"
|
||||
android:theme="@style/Theme.Twidere"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activity.HomeActivity" />
|
||||
android:value=".activity.HomeActivity"/>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
|
||||
<data android:scheme="twidere" />
|
||||
<data android:scheme="twidere"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -285,20 +285,20 @@
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:label="@string/media"
|
||||
android:theme="@style/Theme.Twidere.Viewer"
|
||||
android:windowSoftInputMode="adjustPan" >
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activity.HomeActivity" />
|
||||
android:value=".activity.HomeActivity"/>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.VIEW_MEDIA" />
|
||||
<action android:name="org.mariotaku.twidere.VIEW_MEDIA"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data android:scheme="http" />
|
||||
<data android:scheme="https" />
|
||||
<data android:scheme="file" />
|
||||
<data android:scheme="http"/>
|
||||
<data android:scheme="https"/>
|
||||
<data android:scheme="file"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -306,25 +306,25 @@
|
||||
android:exported="false"
|
||||
android:label="@string/pick_file"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.PICK_FILE" />
|
||||
<action android:name="org.mariotaku.twidere.PICK_DIRECTORY" />
|
||||
<action android:name="org.mariotaku.twidere.PICK_FILE"/>
|
||||
<action android:name="org.mariotaku.twidere.PICK_DIRECTORY"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.ThemedImagePickerActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<action android:name="org.mariotaku.twidere.PICK_IMAGE" />
|
||||
<action android:name="org.mariotaku.twidere.TAKE_PHOTO" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<action android:name="org.mariotaku.twidere.PICK_IMAGE"/>
|
||||
<action android:name="org.mariotaku.twidere.TAKE_PHOTO"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -332,106 +332,106 @@
|
||||
android:exported="false"
|
||||
android:label="@string/add_tab"
|
||||
android:theme="@style/Theme.Twidere.Dialog"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.ADD_TAB" />
|
||||
<action android:name="org.mariotaku.twidere.EDIT_TAB" />
|
||||
<action android:name="org.mariotaku.twidere.ADD_TAB"/>
|
||||
<action android:name="org.mariotaku.twidere.EDIT_TAB"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.CreateComposeShortcutActivity"
|
||||
android:label="@string/compose"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" >
|
||||
android:theme="@style/Theme.Twidere.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CREATE_SHORTCUT" />
|
||||
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.CopyLinkActivity"
|
||||
android:label="@string/copy_link"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" />
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".activity.RequestPermissionsActivity"
|
||||
android:label="@string/permissions_request"
|
||||
android:theme="@style/Theme.Twidere.Dialog" >
|
||||
android:theme="@style/Theme.Twidere.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.REQUEST_PERMISSIONS" />
|
||||
<action android:name="org.mariotaku.twidere.REQUEST_PERMISSIONS"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.UserListSelectorActivity"
|
||||
android:label="@string/select_user_list"
|
||||
android:theme="@style/Theme.Twidere.Dialog" >
|
||||
android:theme="@style/Theme.Twidere.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.SELECT_USER" />
|
||||
<action android:name="org.mariotaku.twidere.SELECT_USER_LIST" />
|
||||
<action android:name="org.mariotaku.twidere.SELECT_USER"/>
|
||||
<action android:name="org.mariotaku.twidere.SELECT_USER_LIST"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.SettingsWizardActivity"
|
||||
android:label="@string/settings_wizard"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar" />
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"/>
|
||||
<activity
|
||||
android:name=".activity.DataExportActivity"
|
||||
android:label="@string/export_settings"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" />
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".activity.DataImportActivity"
|
||||
android:label="@string/import_settings"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" />
|
||||
android:theme="@style/Theme.Twidere.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".activity.ActivityPickerActivity"
|
||||
android:theme="@style/Theme.Twidere.Dialog" >
|
||||
android:theme="@style/Theme.Twidere.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.PICK_ACTIVITY" />
|
||||
<action android:name="org.mariotaku.twidere.PICK_ACTIVITY"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.TwitterLinkHandlerActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:taskAffinity=":twidere_twitter_link_handler"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" >
|
||||
android:theme="@style/Theme.Twidere.NoDisplay">
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="http" />
|
||||
android:scheme="http"/>
|
||||
<data
|
||||
android:host="twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="https" />
|
||||
android:scheme="https"/>
|
||||
<data
|
||||
android:host="www.twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="http" />
|
||||
android:scheme="http"/>
|
||||
<data
|
||||
android:host="www.twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="https" />
|
||||
android:scheme="https"/>
|
||||
<data
|
||||
android:host="mobile.twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="http" />
|
||||
android:scheme="http"/>
|
||||
<data
|
||||
android:host="mobile.twitter.com"
|
||||
android:pathPrefix="/"
|
||||
android:scheme="https" />
|
||||
android:scheme="https"/>
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
@ -439,56 +439,50 @@
|
||||
android:enabled="false"
|
||||
android:excludeFromRecents="true"
|
||||
android:taskAffinity=":twidere_assist_launcher"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" >
|
||||
android:theme="@style/Theme.Twidere.NoDisplay">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.ASSIST" />
|
||||
<action android:name="android.intent.action.ASSIST"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="com.android.systemui.action_assist_icon"
|
||||
android:resource="@drawable/ic_assist_twidere" />
|
||||
android:resource="@drawable/ic_assist_twidere"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.KeyboardShortcutPreferenceCompatActivity"
|
||||
android:theme="@style/Theme.Twidere.Dialog" />
|
||||
android:theme="@style/Theme.Twidere.Dialog"/>
|
||||
<activity
|
||||
android:name=".activity.TestActivity"
|
||||
android:enabled="false"
|
||||
android:label="Twidere test"
|
||||
android:name=".activity.HiddenSettingsActivity"
|
||||
android:label="@string/hidden_settings"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustResize" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
android:theme="@style/Theme.Twidere"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
<activity
|
||||
android:name=".activity.NyanActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Nyan"
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
android:windowSoftInputMode="stateAlwaysHidden"/>
|
||||
<activity
|
||||
android:name=".activity.UsageStatisticsActivity"
|
||||
android:label="@string/usage_statistics"
|
||||
android:theme="@style/Theme.Twidere.NoDisplay" />
|
||||
android:theme="@style/Theme.Twidere"/>
|
||||
<activity
|
||||
android:name=".activity.ImageCropperActivity"
|
||||
android:label="@string/crop_image"
|
||||
android:theme="@style/Theme.Twidere.NoActionBar"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
|
||||
<service
|
||||
android:name=".service.RefreshService"
|
||||
android:label="@string/label_refresh_service" />
|
||||
android:label="@string/label_refresh_service"/>
|
||||
<service
|
||||
android:name=".service.StreamingService"
|
||||
android:label="@string/label_streaming_service" />
|
||||
android:label="@string/label_streaming_service"/>
|
||||
<service
|
||||
android:name=".service.BackgroundOperationService"
|
||||
android:label="@string/label_background_operation_service" />
|
||||
android:label="@string/label_background_operation_service"/>
|
||||
<service
|
||||
android:name=".nyan.NyanWallpaperService"
|
||||
android:enabled="false"
|
||||
@ -496,14 +490,14 @@
|
||||
android:icon="@drawable/nyan_sakamoto_thumbnail"
|
||||
android:label="@string/nyan_sakamoto"
|
||||
android:permission="android.permission.BIND_WALLPAPER"
|
||||
android:process=":wallpaper" >
|
||||
<intent-filter android:priority="1" >
|
||||
<action android:name="android.service.wallpaper.WallpaperService" />
|
||||
android:process=":wallpaper">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.service.wallpaper.WallpaperService"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.service.wallpaper"
|
||||
android:resource="@xml/nyan_wallpaper" />
|
||||
android:resource="@xml/nyan_wallpaper"/>
|
||||
</service>
|
||||
<service
|
||||
android:name=".nyan.NyanDaydreamService"
|
||||
@ -512,12 +506,12 @@
|
||||
android:icon="@drawable/nyan_sakamoto_thumbnail"
|
||||
android:label="@string/nyan_sakamoto"
|
||||
android:process=":daydream"
|
||||
tools:ignore="ExportedService" >
|
||||
<intent-filter android:priority="1" >
|
||||
<action android:name="android.service.dreams.DreamService" />
|
||||
tools:ignore="ExportedService">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.service.dreams.DreamService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="edu.tsinghua.hotmobi.UploadLogsService" />
|
||||
<service android:name="edu.tsinghua.hotmobi.UploadLogsService"/>
|
||||
|
||||
<provider
|
||||
android:name=".provider.TwidereDataProvider"
|
||||
@ -525,54 +519,54 @@
|
||||
android:exported="true"
|
||||
android:grantUriPermissions="true"
|
||||
android:label="@string/label_data_provider"
|
||||
tools:ignore="ExportedContentProvider" />
|
||||
tools:ignore="ExportedContentProvider"/>
|
||||
<provider
|
||||
android:name=".provider.RecentSearchProvider"
|
||||
android:authorities="org.mariotaku.twidere.provider.SearchRecentSuggestions"
|
||||
tools:ignore="ExportedContentProvider" />
|
||||
tools:ignore="ExportedContentProvider"/>
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="twidere.file"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" >
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
android:resource="@xml/file_paths"/>
|
||||
</provider>
|
||||
<provider
|
||||
android:name=".provider.CacheProvider"
|
||||
android:authorities="twidere.cache"
|
||||
android:exported="false" />
|
||||
android:exported="false"/>
|
||||
|
||||
<receiver android:name=".receiver.ConnectivityStateReceiver" >
|
||||
<receiver android:name=".receiver.ConnectivityStateReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".receiver.NotificationReceiver"
|
||||
android:exported="false" >
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.NOTIFICATION_DELETED" />
|
||||
<action android:name="org.mariotaku.twidere.NOTIFICATION_DELETED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".receiver.SecretCodeBroadcastReceiver"
|
||||
android:label="@string/twidere_test" >
|
||||
android:label="@string/twidere_test">
|
||||
<intent-filter>
|
||||
<action android:name="android.provider.Telephony.SECRET_CODE" />
|
||||
<action android:name="android.provider.Telephony.SECRET_CODE"/>
|
||||
|
||||
<data
|
||||
android:host="8943373"
|
||||
android:scheme="android_secret_code" />
|
||||
android:scheme="android_secret_code"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receiver.PowerStateReceiver" >
|
||||
<receiver android:name=".receiver.PowerStateReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BATTERY_LOW" />
|
||||
<action android:name="android.intent.action.BATTERY_OKAY" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
|
||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
|
||||
<action android:name="android.intent.action.BATTERY_LOW"/>
|
||||
<action android:name="android.intent.action.BATTERY_OKAY"/>
|
||||
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
|
||||
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
@ -65,7 +65,11 @@ public class TwidereActionMenuItemView extends ActionMenuItemView implements Vie
|
||||
@Override
|
||||
public void setIcon(Drawable icon) {
|
||||
invalidateTintColor();
|
||||
mIcon = TintHelper.createTintedDrawable(icon, mTintColor);
|
||||
if (icon instanceof IgnoreTinting) {
|
||||
mIcon = icon;
|
||||
} else {
|
||||
mIcon = TintHelper.createTintedDrawable(icon, mTintColor);
|
||||
}
|
||||
super.setIcon(mIcon);
|
||||
invalidateActionView();
|
||||
}
|
||||
@ -104,4 +108,8 @@ public class TwidereActionMenuItemView extends ActionMenuItemView implements Vie
|
||||
public boolean setsToolbarColor() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public interface IgnoreTinting {
|
||||
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import com.bluelinelabs.logansquare.annotation.JsonObject;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelableThisPlease;
|
||||
|
||||
import org.mariotaku.twidere.fragment.support.UserFragment;
|
||||
import org.mariotaku.twidere.fragment.UserFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ import android.widget.RadioGroup.OnCheckedChangeListener;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.model.CustomAPIConfig;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.Accounts;
|
||||
@ -49,7 +49,7 @@ import org.mariotaku.twidere.util.TwitterAPIFactory;
|
||||
import static org.mariotaku.twidere.util.Utils.getNonEmptyString;
|
||||
import static org.mariotaku.twidere.util.Utils.trim;
|
||||
|
||||
public class APIEditorActivity extends BaseSupportDialogActivity implements OnCheckedChangeListener,
|
||||
public class APIEditorActivity extends BaseActivity implements OnCheckedChangeListener,
|
||||
OnClickListener, CompoundButton.OnCheckedChangeListener {
|
||||
|
||||
private EditText mEditAPIUrlFormat;
|
||||
|
@ -42,8 +42,8 @@ import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.Accounts;
|
||||
|
||||
public class AccountSelectorActivity extends BaseSupportDialogActivity implements LoaderCallbacks<Cursor>,
|
||||
OnClickListener, OnItemClickListener {
|
||||
public class AccountSelectorActivity extends BaseActivity implements
|
||||
LoaderCallbacks<Cursor>, OnClickListener, OnItemClickListener {
|
||||
|
||||
private final ContentObserver mContentObserver = new ContentObserver(null) {
|
||||
|
||||
|
@ -16,8 +16,8 @@ import org.mariotaku.twidere.loader.IntentActivitiesLoader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityPickerActivity extends BaseSupportDialogActivity implements LoaderCallbacks<List<ResolveInfo>>,
|
||||
OnItemClickListener {
|
||||
public class ActivityPickerActivity extends BaseActivity implements
|
||||
LoaderCallbacks<List<ResolveInfo>>, OnItemClickListener {
|
||||
|
||||
private ResolveInfoListAdapter mAdapter;
|
||||
|
||||
|
@ -20,39 +20,66 @@
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback;
|
||||
import android.support.v7.view.menu.ActionMenuItemView;
|
||||
import android.support.v7.widget.TwidereActionMenuView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import com.afollestad.appthemeengine.ATEActivity;
|
||||
import com.squareup.otto.Bus;
|
||||
|
||||
import org.mariotaku.twidere.BuildConfig;
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.activity.iface.IAppCompatActivity;
|
||||
import org.mariotaku.twidere.activity.iface.IControlBarActivity;
|
||||
import org.mariotaku.twidere.activity.iface.IExtendedActivity;
|
||||
import org.mariotaku.twidere.activity.iface.IThemedActivity;
|
||||
import org.mariotaku.twidere.fragment.iface.IBaseFragment.SystemWindowsInsetsCallback;
|
||||
import org.mariotaku.twidere.preference.iface.IDialogPreference;
|
||||
import org.mariotaku.twidere.util.AsyncTwitterWrapper;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler.KeyboardShortcutCallback;
|
||||
import org.mariotaku.twidere.util.MediaLoaderWrapper;
|
||||
import org.mariotaku.twidere.util.NotificationManagerWrapper;
|
||||
import org.mariotaku.twidere.util.PermissionsManager;
|
||||
import org.mariotaku.twidere.util.ReadStateManager;
|
||||
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
|
||||
import org.mariotaku.twidere.util.StrictModeUtils;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.util.UserColorNameManager;
|
||||
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
|
||||
import org.mariotaku.twidere.view.iface.IExtendedView.OnFitSystemWindowsListener;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@SuppressLint("Registered")
|
||||
public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Constants,
|
||||
OnFitSystemWindowsListener, SystemWindowsInsetsCallback, IControlBarActivity,
|
||||
KeyboardShortcutCallback, IExtendedActivity {
|
||||
public class BaseActivity extends ATEActivity implements Constants, IExtendedActivity,
|
||||
IThemedActivity, IAppCompatActivity, IControlBarActivity, OnFitSystemWindowsListener,
|
||||
SystemWindowsInsetsCallback, KeyboardShortcutCallback, OnPreferenceDisplayDialogCallback {
|
||||
|
||||
private static final String[] sClassPrefixList = {
|
||||
"android.widget.",
|
||||
"android.view.",
|
||||
"android.webkit."
|
||||
};
|
||||
// Utility classes
|
||||
@Inject
|
||||
protected KeyboardShortcutsHandler mKeyboardShortcutsHandler;
|
||||
@ -70,6 +97,8 @@ public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Co
|
||||
protected MediaLoaderWrapper mMediaLoader;
|
||||
@Inject
|
||||
protected UserColorNameManager mUserColorNameManager;
|
||||
@Inject
|
||||
protected PermissionsManager mPermissionsManager;
|
||||
|
||||
private ActionHelper mActionHelper = new ActionHelper(this);
|
||||
|
||||
@ -79,6 +108,10 @@ public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Co
|
||||
// Data fields
|
||||
private Rect mSystemWindowsInsets;
|
||||
private int mKeyMetaState;
|
||||
// Data fields
|
||||
private int mCurrentThemeColor;
|
||||
private int mCurrentThemeBackgroundAlpha;
|
||||
private String mCurrentThemeBackgroundOption;
|
||||
|
||||
@Override
|
||||
public boolean getSystemWindowsInsets(Rect insets) {
|
||||
@ -87,11 +120,6 @@ public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Co
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getUserAccentColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFitSystemWindows(Rect insets) {
|
||||
if (mSystemWindowsInsets == null)
|
||||
@ -147,6 +175,10 @@ public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Co
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
StrictModeUtils.detectAllVmPolicy();
|
||||
StrictModeUtils.detectAllThreadPolicy();
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
GeneralComponentHelper.build(this).inject(this);
|
||||
}
|
||||
@ -215,4 +247,128 @@ public class BaseAppCompatActivity extends ThemedAppCompatActivity implements Co
|
||||
mActionHelper.executeAfterFragmentResumed(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeBackgroundAlpha() {
|
||||
return mCurrentThemeBackgroundAlpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentThemeBackgroundOption() {
|
||||
return mCurrentThemeBackgroundOption;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeColor() {
|
||||
return mCurrentThemeColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeBackgroundAlpha() {
|
||||
return ThemeUtils.getUserThemeBackgroundAlpha(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeBackgroundOption() {
|
||||
return ThemeUtils.getThemeBackgroundOption(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getATEKey() {
|
||||
return ThemeUtils.getATEKey(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyThemeResource(@NonNull Resources.Theme theme, int resId, boolean first) {
|
||||
mCurrentThemeBackgroundAlpha = getThemeBackgroundAlpha();
|
||||
mCurrentThemeBackgroundOption = getThemeBackgroundOption();
|
||||
super.onApplyThemeResource(theme, resId, first);
|
||||
final Window window = getWindow();
|
||||
if (shouldApplyWindowBackground()) {
|
||||
ThemeUtils.applyWindowBackground(this, window, mCurrentThemeBackgroundOption,
|
||||
mCurrentThemeBackgroundAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
ThemeUtils.fixNightMode(getResources(), newConfig);
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
protected boolean shouldApplyWindowBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
|
||||
// Fix for https://github.com/afollestad/app-theme-engine/issues/109
|
||||
if (context != this) {
|
||||
final AppCompatDelegate delegate = getDelegate();
|
||||
View view = delegate.createView(parent, name, context, attrs);
|
||||
if (view == null) {
|
||||
view = newInstance(name, context, attrs);
|
||||
}
|
||||
if (view == null) {
|
||||
view = newInstance(name, context, attrs);
|
||||
}
|
||||
if (view != null) {
|
||||
return view;
|
||||
}
|
||||
}
|
||||
if (parent instanceof TwidereActionMenuView) {
|
||||
final Class<?> cls = findClass(name);
|
||||
if (cls != null && ActionMenuItemView.class.isAssignableFrom(cls)) {
|
||||
return ((TwidereActionMenuView) parent).createActionMenuView(context, attrs);
|
||||
}
|
||||
}
|
||||
return super.onCreateView(parent, name, context, attrs);
|
||||
}
|
||||
|
||||
private Class<?> findClass(String name) {
|
||||
Class<?> cls = null;
|
||||
try {
|
||||
cls = Class.forName(name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Ignore
|
||||
}
|
||||
if (cls != null) return cls;
|
||||
for (String prefix : sClassPrefixList) {
|
||||
try {
|
||||
cls = Class.forName(prefix + name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Ignore
|
||||
}
|
||||
if (cls != null) return cls;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private View newInstance(String name, Context context, AttributeSet attrs) {
|
||||
try {
|
||||
final Class<?> cls = findClass(name);
|
||||
if (cls == null) throw new ClassNotFoundException(name);
|
||||
final Constructor<?> constructor = cls.getConstructor(Context.class, AttributeSet.class);
|
||||
return (View) constructor.newInstance(context, attrs);
|
||||
} catch (InstantiationException e) {
|
||||
return null;
|
||||
} catch (IllegalAccessException e) {
|
||||
return null;
|
||||
} catch (InvocationTargetException e) {
|
||||
return null;
|
||||
} catch (NoSuchMethodException e) {
|
||||
return null;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceDisplayDialog(PreferenceFragmentCompat fragment, Preference preference) {
|
||||
if (preference instanceof IDialogPreference) {
|
||||
((IDialogPreference) preference).displayDialog(fragment);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatCallback;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.activity.ThemedFragmentActivity;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
@SuppressLint("Registered")
|
||||
public class BaseSupportDialogActivity extends ThemedFragmentActivity implements Constants,
|
||||
AppCompatCallback {
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getThemeColor(this);
|
||||
}
|
||||
|
||||
private AppCompatDelegate mDelegate;
|
||||
|
||||
/**
|
||||
* Notifies the Activity that a support action mode has been started.
|
||||
* Activity subclasses overriding this method should call the superclass implementation.
|
||||
*
|
||||
* @param mode The new action mode.
|
||||
*/
|
||||
@Override
|
||||
public void onSupportActionModeStarted(ActionMode mode) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies the activity that a support action mode has finished.
|
||||
* Activity subclasses overriding this method should call the superclass implementation.
|
||||
*
|
||||
* @param mode The action mode that just finished.
|
||||
*/
|
||||
@Override
|
||||
public void onSupportActionModeFinished(ActionMode mode) {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ActionMode onWindowStartingSupportActionMode(ActionMode.Callback callback) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean supportRequestWindowFeature(int featureId) {
|
||||
return getDelegate().requestWindowFeature(featureId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceState);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
getDelegate().onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
getDelegate().onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getDelegate().onPostCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostResume() {
|
||||
super.onPostResume();
|
||||
getDelegate().onPostResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
getDelegate().onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(@LayoutRes int layoutResID) {
|
||||
getDelegate().setContentView(layoutResID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
getDelegate().setContentView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().setContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().addContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateOptionsMenu() {
|
||||
getDelegate().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MenuInflater getMenuInflater() {
|
||||
return getDelegate().getMenuInflater();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTitleChanged(CharSequence title, int color) {
|
||||
super.onTitleChanged(title, color);
|
||||
getDelegate().setTitle(title);
|
||||
}
|
||||
|
||||
public AppCompatDelegate getDelegate() {
|
||||
if (mDelegate == null) {
|
||||
mDelegate = AppCompatDelegate.create(this, this);
|
||||
}
|
||||
return mDelegate;
|
||||
}
|
||||
}
|
@ -54,7 +54,7 @@ import java.util.Set;
|
||||
import static android.text.TextUtils.isEmpty;
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
public class BrowserSignInActivity extends BaseAppCompatActivity {
|
||||
public class BrowserSignInActivity extends BaseActivity {
|
||||
|
||||
private static final String INJECT_CONTENT = "javascript:window.injector.processHTML('<head>'+document.getElementsByTagName('html')[0].innerHTML+'</head>');";
|
||||
|
||||
|
@ -23,11 +23,10 @@ import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.mariotaku.twidere.activity.BaseSupportDialogActivity;
|
||||
import org.mariotaku.twidere.fragment.support.ColorPickerDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.ColorPickerDialogFragment.Callback;
|
||||
import org.mariotaku.twidere.fragment.ColorPickerDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.ColorPickerDialogFragment.Callback;
|
||||
|
||||
public class ColorPickerDialogActivity extends BaseSupportDialogActivity implements Callback {
|
||||
public class ColorPickerDialogActivity extends BaseActivity implements Callback {
|
||||
|
||||
public static final int RESULT_CLEARED = -2;
|
||||
|
||||
|
@ -106,8 +106,8 @@ import org.mariotaku.twidere.BuildConfig;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.ArrayRecyclerAdapter;
|
||||
import org.mariotaku.twidere.adapter.BaseRecyclerViewAdapter;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.model.ConsumerKeyType;
|
||||
import org.mariotaku.twidere.model.Draft;
|
||||
import org.mariotaku.twidere.model.DraftValuesCreator;
|
||||
@ -171,7 +171,7 @@ import java.util.TreeSet;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class ComposeActivity extends BaseAppCompatActivity implements OnMenuItemClickListener,
|
||||
public class ComposeActivity extends BaseActivity implements OnMenuItemClickListener,
|
||||
OnClickListener, OnLongClickListener, Callback, ATEToolbarCustomizer {
|
||||
|
||||
// Constants
|
||||
@ -230,11 +230,6 @@ public class ComposeActivity extends BaseAppCompatActivity implements OnMenuItem
|
||||
private LocationListener mLocationListener;
|
||||
private boolean mNameFirst;
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getUserAccentColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
|
||||
switch (requestCode) {
|
||||
|
@ -49,7 +49,7 @@ import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.AccountsSpinnerAdapter;
|
||||
import org.mariotaku.twidere.adapter.ArrayAdapter;
|
||||
import org.mariotaku.twidere.annotation.CustomTabType;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.model.CustomTabConfiguration;
|
||||
import org.mariotaku.twidere.model.CustomTabConfiguration.ExtraConfiguration;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
@ -79,7 +79,7 @@ import static org.mariotaku.twidere.util.CustomTabUtils.getIconMap;
|
||||
import static org.mariotaku.twidere.util.CustomTabUtils.getTabConfiguration;
|
||||
import static org.mariotaku.twidere.util.CustomTabUtils.getTabTypeName;
|
||||
|
||||
public class CustomTabEditorActivity extends BaseSupportDialogActivity implements OnClickListener {
|
||||
public class CustomTabEditorActivity extends BaseActivity implements OnClickListener {
|
||||
|
||||
private SharedPreferences mPreferences;
|
||||
|
||||
@ -238,7 +238,7 @@ public class CustomTabEditorActivity extends BaseSupportDialogActivity implement
|
||||
text1.setText(mUserColorNameManager.getUserNickname(user.key, user.name, false));
|
||||
text2.setText(String.format("@%s", user.screen_name));
|
||||
if (displayProfileImage) {
|
||||
mImageLoader.displayProfileImage(icon, user);
|
||||
mMediaLoader.displayProfileImage(icon, user);
|
||||
}
|
||||
} else if (value instanceof ParcelableUserList) {
|
||||
final ParcelableUserList userList = (ParcelableUserList) value;
|
||||
@ -246,7 +246,7 @@ public class CustomTabEditorActivity extends BaseSupportDialogActivity implement
|
||||
text1.setText(userList.name);
|
||||
text2.setText(getString(R.string.created_by, createdBy));
|
||||
if (displayProfileImage) {
|
||||
mImageLoader.displayProfileImage(icon, userList.user_profile_image_url);
|
||||
mMediaLoader.displayProfileImage(icon, userList.user_profile_image_url);
|
||||
}
|
||||
} else if (value instanceof CharSequence) {
|
||||
text2.setVisibility(View.GONE);
|
||||
|
@ -8,8 +8,8 @@ import android.support.v4.app.FragmentManager;
|
||||
import android.util.Log;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.support.DataExportImportTypeSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.DataExportImportTypeSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.util.DataImportExportUtils;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
@ -19,16 +19,12 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class DataExportActivity extends ThemedFragmentActivity implements DataExportImportTypeSelectorDialogFragment.Callback {
|
||||
public class DataExportActivity extends BaseActivity implements
|
||||
DataExportImportTypeSelectorDialogFragment.Callback {
|
||||
|
||||
private ExportSettingsTask mTask;
|
||||
private Runnable mResumeFragmentsRunnable;
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getThemeColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(DialogFragment df) {
|
||||
if (!isFinishing()) {
|
||||
|
@ -9,25 +9,21 @@ import android.support.v4.app.FragmentManager;
|
||||
import android.util.Log;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.support.DataExportImportTypeSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.DataExportImportTypeSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.util.DataImportExportUtils;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class DataImportActivity extends ThemedFragmentActivity implements DataExportImportTypeSelectorDialogFragment.Callback {
|
||||
public class DataImportActivity extends BaseActivity implements
|
||||
DataExportImportTypeSelectorDialogFragment.Callback {
|
||||
|
||||
private ImportSettingsTask mImportSettingsTask;
|
||||
private OpenImportTypeTask mOpenImportTypeTask;
|
||||
private Runnable mResumeFragmentsRunnable;
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getThemeColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(final DialogFragment df) {
|
||||
if (!isFinishing()) {
|
||||
|
@ -31,15 +31,15 @@ import android.support.v4.app.DialogFragment;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.BaseSupportDialogActivity;
|
||||
import org.mariotaku.twidere.fragment.support.FileSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.FileSelectorDialogFragment;
|
||||
import org.mariotaku.twidere.util.PermissionUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static android.os.Environment.getExternalStorageDirectory;
|
||||
|
||||
public class FileSelectorActivity extends BaseSupportDialogActivity implements FileSelectorDialogFragment.Callback {
|
||||
public class FileSelectorActivity extends BaseActivity implements
|
||||
FileSelectorDialogFragment.Callback {
|
||||
|
||||
|
||||
private Runnable mResumeFragmentsRunnable;
|
||||
|
@ -19,18 +19,27 @@
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.SettingsDetailsFragment;
|
||||
|
||||
public class TestActivity extends Activity implements Constants {
|
||||
public class HiddenSettingsActivity extends BaseActivity implements Constants {
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_test);
|
||||
final Bundle fragmentArgs = new Bundle();
|
||||
fragmentArgs.putInt(EXTRA_RESID, R.xml.preferences_hidden);
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
final FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.replace(android.R.id.content, Fragment.instantiate(this,
|
||||
SettingsDetailsFragment.class.getName(), fragmentArgs));
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
}
|
@ -43,6 +43,7 @@ import android.support.v4.view.ViewPager.OnPageChangeListener;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v4.widget.DrawerLayoutAccessor;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.SparseIntArray;
|
||||
import android.view.Gravity;
|
||||
@ -61,12 +62,12 @@ import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.SupportTabsAdapter;
|
||||
import org.mariotaku.twidere.annotation.CustomTabType;
|
||||
import org.mariotaku.twidere.annotation.ReadPositionTag;
|
||||
import org.mariotaku.twidere.fragment.AccountsDashboardFragment;
|
||||
import org.mariotaku.twidere.fragment.CustomTabsFragment;
|
||||
import org.mariotaku.twidere.fragment.DirectMessagesFragment;
|
||||
import org.mariotaku.twidere.fragment.TrendsSuggestionsFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.RefreshScrollTopInterface;
|
||||
import org.mariotaku.twidere.fragment.iface.SupportFragmentCallback;
|
||||
import org.mariotaku.twidere.fragment.support.AccountsDashboardFragment;
|
||||
import org.mariotaku.twidere.fragment.support.DirectMessagesFragment;
|
||||
import org.mariotaku.twidere.fragment.support.TrendsSuggestionsFragment;
|
||||
import org.mariotaku.twidere.graphic.EmptyDrawable;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
import org.mariotaku.twidere.model.SupportTabSpec;
|
||||
@ -97,7 +98,7 @@ import org.mariotaku.twidere.view.TabPagerIndicator;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class HomeActivity extends BaseAppCompatActivity implements OnClickListener, OnPageChangeListener,
|
||||
public class HomeActivity extends BaseActivity implements OnClickListener, OnPageChangeListener,
|
||||
SupportFragmentCallback, OnLongClickListener, DrawerLayout.DrawerListener {
|
||||
private final Handler mHandler = new Handler();
|
||||
|
||||
@ -330,6 +331,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
supportRequestWindowFeature(AppCompatDelegate.FEATURE_ACTION_MODE_OVERLAY);
|
||||
setContentView(R.layout.activity_home);
|
||||
|
||||
setSupportActionBar(mActionBar);
|
||||
|
@ -54,11 +54,6 @@ public class ImageCropperActivity extends CropImageActivity implements IThemedAc
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getUserAccentColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(final int layoutResID) {
|
||||
super.setContentView(R.layout.activity_image_cropper);
|
||||
@ -90,14 +85,8 @@ public class ImageCropperActivity extends CropImageActivity implements IThemedAc
|
||||
return ThemeUtils.getThemeBackgroundOption(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeFontFamily() {
|
||||
return ThemeUtils.getThemeFontFamily(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyThemeResource(@NonNull Resources.Theme theme, int resId, boolean first) {
|
||||
mCurrentThemeColor = getThemeColor();
|
||||
mCurrentThemeBackgroundAlpha = getThemeBackgroundAlpha();
|
||||
mCurrentThemeBackgroundOption = getThemeBackgroundOption();
|
||||
super.onApplyThemeResource(theme, resId, first);
|
||||
|
@ -32,12 +32,11 @@ import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler.KeyboardShortcutSpec;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Created by mariotaku on 15/4/20.
|
||||
*/
|
||||
public class KeyboardShortcutPreferenceCompatActivity extends BaseSupportDialogActivity implements
|
||||
public class KeyboardShortcutPreferenceCompatActivity extends BaseActivity implements
|
||||
Constants, OnClickListener {
|
||||
|
||||
public static final String EXTRA_CONTEXT_TAG = "context_tag";
|
||||
@ -54,11 +53,6 @@ public class KeyboardShortcutPreferenceCompatActivity extends BaseSupportDialogA
|
||||
return VALUE_THEME_BACKGROUND_DEFAULT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getThemeColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -52,7 +52,7 @@ import org.mariotaku.twidere.util.support.ViewSupport;
|
||||
import static org.mariotaku.twidere.util.Utils.createFragmentForIntent;
|
||||
import static org.mariotaku.twidere.util.Utils.matchLinkId;
|
||||
|
||||
public class LinkHandlerActivity extends BaseAppCompatActivity implements SystemWindowsInsetsCallback,
|
||||
public class LinkHandlerActivity extends BaseActivity implements SystemWindowsInsetsCallback,
|
||||
IControlBarActivity, SupportFragmentCallback {
|
||||
|
||||
private final View.OnLayoutChangeListener mLayoutChangeListener = new View.OnLayoutChangeListener() {
|
||||
|
@ -80,7 +80,7 @@ import org.mariotaku.mediaviewer.library.subsampleimageview.SubsampleImageViewer
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.iface.IExtendedActivity;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableMedia;
|
||||
import org.mariotaku.twidere.model.ParcelableStatus;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
|
@ -55,7 +55,7 @@ import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.AccountsSpinnerAdapter;
|
||||
import org.mariotaku.twidere.fragment.support.UserFragment;
|
||||
import org.mariotaku.twidere.fragment.UserFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
@ -69,7 +69,6 @@ import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.MediaLoaderWrapper;
|
||||
import org.mariotaku.twidere.util.ParseUtils;
|
||||
import org.mariotaku.twidere.util.SwipeDismissListViewTouchListener;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.util.UserColorNameManager;
|
||||
import org.mariotaku.twidere.util.content.ContentResolverUtils;
|
||||
import org.mariotaku.twidere.view.ExtendedRelativeLayout;
|
||||
@ -82,7 +81,7 @@ import jopt.csp.util.SortableIntList;
|
||||
/**
|
||||
* Created by mariotaku on 15/1/6.
|
||||
*/
|
||||
public class QuickSearchBarActivity extends ThemedFragmentActivity implements OnClickListener,
|
||||
public class QuickSearchBarActivity extends BaseActivity implements OnClickListener,
|
||||
LoaderCallbacks<Cursor>, OnItemSelectedListener, OnItemClickListener,
|
||||
OnFitSystemWindowsListener, SwipeDismissListViewTouchListener.DismissCallbacks {
|
||||
|
||||
@ -116,11 +115,6 @@ public class QuickSearchBarActivity extends ThemedFragmentActivity implements On
|
||||
getSupportLoaderManager().restartLoader(0, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getUserAccentColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
@ -335,7 +329,7 @@ public class QuickSearchBarActivity extends ThemedFragmentActivity implements On
|
||||
static final int VIEW_TYPE_USER_SCREEN_NAME = 3;
|
||||
|
||||
private final LayoutInflater mInflater;
|
||||
private final MediaLoaderWrapper mImageLoader;
|
||||
private final MediaLoaderWrapper mMediaLoader;
|
||||
private final UserColorNameManager mUserColorNameManager;
|
||||
private final QuickSearchBarActivity mActivity;
|
||||
private final SortableIntList mRemovedPositions;
|
||||
@ -347,7 +341,7 @@ public class QuickSearchBarActivity extends ThemedFragmentActivity implements On
|
||||
super(activity, null, 0);
|
||||
mRemovedPositions = new SortableIntList();
|
||||
mActivity = activity;
|
||||
mImageLoader = activity.mImageLoader;
|
||||
mMediaLoader = activity.mMediaLoader;
|
||||
mUserColorNameManager = activity.mUserColorNameManager;
|
||||
mInflater = LayoutInflater.from(activity);
|
||||
}
|
||||
@ -408,7 +402,7 @@ public class QuickSearchBarActivity extends ThemedFragmentActivity implements On
|
||||
holder.text2.setVisibility(View.VISIBLE);
|
||||
holder.text2.setText(String.format("@%s", cursor.getString(mIndices.summary)));
|
||||
holder.icon.clearColorFilter();
|
||||
mImageLoader.displayProfileImage(holder.icon, cursor.getString(mIndices.icon));
|
||||
mMediaLoader.displayProfileImage(holder.icon, cursor.getString(mIndices.icon));
|
||||
break;
|
||||
}
|
||||
case VIEW_TYPE_USER_SCREEN_NAME: {
|
||||
@ -416,7 +410,7 @@ public class QuickSearchBarActivity extends ThemedFragmentActivity implements On
|
||||
holder.text1.setText(String.format("@%s", cursor.getString(mIndices.title)));
|
||||
holder.text2.setVisibility(View.GONE);
|
||||
holder.icon.setColorFilter(holder.text1.getCurrentTextColor(), Mode.SRC_ATOP);
|
||||
mImageLoader.cancelDisplayTask(holder.icon);
|
||||
mMediaLoader.cancelDisplayTask(holder.icon);
|
||||
holder.icon.setImageResource(R.drawable.ic_action_user);
|
||||
break;
|
||||
}
|
||||
|
@ -36,13 +36,12 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.BaseSupportDialogActivity;
|
||||
import org.mariotaku.twidere.util.HtmlEscapeHelper;
|
||||
import org.mariotaku.twidere.util.PermissionsManager;
|
||||
|
||||
import static android.text.TextUtils.isEmpty;
|
||||
|
||||
public class RequestPermissionsActivity extends BaseSupportDialogActivity implements OnClickListener {
|
||||
public class RequestPermissionsActivity extends BaseActivity implements OnClickListener {
|
||||
|
||||
private ImageView mIconView;
|
||||
private TextView mNameView, mDescriptionView, mMessageView;
|
||||
|
@ -36,7 +36,6 @@ import android.support.v4.widget.SlidingPaneLayout;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback;
|
||||
import android.support.v7.preference.PreferenceFragmentCompat.OnPreferenceStartFragmentCallback;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
@ -51,11 +50,11 @@ import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.CustomTabsFragment;
|
||||
import org.mariotaku.twidere.fragment.ExtensionsListFragment;
|
||||
import org.mariotaku.twidere.fragment.SettingsDetailsFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportBrowserFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportBrowserFragment;
|
||||
import org.mariotaku.twidere.preference.iface.IDialogPreference;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
@ -63,8 +62,8 @@ import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SettingsActivity extends BaseAppCompatActivity implements OnItemClickListener,
|
||||
OnPreferenceStartFragmentCallback, OnPreferenceDisplayDialogCallback {
|
||||
public class SettingsActivity extends BaseActivity implements OnItemClickListener,
|
||||
OnPreferenceStartFragmentCallback {
|
||||
|
||||
private static final int RESULT_SETTINGS_CHANGED = 10;
|
||||
|
||||
@ -261,15 +260,6 @@ public class SettingsActivity extends BaseAppCompatActivity implements OnItemCli
|
||||
mSlidingPaneLayout.closePane();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceDisplayDialog(PreferenceFragmentCompat fragment, Preference preference) {
|
||||
if (preference instanceof IDialogPreference) {
|
||||
((IDialogPreference) preference).displayDialog(fragment);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static class EntriesAdapter extends BaseAdapter {
|
||||
|
||||
static final int VIEW_TYPE_PREFERENCE_ENTRY = 0;
|
||||
|
@ -49,12 +49,12 @@ import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.SupportTabsAdapter;
|
||||
import org.mariotaku.twidere.annotation.CustomTabType;
|
||||
import org.mariotaku.twidere.fragment.BasePreferenceFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportFragment;
|
||||
import org.mariotaku.twidere.fragment.support.DirectMessagesFragment;
|
||||
import org.mariotaku.twidere.fragment.support.HomeTimelineFragment;
|
||||
import org.mariotaku.twidere.fragment.support.InteractionsTimelineFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportFragment;
|
||||
import org.mariotaku.twidere.fragment.DirectMessagesFragment;
|
||||
import org.mariotaku.twidere.fragment.HomeTimelineFragment;
|
||||
import org.mariotaku.twidere.fragment.InteractionsTimelineFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.model.CustomTabConfiguration;
|
||||
import org.mariotaku.twidere.model.SupportTabSpec;
|
||||
import org.mariotaku.twidere.preference.WizardPageHeaderPreference;
|
||||
@ -74,7 +74,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class SettingsWizardActivity extends BaseAppCompatActivity implements Constants {
|
||||
public class SettingsWizardActivity extends BaseActivity implements Constants {
|
||||
|
||||
public static final String WIZARD_PREFERENCE_KEY_NEXT_PAGE = "next_page";
|
||||
public static final String WIZARD_PREFERENCE_KEY_USE_DEFAULTS = "use_defaults";
|
||||
@ -163,11 +163,6 @@ public class SettingsWizardActivity extends BaseAppCompatActivity implements Con
|
||||
return ThemeUtils.getThemeBackgroundOption(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeColor() {
|
||||
return ThemeUtils.getUserAccentColor(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -75,9 +75,8 @@ import org.mariotaku.twidere.api.twitter.auth.OAuthAuthorization;
|
||||
import org.mariotaku.twidere.api.twitter.auth.OAuthToken;
|
||||
import org.mariotaku.twidere.api.twitter.model.Paging;
|
||||
import org.mariotaku.twidere.api.twitter.model.User;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.graphic.EmptyDrawable;
|
||||
import org.mariotaku.twidere.fragment.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableAccount;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
@ -101,8 +100,6 @@ import org.mariotaku.twidere.util.TwitterAPIFactory;
|
||||
import org.mariotaku.twidere.util.TwitterContentUtils;
|
||||
import org.mariotaku.twidere.util.UserAgentUtils;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.support.ViewSupport;
|
||||
import org.mariotaku.twidere.util.support.view.ViewOutlineProviderCompat;
|
||||
import org.mariotaku.twidere.util.view.ConsumerKeySecretValidator;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
@ -114,7 +111,7 @@ import static org.mariotaku.twidere.util.Utils.isUserLoggedIn;
|
||||
import static org.mariotaku.twidere.util.Utils.showErrorMessage;
|
||||
import static org.mariotaku.twidere.util.Utils.trim;
|
||||
|
||||
public class SignInActivity extends BaseAppCompatActivity implements OnClickListener, TextWatcher {
|
||||
public class SignInActivity extends BaseActivity implements OnClickListener, TextWatcher {
|
||||
|
||||
public static final String FRAGMENT_TAG_SIGN_IN_PROGRESS = "sign_in_progress";
|
||||
private static final String TWITTER_SIGNUP_URL = "https://twitter.com/signup";
|
||||
@ -163,7 +160,7 @@ public class SignInActivity extends BaseAppCompatActivity implements OnClickList
|
||||
break;
|
||||
}
|
||||
case REQUEST_BROWSER_SIGN_IN: {
|
||||
if (resultCode == BaseAppCompatActivity.RESULT_OK && data != null) {
|
||||
if (resultCode == BaseActivity.RESULT_OK && data != null) {
|
||||
doBrowserLogin(data);
|
||||
}
|
||||
break;
|
||||
|
@ -1,195 +0,0 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.view.menu.ActionMenuItemView;
|
||||
import android.support.v7.widget.TwidereActionMenuView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import com.afollestad.appthemeengine.ATEActivity;
|
||||
|
||||
import org.mariotaku.twidere.BuildConfig;
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.activity.iface.IAppCompatActivity;
|
||||
import org.mariotaku.twidere.activity.iface.IThemedActivity;
|
||||
import org.mariotaku.twidere.util.StrictModeUtils;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public abstract class ThemedAppCompatActivity extends ATEActivity implements Constants,
|
||||
IThemedActivity, IAppCompatActivity {
|
||||
|
||||
// Data fields
|
||||
private int mCurrentThemeColor;
|
||||
private int mCurrentThemeBackgroundAlpha;
|
||||
private String mCurrentThemeBackgroundOption;
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeBackgroundAlpha() {
|
||||
return mCurrentThemeBackgroundAlpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentThemeBackgroundOption() {
|
||||
return mCurrentThemeBackgroundOption;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeColor() {
|
||||
return mCurrentThemeColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeBackgroundAlpha() {
|
||||
return ThemeUtils.getUserThemeBackgroundAlpha(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeBackgroundOption() {
|
||||
return ThemeUtils.getThemeBackgroundOption(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeFontFamily() {
|
||||
return ThemeUtils.getThemeFontFamily(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
StrictModeUtils.detectAllVmPolicy();
|
||||
StrictModeUtils.detectAllThreadPolicy();
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getATEKey() {
|
||||
return ThemeUtils.getATEKey(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyThemeResource(@NonNull Resources.Theme theme, int resId, boolean first) {
|
||||
mCurrentThemeColor = getThemeColor();
|
||||
mCurrentThemeBackgroundAlpha = getThemeBackgroundAlpha();
|
||||
mCurrentThemeBackgroundOption = getThemeBackgroundOption();
|
||||
super.onApplyThemeResource(theme, resId, first);
|
||||
final Window window = getWindow();
|
||||
if (shouldApplyWindowBackground()) {
|
||||
ThemeUtils.applyWindowBackground(this, window, mCurrentThemeBackgroundOption,
|
||||
mCurrentThemeBackgroundAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
ThemeUtils.fixNightMode(getResources(), newConfig);
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
protected boolean shouldApplyWindowBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private static final String[] sClassPrefixList = {
|
||||
"android.widget.",
|
||||
"android.view.",
|
||||
"android.webkit."
|
||||
};
|
||||
|
||||
@Override
|
||||
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
|
||||
// Fix for https://github.com/afollestad/app-theme-engine/issues/109
|
||||
if (context != this) {
|
||||
final AppCompatDelegate delegate = getDelegate();
|
||||
View view = delegate.createView(parent, name, context, attrs);
|
||||
if (view == null) {
|
||||
view = newInstance(name, context, attrs);
|
||||
}
|
||||
if (view == null) {
|
||||
view = newInstance(name, context, attrs);
|
||||
}
|
||||
if (view != null) {
|
||||
return view;
|
||||
}
|
||||
}
|
||||
if (parent instanceof TwidereActionMenuView) {
|
||||
final Class<?> cls = findClass(name);
|
||||
if (cls != null && ActionMenuItemView.class.isAssignableFrom(cls)) {
|
||||
return ((TwidereActionMenuView) parent).createActionMenuView(context, attrs);
|
||||
}
|
||||
}
|
||||
return super.onCreateView(parent, name, context, attrs);
|
||||
}
|
||||
|
||||
private Class<?> findClass(String name) {
|
||||
Class<?> cls = null;
|
||||
try {
|
||||
cls = Class.forName(name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Ignore
|
||||
}
|
||||
if (cls != null) return cls;
|
||||
for (String prefix : sClassPrefixList) {
|
||||
try {
|
||||
cls = Class.forName(prefix + name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Ignore
|
||||
}
|
||||
if (cls != null) return cls;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private View newInstance(String name, Context context, AttributeSet attrs) {
|
||||
try {
|
||||
final Class<?> cls = findClass(name);
|
||||
if (cls == null) throw new ClassNotFoundException(name);
|
||||
final Constructor<?> constructor = cls.getConstructor(Context.class, AttributeSet.class);
|
||||
return (View) constructor.newInstance(context, attrs);
|
||||
} catch (InstantiationException e) {
|
||||
return null;
|
||||
} catch (IllegalAccessException e) {
|
||||
return null;
|
||||
} catch (InvocationTargetException e) {
|
||||
return null;
|
||||
} catch (NoSuchMethodException e) {
|
||||
return null;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,183 +0,0 @@
|
||||
/*
|
||||
* Twidere - Twitter client for Android
|
||||
*
|
||||
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import com.squareup.otto.Bus;
|
||||
|
||||
import org.mariotaku.twidere.BuildConfig;
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.activity.iface.IThemedActivity;
|
||||
import org.mariotaku.twidere.util.ActivityTracker;
|
||||
import org.mariotaku.twidere.util.AsyncTwitterWrapper;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler.KeyboardShortcutCallback;
|
||||
import org.mariotaku.twidere.util.MediaLoaderWrapper;
|
||||
import org.mariotaku.twidere.util.PermissionsManager;
|
||||
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
|
||||
import org.mariotaku.twidere.util.StrictModeUtils;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
import org.mariotaku.twidere.util.UserColorNameManager;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
|
||||
import org.mariotaku.twidere.view.ShapedImageView.ShapeStyle;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public abstract class ThemedFragmentActivity extends FragmentActivity implements Constants,
|
||||
IThemedActivity, KeyboardShortcutCallback {
|
||||
|
||||
// Utility classes
|
||||
@Inject
|
||||
protected KeyboardShortcutsHandler mKeyboardShortcutsHandler;
|
||||
@Inject
|
||||
protected AsyncTwitterWrapper mTwitterWrapper;
|
||||
@Inject
|
||||
protected ActivityTracker mActivityTracker;
|
||||
@Inject
|
||||
protected MediaLoaderWrapper mImageLoader;
|
||||
@Inject
|
||||
protected UserColorNameManager mUserColorNameManager;
|
||||
@Inject
|
||||
protected SharedPreferencesWrapper mPreferences;
|
||||
@Inject
|
||||
protected Bus mBus;
|
||||
@Inject
|
||||
protected PermissionsManager mPermissionsManager;
|
||||
|
||||
//Data fields
|
||||
private int mCurrentThemeColor;
|
||||
private int mCurrentThemeBackgroundAlpha;
|
||||
@ShapeStyle
|
||||
private int mProfileImageStyle;
|
||||
private String mCurrentThemeBackgroundOption;
|
||||
private String mCurrentThemeFontFamily;
|
||||
private int mMetaState;
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeBackgroundAlpha() {
|
||||
return mCurrentThemeBackgroundAlpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentThemeBackgroundOption() {
|
||||
return mCurrentThemeBackgroundOption;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentThemeColor() {
|
||||
return mCurrentThemeColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getThemeBackgroundAlpha() {
|
||||
return ThemeUtils.getUserThemeBackgroundAlpha(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeBackgroundOption() {
|
||||
return ThemeUtils.getThemeBackgroundOption(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getThemeFontFamily() {
|
||||
return ThemeUtils.getThemeFontFamily(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
StrictModeUtils.detectAllVmPolicy();
|
||||
StrictModeUtils.detectAllThreadPolicy();
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
GeneralComponentHelper.build(this).inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTheme(int resId) {
|
||||
super.setTheme(resId);
|
||||
if (shouldApplyWindowBackground()) {
|
||||
ThemeUtils.applyWindowBackground(this, getWindow(),
|
||||
mCurrentThemeBackgroundOption, mCurrentThemeBackgroundAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyThemeResource(@NonNull Resources.Theme theme, int resId, boolean first) {
|
||||
mCurrentThemeColor = getThemeColor();
|
||||
mCurrentThemeFontFamily = getThemeFontFamily();
|
||||
mCurrentThemeBackgroundAlpha = getThemeBackgroundAlpha();
|
||||
mCurrentThemeBackgroundOption = getThemeBackgroundOption();
|
||||
mProfileImageStyle = Utils.getProfileImageStyle(this);
|
||||
super.onApplyThemeResource(theme, resId, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleKeyboardShortcutSingle(@NonNull KeyboardShortcutsHandler handler, int keyCode, @NonNull KeyEvent event, int metaState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleKeyboardShortcutRepeat(@NonNull KeyboardShortcutsHandler handler, int keyCode, int repeatCount, @NonNull KeyEvent event, int metaState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isKeyboardShortcutHandled(@NonNull KeyboardShortcutsHandler handler, int keyCode, @NonNull KeyEvent event, int metaState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, @NonNull KeyEvent event) {
|
||||
if (KeyEvent.isModifierKey(keyCode)) {
|
||||
mMetaState &= ~KeyboardShortcutsHandler.getMetaStateForKeyCode(keyCode);
|
||||
}
|
||||
handleKeyboardShortcutSingle(mKeyboardShortcutsHandler, keyCode, event, mMetaState);
|
||||
return isKeyboardShortcutHandled(mKeyboardShortcutsHandler, keyCode, event, mMetaState) || super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (KeyEvent.isModifierKey(keyCode)) {
|
||||
mMetaState |= KeyboardShortcutsHandler.getMetaStateForKeyCode(keyCode);
|
||||
}
|
||||
if (handleKeyboardShortcutRepeat(mKeyboardShortcutsHandler, keyCode, event.getRepeatCount(), event, mMetaState))
|
||||
return true;
|
||||
return isKeyboardShortcutHandled(mKeyboardShortcutsHandler, keyCode, event, mMetaState) || super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
ThemeUtils.fixNightMode(getResources(), newConfig);
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
protected boolean shouldApplyWindowBackground() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -19,51 +19,38 @@
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.SettingsDetailsFragment;
|
||||
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
|
||||
import org.mariotaku.twidere.util.dagger.DependencyHolder;
|
||||
|
||||
public class UsageStatisticsActivity extends Activity implements Constants {
|
||||
|
||||
private static final int REQUEST_USAGE_STATISTICS = 201;
|
||||
public class UsageStatisticsActivity extends BaseActivity implements Constants {
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
switch (requestCode) {
|
||||
case REQUEST_USAGE_STATISTICS: {
|
||||
DependencyHolder holder = DependencyHolder.get(this);
|
||||
final SharedPreferencesWrapper prefs = holder.getPreferences();
|
||||
if (!prefs.contains(KEY_USAGE_STATISTICS)) {
|
||||
final SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putBoolean(KEY_USAGE_STATISTICS, prefs.getBoolean(KEY_USAGE_STATISTICS));
|
||||
editor.apply();
|
||||
}
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
protected void onDestroy() {
|
||||
if (!mPreferences.contains(KEY_USAGE_STATISTICS)) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putBoolean(KEY_USAGE_STATISTICS, mPreferences.getBoolean(KEY_USAGE_STATISTICS));
|
||||
editor.apply();
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setVisible(true);
|
||||
final Bundle fragmentArgs = new Bundle();
|
||||
fragmentArgs.putInt(EXTRA_RESID, R.xml.preferences_usage_statistics);
|
||||
final Intent intent = new Intent(this, SettingsActivity.class);
|
||||
intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, SettingsDetailsFragment.class.getName());
|
||||
intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs);
|
||||
intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_TITLE, R.string.usage_statistics);
|
||||
startActivityForResult(intent, REQUEST_USAGE_STATISTICS);
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
final FragmentTransaction ft = fm.beginTransaction();
|
||||
ft.replace(android.R.id.content, Fragment.instantiate(this,
|
||||
SettingsDetailsFragment.class.getName(), fragmentArgs));
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,8 +46,8 @@ import org.mariotaku.twidere.api.twitter.model.Paging;
|
||||
import org.mariotaku.twidere.api.twitter.model.ResponseList;
|
||||
import org.mariotaku.twidere.api.twitter.model.User;
|
||||
import org.mariotaku.twidere.api.twitter.model.UserList;
|
||||
import org.mariotaku.twidere.fragment.support.CreateUserListDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.support.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.CreateUserListDialogFragment;
|
||||
import org.mariotaku.twidere.fragment.SupportProgressDialogFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
import org.mariotaku.twidere.model.ParcelableUserList;
|
||||
import org.mariotaku.twidere.model.SingleResponse;
|
||||
@ -65,7 +65,8 @@ import java.util.List;
|
||||
import static android.text.TextUtils.isEmpty;
|
||||
import static org.mariotaku.twidere.util.DataStoreUtils.getAccountScreenName;
|
||||
|
||||
public class UserListSelectorActivity extends BaseSupportDialogActivity implements OnClickListener, OnItemClickListener {
|
||||
public class UserListSelectorActivity extends BaseActivity implements OnClickListener,
|
||||
OnItemClickListener {
|
||||
|
||||
private AutoCompleteTextView mEditScreenName;
|
||||
private ListView mUserListsListView, mUsersListView;
|
||||
|
@ -31,8 +31,4 @@ public interface IThemedActivity {
|
||||
|
||||
String getThemeBackgroundOption();
|
||||
|
||||
int getThemeColor();
|
||||
|
||||
String getThemeFontFamily();
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.fragment.support.MessagesConversationFragment;
|
||||
import org.mariotaku.twidere.fragment.MessagesConversationFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
import org.mariotaku.twidere.util.MediaLoaderWrapper;
|
||||
|
@ -27,6 +27,7 @@ import android.support.v4.widget.SimpleCursorAdapter;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FilterQueryProvider;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -71,7 +72,7 @@ public class ComposeAutoCompleteAdapter extends SimpleCursorAdapter implements C
|
||||
public void bindView(final View view, final Context context, final Cursor cursor) {
|
||||
final TextView text1 = (TextView) view.findViewById(android.R.id.text1);
|
||||
final TextView text2 = (TextView) view.findViewById(android.R.id.text2);
|
||||
final ProfileImageView icon = (ProfileImageView) view.findViewById(android.R.id.icon);
|
||||
final ImageView icon = (ImageView) view.findViewById(android.R.id.icon);
|
||||
|
||||
// Clear images in order to prevent images in recycled view shown.
|
||||
icon.setImageDrawable(null);
|
||||
|
@ -36,8 +36,8 @@ import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.iface.IActivitiesAdapter;
|
||||
import org.mariotaku.twidere.api.twitter.model.Activity;
|
||||
import org.mariotaku.twidere.fragment.support.CursorActivitiesFragment;
|
||||
import org.mariotaku.twidere.fragment.support.UserFragment;
|
||||
import org.mariotaku.twidere.fragment.CursorActivitiesFragment;
|
||||
import org.mariotaku.twidere.fragment.UserFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableActivity;
|
||||
import org.mariotaku.twidere.model.ParcelableActivityCursorIndices;
|
||||
import org.mariotaku.twidere.model.ParcelableMedia;
|
||||
|
@ -26,6 +26,7 @@ import android.support.v4.widget.SimpleCursorAdapter;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FilterQueryProvider;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.sqliteqb.library.Columns;
|
||||
@ -73,7 +74,7 @@ public class UserAutoCompleteAdapter extends SimpleCursorAdapter implements Cons
|
||||
public void bindView(final View view, final Context context, final Cursor cursor) {
|
||||
final TextView text1 = (TextView) view.findViewById(android.R.id.text1);
|
||||
final TextView text2 = (TextView) view.findViewById(android.R.id.text2);
|
||||
final ProfileImageView icon = (ProfileImageView) view.findViewById(android.R.id.icon);
|
||||
final ImageView icon = (ImageView) view.findViewById(android.R.id.icon);
|
||||
|
||||
// Clear images in order to prevent images in recycled view shown.
|
||||
icon.setImageDrawable(null);
|
||||
|
@ -53,6 +53,7 @@ import org.mariotaku.twidere.activity.AssistLauncherActivity;
|
||||
import org.mariotaku.twidere.activity.MainActivity;
|
||||
import org.mariotaku.twidere.activity.MainHondaJOJOActivity;
|
||||
import org.mariotaku.twidere.service.RefreshService;
|
||||
import org.mariotaku.twidere.util.theme.ProfileImageViewViewProcessor;
|
||||
import org.mariotaku.twidere.util.BugReporter;
|
||||
import org.mariotaku.twidere.util.DebugModeUtils;
|
||||
import org.mariotaku.twidere.util.ExternalThemeManager;
|
||||
@ -68,11 +69,13 @@ import org.mariotaku.twidere.util.net.TwidereDns;
|
||||
import org.mariotaku.twidere.util.theme.ActionBarContextViewViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.ExtendedSwipeRefreshLayoutViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.FloatingActionButtonViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.OptimalLinkColorTagProcessor;
|
||||
import org.mariotaku.twidere.util.theme.ProgressWheelViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.TabPagerIndicatorViewProcessor;
|
||||
import org.mariotaku.twidere.util.theme.TimelineContentTextViewViewProcessor;
|
||||
import org.mariotaku.twidere.view.TabPagerIndicator;
|
||||
import org.mariotaku.twidere.view.ExtendedSwipeRefreshLayout;
|
||||
import org.mariotaku.twidere.view.ProfileImageView;
|
||||
import org.mariotaku.twidere.view.TabPagerIndicator;
|
||||
import org.mariotaku.twidere.view.TimelineContentTextView;
|
||||
|
||||
public class TwidereApplication extends Application implements Constants,
|
||||
@ -89,6 +92,7 @@ public class TwidereApplication extends Application implements Constants,
|
||||
private SQLiteDatabase mDatabase;
|
||||
|
||||
private ApplicationModule mApplicationModule;
|
||||
private ProfileImageViewViewProcessor mProfileImageViewViewProcessor;
|
||||
|
||||
@NonNull
|
||||
public static TwidereApplication getInstance(@NonNull final Context context) {
|
||||
@ -137,6 +141,9 @@ public class TwidereApplication extends Application implements Constants,
|
||||
ATE.registerViewProcessor(ExtendedSwipeRefreshLayout.class, new ExtendedSwipeRefreshLayoutViewProcessor());
|
||||
ATE.registerViewProcessor(TimelineContentTextView.class, new TimelineContentTextViewViewProcessor());
|
||||
ATE.registerViewProcessor(ProgressWheel.class, new ProgressWheelViewProcessor());
|
||||
mProfileImageViewViewProcessor = new ProfileImageViewViewProcessor();
|
||||
ATE.registerViewProcessor(ProfileImageView.class, mProfileImageViewViewProcessor);
|
||||
ATE.registerTagProcessor("optimal_link_color", new OptimalLinkColorTagProcessor());
|
||||
final SharedPreferences preferences = getSharedPreferences();
|
||||
if (!ATE.config(this, null).isConfigured()) {
|
||||
final int themeColor = preferences.getInt(KEY_THEME_COLOR, ContextCompat.getColor(this,
|
||||
@ -297,6 +304,11 @@ public class TwidereApplication extends Application implements Constants,
|
||||
Config.markChanged(this, VALUE_THEME_NAME_LIGHT, VALUE_THEME_NAME_DARK);
|
||||
break;
|
||||
}
|
||||
case KEY_PROFILE_IMAGE_STYLE: {
|
||||
Config.markChanged(this, VALUE_THEME_NAME_LIGHT, VALUE_THEME_NAME_DARK);
|
||||
mProfileImageViewViewProcessor.setStyle(Utils.getProfileImageStyle(preferences.getString(key, null)));
|
||||
break;
|
||||
}
|
||||
case KEY_THEME_COLOR: {
|
||||
final int themeColor = preferences.getInt(key, ContextCompat.getColor(this,
|
||||
R.color.branding_color));
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -45,7 +45,7 @@ import org.mariotaku.twidere.adapter.ParcelableActivitiesAdapter;
|
||||
import org.mariotaku.twidere.adapter.decorator.DividerItemDecoration;
|
||||
import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter.IndicatorPosition;
|
||||
import org.mariotaku.twidere.annotation.ReadPositionTag;
|
||||
import org.mariotaku.twidere.fragment.support.AbsStatusesFragment.DefaultOnLikedListener;
|
||||
import org.mariotaku.twidere.fragment.AbsStatusesFragment.DefaultOnLikedListener;
|
||||
import org.mariotaku.twidere.loader.iface.IExtendedLoader;
|
||||
import org.mariotaku.twidere.model.BaseRefreshTaskParam;
|
||||
import org.mariotaku.twidere.model.ParcelableActivity;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
@ -1,4 +1,4 @@
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.Animator.AnimatorListener;
|
@ -1,4 +1,4 @@
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ContentResolver;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ContentResolver;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -61,7 +61,6 @@ import org.mariotaku.sqliteqb.library.RawItemArray;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.SettingsActivity;
|
||||
import org.mariotaku.twidere.activity.CustomTabEditorActivity;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportFragment;
|
||||
import org.mariotaku.twidere.model.CustomTabConfiguration;
|
||||
import org.mariotaku.twidere.model.CustomTabConfiguration.CustomTabConfigurationComparator;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
@ -207,7 +207,7 @@ public class FileSelectorDialogFragment extends BaseSupportDialogFragment implem
|
||||
public FilesAdapter(final Context context) {
|
||||
super(context, android.R.layout.simple_list_item_1);
|
||||
mResources = context.getResources();
|
||||
mActionIconColor = ThemeUtils.isDarkTheme(context) ? 0xffffffff : 0xc0333333;
|
||||
mActionIconColor = !ThemeUtils.isLightTheme(context) ? 0xffffffff : 0xc0333333;
|
||||
mPadding = (int) (4 * mResources.getDisplayMetrics().density);
|
||||
}
|
||||
|
@ -17,16 +17,16 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.SupportTabsAdapter;
|
||||
import org.mariotaku.twidere.fragment.support.BaseFiltersFragment.FilteredKeywordsFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseFiltersFragment.FilteredLinksFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseFiltersFragment.FilteredSourcesFragment;
|
||||
import org.mariotaku.twidere.fragment.support.BaseFiltersFragment.FilteredUsersFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredKeywordsFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredLinksFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredSourcesFragment;
|
||||
import org.mariotaku.twidere.fragment.BaseFiltersFragment.FilteredUsersFragment;
|
||||
|
||||
public class FiltersFragment extends AbsToolbarTabPagesFragment {
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
@ -51,7 +51,6 @@ import android.widget.TextView;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.adapter.ArrayAdapter;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.util.ParseUtils;
|
||||
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
|
||||
import org.mariotaku.twidere.util.ThemeUtils;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
@ -1,4 +1,4 @@
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
@ -23,7 +23,6 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface.OnKeyListener;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
@ -32,21 +31,14 @@ import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.preference.DialogPreference;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.KeyboardShortcutPreferenceCompatActivity;
|
||||
import org.mariotaku.twidere.constant.KeyboardShortcutConstants;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportDialogFragment;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
||||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler.KeyboardShortcutSpec;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@ -75,7 +75,7 @@ import org.mariotaku.sqliteqb.library.Expression;
|
||||
import org.mariotaku.sqliteqb.library.OrderBy;
|
||||
import org.mariotaku.sqliteqb.library.RawItemArray;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.BaseAppCompatActivity;
|
||||
import org.mariotaku.twidere.activity.BaseActivity;
|
||||
import org.mariotaku.twidere.activity.ThemedImagePickerActivity;
|
||||
import org.mariotaku.twidere.adapter.AccountsSpinnerAdapter;
|
||||
import org.mariotaku.twidere.adapter.MessageConversationAdapter;
|
||||
@ -226,7 +226,7 @@ public class MessagesConversationFragment extends BaseSupportFragment implements
|
||||
public void onActivityCreated(final Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
final BaseAppCompatActivity activity = (BaseAppCompatActivity) getActivity();
|
||||
final BaseActivity activity = (BaseActivity) getActivity();
|
||||
mMessageDrafts = activity.getSharedPreferences(MESSAGE_DRAFTS_PREFERENCES_NAME, Context.MODE_PRIVATE);
|
||||
|
||||
final View view = getView();
|
||||
@ -663,15 +663,15 @@ public class MessagesConversationFragment extends BaseSupportFragment implements
|
||||
@Override
|
||||
public boolean shouldCallListener() {
|
||||
final FragmentActivity activity = getActivity();
|
||||
if (!(activity instanceof BaseAppCompatActivity)) return false;
|
||||
return ((BaseAppCompatActivity) activity).getKeyMetaState() == 0;
|
||||
if (!(activity instanceof BaseActivity)) return false;
|
||||
return ((BaseActivity) activity).getKeyMetaState() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onHitEnter() {
|
||||
final FragmentActivity activity = getActivity();
|
||||
if (!(activity instanceof BaseAppCompatActivity)) return false;
|
||||
if (((BaseAppCompatActivity) activity).getKeyMetaState() != 0) return false;
|
||||
if (!(activity instanceof BaseActivity)) return false;
|
||||
if (((BaseActivity) activity).getKeyMetaState() != 0) return false;
|
||||
final ParcelableCredentials account = (ParcelableCredentials) mAccountSpinner.getSelectedItem();
|
||||
if (account == null) return false;
|
||||
mEditText.setAccountKey(account.account_key);
|
||||
@ -766,7 +766,7 @@ public class MessagesConversationFragment extends BaseSupportFragment implements
|
||||
}
|
||||
|
||||
private void updateActionBar() {
|
||||
final BaseAppCompatActivity activity = (BaseAppCompatActivity) getActivity();
|
||||
final BaseActivity activity = (BaseActivity) getActivity();
|
||||
final ActionBar actionBar = activity.getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayOptions(mRecipient != null ? ActionBar.DISPLAY_SHOW_TITLE : ActionBar.DISPLAY_SHOW_CUSTOM,
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -33,7 +33,6 @@ import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.api.twitter.Twitter;
|
||||
import org.mariotaku.twidere.api.twitter.TwitterException;
|
||||
import org.mariotaku.twidere.api.twitter.model.Paging;
|
||||
import org.mariotaku.twidere.fragment.support.BaseSupportFragment;
|
||||
import org.mariotaku.twidere.model.ParcelableCredentials;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
import org.mariotaku.twidere.model.util.ParcelableCredentialsUtils;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
@ -26,12 +26,9 @@ import android.os.Bundle;
|
||||
import android.provider.SearchRecentSuggestions;
|
||||
import android.support.v4.view.ViewPager.OnPageChangeListener;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.ComposeActivity;
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.mariotaku.twidere.fragment.support;
|
||||
package org.mariotaku.twidere.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user