updating to newest library version

This commit is contained in:
Mariotaku Lee 2015-05-30 03:41:23 +08:00
parent 3d21728cfd
commit 028c2373cb
13 changed files with 105 additions and 42 deletions

View File

@ -58,10 +58,11 @@ dependencies {
// wearApp project(':twidere.wear')
apt 'com.bluelinelabs:logansquare-compiler:1.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v13:22.1.1'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:cardview-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:support-v13:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.twitter:twitter-text:1.12.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
@ -86,7 +87,7 @@ dependencies {
compile 'ch.acra:acra:4.6.2'
compile 'org.jraf:android-switch-backport:2.0.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.4'
googleCompile 'com.google.android.gms:play-services-maps:7.3.0'
googleCompile 'com.google.android.gms:play-services-maps:7.5.0'
googleCompile 'com.google.maps.android:android-maps-utils:0.3.4'
fdroidCompile 'org.osmdroid:osmdroid-android:4.3'
fdroidCompile 'org.slf4j:slf4j-simple:1.7.12'

View File

@ -33,11 +33,12 @@ import android.content.res.Resources;
import android.graphics.PorterDuff.Mode;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.app.ThemedAppCompatDelegateFactory;
import android.support.v7.internal.widget.NativeActionModeAwareLayout;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.KeyEvent;
@ -66,6 +67,7 @@ import org.mariotaku.twidere.util.ThemeUtils;
import org.mariotaku.twidere.util.TwidereActionModeForChildListener;
import org.mariotaku.twidere.util.support.ViewSupport;
import org.mariotaku.twidere.util.support.view.ViewOutlineProviderCompat;
import org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout;
import org.mariotaku.twidere.view.holder.ViewListHolder;
import java.util.ArrayList;
@ -257,7 +259,7 @@ public class SettingsActivity extends BasePreferenceActivity {
setSupportActionBar(toolbar);
mTwidereActionModeForChildListener = new TwidereActionModeForChildListener(this, this, false);
final NativeActionModeAwareLayout layout = (NativeActionModeAwareLayout) findViewById(android.R.id.content);
final TintedStatusNativeActionModeAwareLayout layout = (TintedStatusNativeActionModeAwareLayout) findViewById(R.id.main_content);
layout.setActionModeForChildListener(mTwidereActionModeForChildListener);
ThemeUtils.setCompatContentViewOverlay(this, new EmptyDrawable());
@ -344,6 +346,12 @@ public class SettingsActivity extends BasePreferenceActivity {
super.onBackPressed();
}
@Nullable
@Override
public ActionMode onWindowStartingSupportActionMode(final ActionMode.Callback callback) {
return null;
}
public static class RestartConfirmDialogFragment extends DialogFragment implements DialogInterface.OnClickListener {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {

View File

@ -32,7 +32,6 @@ import android.support.v4.app.NavUtils;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.internal.widget.ActionBarContainer;
import android.support.v7.internal.widget.NativeActionModeAwareLayout;
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.Toolbar;
import android.view.KeyEvent;
@ -65,6 +64,7 @@ import org.mariotaku.twidere.util.support.ActivitySupport.TaskDescriptionCompat;
import org.mariotaku.twidere.util.support.ViewSupport;
import org.mariotaku.twidere.util.support.view.ViewOutlineProviderCompat;
import org.mariotaku.twidere.view.TintedStatusFrameLayout;
import org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout;
import static org.mariotaku.twidere.util.Utils.createFragmentForIntent;
import static org.mariotaku.twidere.util.Utils.matchLinkId;
@ -206,7 +206,7 @@ public class LinkHandlerActivity extends BaseAppCompatActivity implements System
setSupportActionBar((Toolbar) findViewById(R.id.action_bar));
mTwidereActionModeForChildListener = new TwidereActionModeForChildListener(this, this, false);
final NativeActionModeAwareLayout layout = (NativeActionModeAwareLayout) findViewById(android.R.id.content);
final TintedStatusNativeActionModeAwareLayout layout = (TintedStatusNativeActionModeAwareLayout) findViewById(R.id.main_content);
layout.setActionModeForChildListener(mTwidereActionModeForChildListener);
ThemeUtils.setCompatContentViewOverlay(this, new EmptyDrawable());

View File

@ -42,7 +42,6 @@ import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.internal.widget.NativeActionModeAwareLayout;
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
@ -93,6 +92,7 @@ import org.mariotaku.twidere.util.TwidereColorUtils;
import org.mariotaku.twidere.util.TwitterAPIFactory;
import org.mariotaku.twidere.util.support.ViewSupport;
import org.mariotaku.twidere.util.support.view.ViewOutlineProviderCompat;
import org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout;
import org.mariotaku.twidere.view.iface.TintedStatusLayout;
import static android.text.TextUtils.isEmpty;
@ -313,7 +313,7 @@ public class SignInActivity extends BaseAppCompatActivity implements OnClickList
setSupportActionBar((Toolbar) findViewById(R.id.action_bar));
TwidereActionModeForChildListener actionModeForChildListener = new TwidereActionModeForChildListener(this, this, false);
final NativeActionModeAwareLayout layout = (NativeActionModeAwareLayout) findViewById(android.R.id.content);
final TintedStatusNativeActionModeAwareLayout layout = (TintedStatusNativeActionModeAwareLayout) findViewById(R.id.main_content);
layout.setActionModeForChildListener(actionModeForChildListener);
ThemeUtils.setCompatContentViewOverlay(this, new EmptyDrawable());

View File

@ -26,7 +26,6 @@ import android.support.v7.app.AppCompatCallback;
import android.support.v7.internal.view.StandaloneActionMode;
import android.support.v7.internal.view.SupportActionModeWrapper;
import android.support.v7.internal.widget.ActionBarContextView;
import android.support.v7.internal.widget.NativeActionModeAwareLayout;
import android.support.v7.view.ActionMode;
import android.util.TypedValue;
import android.view.Gravity;
@ -40,11 +39,12 @@ import android.widget.PopupWindow;
import org.mariotaku.twidere.R;
import org.mariotaku.twidere.activity.iface.IThemedActivity;
import org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout;
/**
* Created by mariotaku on 15/4/27.
*/
public class TwidereActionModeForChildListener implements NativeActionModeAwareLayout.OnActionModeForChildListener {
public class TwidereActionModeForChildListener implements TintedStatusNativeActionModeAwareLayout.OnActionModeForChildListener {
private final Activity mActivity;
private final IThemedActivity mThemed;
private final AppCompatCallback mAppCompatCallback;

View File

@ -63,8 +63,8 @@ public class HeaderDrawerLayout extends ViewGroup {
public HeaderDrawerLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.HeaderDrawerLayout);
final int headerLayoutId = a.getResourceId(R.styleable.HeaderDrawerLayout_headerLayout, 0);
final int contentLayoutId = a.getResourceId(R.styleable.HeaderDrawerLayout_contentLayout, 0);
final int headerLayoutId = a.getResourceId(R.styleable.HeaderDrawerLayout_hdl_headerLayout, 0);
final int contentLayoutId = a.getResourceId(R.styleable.HeaderDrawerLayout_hdl_contentLayout, 0);
addView(mContainer = new InternalContainer(this, context, headerLayoutId, contentLayoutId),
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
a.recycle();

View File

@ -0,0 +1,53 @@
/*
* 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.view;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.View;
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class TintedStatusNativeActionModeAwareLayout extends TintedStatusFrameLayout {
private OnActionModeForChildListener mActionModeForChildListener;
public TintedStatusNativeActionModeAwareLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public void setActionModeForChildListener(OnActionModeForChildListener listener) {
mActionModeForChildListener = listener;
}
@Override
public ActionMode startActionModeForChild(View originalView, ActionMode.Callback callback) {
if (mActionModeForChildListener != null) {
return mActionModeForChildListener.startActionModeForChild(originalView, callback);
}
return super.startActionModeForChild(originalView, callback);
}
public interface OnActionModeForChildListener {
ActionMode startActionModeForChild(View originalView, ActionMode.Callback callback);
}
}

View File

@ -17,7 +17,7 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<org.mariotaku.twidere.view.TintedStatusFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
@ -50,4 +50,4 @@
android:layout_below="@+id/twidere_action_bar_container"
android:background="?android:windowContentOverlay" />
</RelativeLayout>
</org.mariotaku.twidere.view.TintedStatusFrameLayout>
</org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout>

View File

@ -20,18 +20,18 @@
<org.mariotaku.twidere.view.MainFrameLayout
android:id="@+id/home_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
android:layout_height="match_parent">
<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main_pager"
android:focusable="true"
android:focusableInTouchMode="false"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="false"/>
<include layout="@layout/layout_empty_tab_hint" />
<include layout="@layout/layout_empty_tab_hint"/>
<RelativeLayout
android:id="@+id/twidere_action_bar_with_overlay"
@ -47,15 +47,15 @@
android:layout_alignParentTop="true"
android:layout="@layout/layout_actionbar_home"
android:touchscreenBlocksFocus="true"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
<View
android:id="@+id/window_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/twidere_action_bar_container"
android:background="?android:windowContentOverlay" />
android:background="?android:windowContentOverlay"/>
</RelativeLayout>
<include layout="@layout/layout_home_actions_button" />
<include layout="@layout/layout_home_actions_button"/>
</org.mariotaku.twidere.view.MainFrameLayout>

View File

@ -17,7 +17,7 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<org.mariotaku.twidere.view.TintedStatusFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
@ -51,4 +51,4 @@
android:layout_below="@+id/twidere_action_bar_container"
android:background="?android:windowContentOverlay" />
</RelativeLayout>
</org.mariotaku.twidere.view.TintedStatusFrameLayout>
</org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout>

View File

@ -16,10 +16,11 @@
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<org.mariotaku.twidere.view.TintedStatusFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:setPadding="true">
@ -56,7 +57,7 @@
android:hint="@string/username"
android:inputType="textEmailAddress"
android:singleLine="true"
android:typeface="normal" />
android:typeface="normal"/>
<EditText
android:id="@+id/password"
@ -67,7 +68,7 @@
android:hint="@string/password"
android:inputType="textPassword"
android:singleLine="true"
android:typeface="normal" />
android:typeface="normal"/>
</LinearLayout>
<LinearLayout
@ -85,7 +86,7 @@
android:layout_weight="1"
android:minHeight="48dp"
android:onClick="onClick"
android:text="@string/register" />
android:text="@string/register"/>
<Button
android:id="@+id/sign_in"
@ -95,7 +96,7 @@
android:layout_weight="1"
android:minHeight="48dp"
android:onClick="onClick"
android:text="@string/sign_in" />
android:text="@string/sign_in"/>
</LinearLayout>
@ -110,7 +111,7 @@
android:minHeight="36dp"
android:onClick="onClick"
android:text="@string/sign_in_method_introduction_title"
android:textAppearance="?android:textAppearanceSmall" />
android:textAppearance="?android:textAppearanceSmall"/>
</LinearLayout>
</ScrollView>
@ -121,14 +122,14 @@
android:layout_height="?actionBarSize"
android:layout_alignParentTop="true"
android:touchscreenBlocksFocus="true"
tools:ignore="UnusedAttribute" />
tools:ignore="UnusedAttribute"/>
<View
android:id="@+id/window_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/twidere_action_bar_container"
android:background="?android:windowContentOverlay" />
android:background="?android:windowContentOverlay"/>
</RelativeLayout>
</org.mariotaku.twidere.view.TintedStatusFrameLayout>
</org.mariotaku.twidere.view.TintedStatusNativeActionModeAwareLayout>

View File

@ -46,8 +46,8 @@
android:id="@+id/user_profile_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentLayout="@layout/fragment_content_pages"
app:headerLayout="@layout/header_user"/>
app:hdl_contentLayout="@layout/fragment_content_pages"
app:hdl_headerLayout="@layout/header_user"/>
</org.mariotaku.twidere.view.ExtendedFrameLayout>
</FrameLayout>

View File

@ -93,8 +93,8 @@
<attr name="sivShape"/>
</declare-styleable>
<declare-styleable name="HeaderDrawerLayout">
<attr name="headerLayout" format="reference"/>
<attr name="contentLayout" format="reference"/>
<attr name="hdl_headerLayout" format="reference"/>
<attr name="hdl_contentLayout" format="reference"/>
</declare-styleable>
<declare-styleable name="TintedStatusLayout">
<attr name="setPadding" format="boolean"/>