improved link highlight color
This commit is contained in:
parent
368bf267c3
commit
e9af6b662e
|
@ -85,7 +85,7 @@ dependencies {
|
|||
compile 'com.github.mariotaku:MessageBubbleView:1.0'
|
||||
compile 'com.github.mariotaku:DragSortListView:0.6.1'
|
||||
compile 'com.github.mariotaku:SlidingMenu:1.3'
|
||||
compile 'com.github.uucky:ColorPicker-Android:3c14d24'
|
||||
compile 'com.github.uucky:ColorPicker-Android:0.9.4'
|
||||
compile 'com.sprylab.android.texturevideoview:texturevideoview:1.0.0'
|
||||
compile 'com.squareup:pollexor:2.0.2'
|
||||
compile 'org.apache.commons:commons-lang3:3.4'
|
||||
|
|
|
@ -347,10 +347,18 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
|
|||
final Window window = getWindow();
|
||||
final Rect rect = new Rect();
|
||||
window.getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||
final int actionBarHeight = Utils.getActionBarHeight(this);
|
||||
final View contentView = window.findViewById(android.R.id.content);
|
||||
final int[] location = new int[2];
|
||||
contentView.getLocationOnScreen(location);
|
||||
if (location[1] > actionBarHeight) {
|
||||
contentView.setPadding(contentView.getPaddingLeft(), 0,
|
||||
contentView.getPaddingRight(), contentView.getPaddingBottom());
|
||||
return true;
|
||||
}
|
||||
final int statusBarHeight = rect.top;
|
||||
contentView.getWindowVisibleDisplayFrame(rect);
|
||||
final int paddingTop = statusBarHeight + Utils.getActionBarHeight(this) - rect.top;
|
||||
final int paddingTop = statusBarHeight + actionBarHeight - rect.top;
|
||||
contentView.setPadding(contentView.getPaddingLeft(), paddingTop,
|
||||
contentView.getPaddingRight(), contentView.getPaddingBottom());
|
||||
return true;
|
||||
|
|
|
@ -135,6 +135,10 @@ public class ThemedLayoutInflaterFactory implements LayoutInflaterFactory {
|
|||
noTintColor = TwidereColorUtils.getContrastYIQ(tintColor, 192);
|
||||
isColorTint = false;
|
||||
}
|
||||
if (view instanceof TextView) {
|
||||
final TextView textView = (TextView) view;
|
||||
textView.setLinkTextColor(tintColor);
|
||||
}
|
||||
if (view instanceof IThemedView) {
|
||||
((IThemedView) view).setThemeTintColor(ColorStateList.valueOf(tintColor));
|
||||
} else if (view instanceof TintableBackgroundView) {
|
||||
|
|
|
@ -57,6 +57,11 @@ public final class ViewUtils {
|
|||
ViewAccessorL.setButtonTintList(view, list);
|
||||
}
|
||||
|
||||
public static ColorStateList getButtonTintList(CompoundButton view) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return null;
|
||||
return ViewAccessorL.getButtonTintList(view);
|
||||
}
|
||||
|
||||
public static void setClipToOutline(View view, boolean clipToOutline) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return;
|
||||
ViewAccessorL.setClipToOutline(view, clipToOutline);
|
||||
|
@ -155,6 +160,11 @@ public final class ViewUtils {
|
|||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return;
|
||||
view.setProgressTintList(list);
|
||||
}
|
||||
|
||||
public static ColorStateList getButtonTintList(CompoundButton view) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return null;
|
||||
return view.getButtonTintList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
|
@ -18,8 +17,7 @@
|
|||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<org.mariotaku.twidere.view.ExtendedRelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<org.mariotaku.twidere.view.ExtendedRelativeLayout 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"
|
||||
|
@ -53,7 +51,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
tools:listitem="@layout/spinner_item_account_icon"/>
|
||||
tools:listitem="@layout/spinner_item_account_icon" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_query"
|
||||
|
@ -65,23 +63,23 @@
|
|||
android:hint="@string/search_hint"
|
||||
android:inputType="text|textMultiLine">
|
||||
|
||||
<requestFocus/>
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconButton
|
||||
<org.mariotaku.twidere.view.themed.TintThemedImageButton
|
||||
android:id="@+id/search_submit"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:background="?android:actionBarItemBackground"
|
||||
android:src="@drawable/ic_action_search"/>
|
||||
android:src="@drawable/ic_action_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#20808080"/>
|
||||
android:background="#20808080" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/suggestions_list"
|
||||
|
@ -89,7 +87,7 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:listSelector="?selectableItemBackground"
|
||||
tools:listitem="@layout/list_item_user"/>
|
||||
tools:listitem="@layout/list_item_user" />
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
|
@ -18,19 +17,14 @@
|
|||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="false">
|
||||
android:focusableInTouchMode="false"
|
||||
android:padding="@dimen/element_spacing_normal">
|
||||
|
||||
<ProgressBar
|
||||
style="?android:progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/element_spacing_normal"/>
|
||||
<include layout="@layout/layout_progress_wheel_medium" />
|
||||
|
||||
</FrameLayout>
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<org.mariotaku.twidere.view.RecyclerViewBackport
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="false"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
<include layout="@layout/layout_content_fragment_common"/>
|
||||
</FrameLayout>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
|
@ -17,9 +16,7 @@
|
|||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
@ -28,20 +25,14 @@
|
|||
android:id="@+id/gif_image_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<org.mariotaku.twidere.view.themed.TintThemedProgressWheel
|
||||
android:id="@+id/load_progress"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
app:matProg_barColor="@color/branding_color"/>
|
||||
<include layout="@layout/layout_progress_wheel_medium" />
|
||||
|
||||
|
||||
</FrameLayout>
|
|
@ -18,9 +18,7 @@
|
|||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
@ -28,14 +26,8 @@
|
|||
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<org.mariotaku.twidere.view.themed.TintThemedProgressWheel
|
||||
android:id="@+id/load_progress"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
app:matProg_barColor="@color/branding_color"/>
|
||||
<include layout="@layout/layout_progress_wheel_medium" />
|
||||
|
||||
</FrameLayout>
|
|
@ -50,13 +50,6 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<org.mariotaku.twidere.view.themed.TintThemedProgressWheel
|
||||
android:id="@+id/load_progress"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
app:matProg_barColor="@color/branding_color"/>
|
||||
<include layout="@layout/layout_progress_wheel_medium" />
|
||||
|
||||
</FrameLayout>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Twidere - Twitter client for Android
|
||||
~
|
||||
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
|
||||
|
@ -19,7 +18,7 @@
|
|||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/progress_container"
|
||||
|
@ -28,11 +27,7 @@
|
|||
android:padding="@dimen/element_spacing_large"
|
||||
tools:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
style="?android:progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
<include layout="@layout/layout_progress_wheel_medium" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -49,7 +44,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:src="@drawable/ic_info_error_generic"/>
|
||||
android:src="@drawable/ic_info_error_generic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
|
@ -57,7 +52,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium" />
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ 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/>.
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<org.mariotaku.twidere.view.themed.TintThemedProgressWheel
|
||||
android:id="@+id/load_progress"
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/element_spacing_xsmall"
|
||||
app:matProg_barColor="?colorAccent"
|
||||
app:matProg_progressIndeterminate="true" />
|
||||
|
||||
</merge>
|
|
@ -150,6 +150,7 @@
|
|||
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
<item name="android:actionBarSize">?actionBarSize</item>
|
||||
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:panelColorBackground">#3c3c3c</item>
|
||||
|
@ -176,6 +177,7 @@
|
|||
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowActionModeOverlay">false</item>
|
||||
<item name="android:actionBarSize">?actionBarSize</item>
|
||||
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:panelColorBackground">#e5e5e5</item>
|
||||
|
|
Loading…
Reference in New Issue