Merge branch 'master' of ssh://github.com/TwidereProject/Twidere-Android

This commit is contained in:
Mariotaku Lee 2015-05-02 22:27:40 +08:00
commit daaa827260
28 changed files with 304 additions and 569 deletions

View File

@ -1,151 +0,0 @@
/*
* 版本1.0
* 日期2014-10-16
* Copyright (C) 2010 中国广东省珠海市魅族科技有限公司版权所有
* 修改历史记录
* 2014-10-16 初始版本创建
*/
package com.meizu.flyme.reflect;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.app.ActionBar;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.TypedValue;
/**
* <p>用以调用Flyme定制的API</p>
*
* @author MEIZU.SDK Team
*
*/
public class ActionBarProxy extends Proxy{
private static Class<?> sClass = ActionBar.class;
private static Method sSetBackButtonDrawableMethod;
private static Method sSetActionModeHeaderHiddenMethod;
private static Method sSetActionBarViewCollapsableMethod;
private static Method sSetOverFlowButtonDrawableMethod;
private static Method sSetTabsShowAtBottom;
/**
* 判断设备是否支持smart bar
* @return boolean true支持,false不支持
*/
public static boolean hasSmartBar() {
try {
Method method = Class.forName("android.os.Build").getMethod(
"hasSmartBar");
return ((Boolean) method.invoke(null)).booleanValue();
} catch (Exception e) {
}
return false;
}
/**
* 设置返回按钮图标
* @param actionbar 相应的ActionBar参数
* @param backIcon 返回按键的Icon
* @return boolean 执行结果
*/
public static boolean SetBackButtonDrawable(android.app.ActionBar actionbar,
Drawable backIcon) {
sSetBackButtonDrawableMethod = getMethod(sSetBackButtonDrawableMethod, sClass, "setBackButtonDrawable", new Class[] { Drawable.class });
return invoke(sSetBackButtonDrawableMethod, actionbar, backIcon);
}
/**
* 设置more按钮图标
* @return boolean 执行结果
*/
public static boolean SetOverFlowButtonDrawable(android.app.ActionBar actionbar,
Drawable drawable) {
sSetOverFlowButtonDrawableMethod = getMethod(sSetOverFlowButtonDrawableMethod, sClass, "setOverFlowButtonDrawable", new Class[] { Drawable.class });
return invoke(sSetOverFlowButtonDrawableMethod, actionbar, drawable);
}
/**
* 设置ActionMode顶栏是否隐藏
* @param bar 对应的ActionBar
* @param hide为true表示隐藏
* @return boolean 执行结果
*/
public static boolean setActionModeHeaderHidden(ActionBar bar, boolean hide) {
sSetActionModeHeaderHiddenMethod = getMethod(sSetActionModeHeaderHiddenMethod, sClass, "setActionModeHeaderHidden", boolean.class);
return invoke(sSetActionModeHeaderHiddenMethod, bar, hide);
}
/**
* 设置ActionBar顶栏无显示内容时是否隐藏
* @param bar
* @param collapsable
* @return boolen执行结果
*/
public static boolean setActionBarViewCollapsable(ActionBar bar, boolean collapsable) {
sSetActionBarViewCollapsableMethod = getMethod(sSetActionBarViewCollapsableMethod, sClass, "setActionBarViewCollapsable", boolean.class);
return invoke(sSetActionBarViewCollapsableMethod, bar, collapsable);
}
/**
* <p>
* 设置ActionBar Tabs显示在底栏不过需要配合
* android:uiOptions="splitActionBarWhenNarrow"
* <p>
* @param actionbar
* @param showAtBottom
* @return boolen 执行结果
*/
public static boolean setActionBarTabsShowAtBottom(
android.app.ActionBar actionbar, boolean showAtBottom) {
sSetTabsShowAtBottom = getMethod(sSetTabsShowAtBottom, sClass, "setTabsShowAtBottom", boolean.class);
return invoke(sSetTabsShowAtBottom, actionbar, showAtBottom);
}
/**
* 获取actionbar高度
* @param context 上下文
* @param actionbar 对应的ActionBar
* @return int ActionBar的高度值
*/
public static int getActionBarHeight(Context context, ActionBar actionbar) {
if(actionbar != null){
TypedValue tv = new TypedValue();
if (context.getTheme().resolveAttribute(android.R.attr.actionBarSize,
tv, true)) {
return TypedValue.complexToDimensionPixelSize(tv.data, context
.getResources().getDisplayMetrics());
}
return actionbar.getHeight();
}
return 0;
}
/**
* 获取smartbar高度
* @param context
* @param actionbar
* @return int SmartBar的高度值
*/
public static int getSmartBarHeight(Context context,ActionBar actionbar) {
if(actionbar != null){
try {
Class<?> c = Class.forName("com.android.internal.R$dimen");
Object obj = c.newInstance();
Field field = c.getField("mz_action_button_min_height");
int height = Integer.parseInt(field.get(obj).toString());
return context.getResources().getDimensionPixelSize(height);
} catch (Exception e) {
e.printStackTrace();
}
actionbar.getHeight();
}
return 0;
}
}

View File

@ -1,35 +0,0 @@
package com.meizu.flyme.reflect;
import java.lang.reflect.Method;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;
/**
* @author MEIZU.SDK Team
*
*/
public class InputMethodProxy extends Proxy {
private final static String TAG = "InputMethod";
private static Class<?> sClass = InputMethodManager.class;
private static Method sSetMzInputThemeLight;
/**
* 设置导航栏和输入法背景颜色在App启动第一个Actiity onCreate方法中调用该方法执行成功后App中使用系统输入法都是白色样式
* @param context 上下文
* @param light 是否把导航栏和输入法背景设置为白色
* @return boolean 执行结果成功执行返回true
*/
public static boolean setInputThemeLight(Context context, boolean light) {
sSetMzInputThemeLight = getMethod(sSetMzInputThemeLight, sClass,
"setMzInputThemeLight", boolean.class);
InputMethodManager imm = (InputMethodManager) context
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
return invoke(sSetMzInputThemeLight, imm, light);
}
return false;
}
}

View File

@ -1,79 +0,0 @@
/*
* 版本1.0
* 日期2014-10-16
* Copyright (C) 2010 中国广东省珠海市魅族科技有限公司版权所有
* 修改历史记录
* 2014-10-16 初始版本创建
*/
package com.meizu.flyme.reflect;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.app.Notification;
import android.app.Notification.Builder;
/**
* <p>用以调用Flyme定制的API</p>
*
* @author MEIZU.SDK Team
*
*/
public class NotificationProxy extends Proxy {
private static Class<?> sClass = Notification.Builder.class;
private static Field sField = null;
private static Object sObject = null;
private static Method sSetProgressBarStype = null;
private static Method sSetCircleProgressBarColor = null;
private static Method ssetCircleProgressRimColor = null;
/**
* 设置ProgressBar的类型
* @param builder 为Notification.Builder类
* @param isCircle true为圆环形false为普通直线形
*/
public static void setProgressBarStype(Builder builder, boolean isCircle){
try{
sField = sClass.getField("mFlymeNotificationBuilder");
sObject = sField.get(builder);
sSetProgressBarStype = sField.getType().getDeclaredMethod("setCircleProgressBar", boolean.class);
if(sObject != null){
invoke(sSetProgressBarStype, sObject, isCircle);
}
}catch(Exception ignore){
ignore.printStackTrace();
}
}
/**
* 设置圆环形ProgressBar活动进度条的颜色
* @param color 为颜色值
*/
public static void setCircleProgressBarColor(int color) {
try{
if(sField != null && sObject != null){
sSetCircleProgressBarColor = sField.getType().getDeclaredMethod("setCircleProgressBarColor", int.class);
invoke(sSetCircleProgressBarColor, sObject, color);
}
}catch(Exception ignore){
ignore.printStackTrace();
}
}
/**
* 设置圆环形ProgressBar外边环的颜色
* @param color 为颜色值
*/
public static void setCircleProgressRimColor(int color) {
try{
if(sField != null && sObject != null){
ssetCircleProgressRimColor = sField.getType().getDeclaredMethod("ssetCircleProgressRimColor", int.class);
invoke(ssetCircleProgressRimColor, sObject, color);
}
}catch(Exception ignore){
ignore.printStackTrace();
}
}
}

View File

@ -1,50 +0,0 @@
package com.meizu.flyme.reflect;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Proxy {
/**
* 获取方法
* @param method
* @param clazz
* @param name
* @param parameterTypes
* @return method
*/
protected static Method getMethod (Method method, Class<?> clazz, String name, Class<?>... parameterTypes) {
if (method == null) {
try {
method = clazz.getMethod(name, parameterTypes);
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
}
return method;
}
/**
* 执行方法
* @param method 方法
* @param obj 对像
* @param args 参数
* @return boolean 执行结果
*/
protected static boolean invoke (Method method, Object obj, Object... args) {
if (method != null) {
try {
method.invoke(obj, args);
return true;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
return false;
}
}

View File

@ -12,7 +12,6 @@ import java.lang.reflect.Field;
public class StatusBarProxy {
private final static String TAG = "StatusBar";
/**
* 设置状态栏图标为深色和魅族特定的文字风格
* @param window 需要设置的窗口
@ -40,67 +39,10 @@ public class StatusBarProxy {
meizuFlags.setInt(lp, value);
window.setAttributes(lp);
result = true;
} catch (Exception e) {
Log.e(TAG, "setStatusBarDarkIcon: failed");
} catch (Exception ignored) {
}
}
return result;
}
/**
* 设置沉浸式窗口设置成功后状态栏则透明显示
* @param window 需要设置的窗口
* @param immersive 是否把窗口设置为沉浸
* @return boolean 成功执行返回true
*/
@TargetApi(Build.VERSION_CODES.KITKAT)
public static boolean setImmersedWindow(Window window, boolean immersive) {
boolean result = false;
if (window != null) {
WindowManager.LayoutParams lp = window.getAttributes();
int trans_status = 0;
Field flags;
if (android.os.Build.VERSION.SDK_INT < 19) {
try {
trans_status = 1 << 6;
flags = lp.getClass().getDeclaredField("meizuFlags");
flags.setAccessible(true);
int value = flags.getInt(lp);
if (immersive) {
value = value | trans_status;
} else {
value = value & ~trans_status;
}
flags.setInt(lp, value);
result = true;
} catch (Exception e) {
Log.e(TAG, "setImmersedWindow: failed");
}
} else {
lp.flags |= WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
window.setAttributes(lp);
result = true;
}
}
return result;
}
/**
* 获取状态栏高度
* @param context 上下文
* @return int 状态栏高度
*/
public static int getStatusBarHeight(Context context) {
try {
Class<?> c = Class.forName("com.android.internal.R$dimen");
Object obj = c.newInstance();
Field field = c.getField("status_bar_height");
int height = Integer.parseInt(field.get(obj).toString());
return context.getResources().getDimensionPixelSize(height);
} catch (Exception e) {
e.printStackTrace();
}
return 75;
}
}

View File

@ -1,61 +0,0 @@
package com.meizu.flyme.reflect;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import android.app.WallpaperManager;
import android.content.Context;
public class WallpaperManagerProxy extends Proxy {
private final static String TAG = "WallpaperManagerProxy";
private static Class<?> sClass = WallpaperManager.class;
private static Method sSetLockWallpaper;
/**
* 从参数所提供的路径读取图片并设置为锁屏界面
* @param context 上下文
* @param path 图片的路径
* @return boolean 成功执行返回true
*/
public static boolean setLockWallpaper(Context context, String path) {
boolean result = false;
WallpaperManager wm = WallpaperManager.getInstance(context);
try {
InputStream is = new FileInputStream(path);
sSetLockWallpaper = getMethod(sSetLockWallpaper, sClass,
"setStreamToLockWallpaper", InputStream.class);
if (wm != null) {
result = invoke(sSetLockWallpaper, wm, is);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return result;
}
/**
* 从参数所提供的路径读取图片并设置为Home界面
* @param context 上下文
* @param path 图片的路径
* @return boolean 成功执行返回true
*/
public static boolean setHomeWallpaper(Context context, String path) {
boolean result = false;
WallpaperManager wm = WallpaperManager.getInstance(context);
try {
InputStream is = new FileInputStream(path);
wm.setStream(is);
result = true;
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
}

View File

@ -104,6 +104,7 @@ import org.mariotaku.twidere.util.message.UnreadCountUpdatedEvent;
import org.mariotaku.twidere.util.support.ActivitySupport;
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.ExtendedViewPager;
import org.mariotaku.twidere.view.HomeSlidingMenu;
import org.mariotaku.twidere.view.LeftDrawerFrameLayout;
@ -156,8 +157,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
private HomeSlidingMenu mSlidingMenu;
private View mEmptyTabHint;
private View mActionsButton;
private View mTabsContainer;
private View mActionBarOverlay;
private View mActionBarWithOverlay;
private LeftDrawerFrameLayout mLeftDrawerContainer;
private RightDrawerFrameLayout mRightDrawerContainer;
private TintedStatusFrameLayout mColorStatusFrameLayout;
@ -303,7 +303,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
@Override
public void setControlBarOffset(float offset) {
mTabsContainer.setTranslationY(mTabColumns > 1 ? 0 : getControlBarHeight() * (offset - 1));
mActionBarWithOverlay.setTranslationY(mTabColumns > 1 ? 0 : getControlBarHeight() * (offset - 1));
final ViewGroup.LayoutParams lp = mActionsButton.getLayoutParams();
if (lp instanceof MarginLayoutParams) {
mActionsButton.setTranslationY((((MarginLayoutParams) lp).bottomMargin + mActionsButton.getHeight()) * (1 - offset));
@ -380,9 +380,13 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
mActionsButton.setOnLongClickListener(this);
mEmptyTabHint.setOnClickListener(this);
ViewCompat.setElevation(mActionBar, ThemeUtils.getSupportActionBarElevation(this));
ThemeUtils.setCompatToolbarOverlay(this, new EmptyDrawable());
ThemeUtils.setCompatContentViewOverlay(this, new EmptyDrawable());
final View actionBarContainer = findViewById(R.id.twidere_action_bar_container);
ViewCompat.setElevation(actionBarContainer, ThemeUtils.getSupportActionBarElevation(this));
ViewSupport.setOutlineProvider(actionBarContainer, ViewOutlineProviderCompat.BACKGROUND);
final View windowOverlay = findViewById(R.id.window_overlay);
ViewSupport.setBackground(windowOverlay, ThemeUtils.getNormalWindowContentOverlay(this, getCurrentThemeResourceId()));
setupSlidingMenu();
setupBars();
showDataProfilingRequest();
@ -505,7 +509,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
@Override
public void onClick(final View v) {
switch (v.getId()) {
case R.id.action_buttons: {
case R.id.actions_button: {
triggerActionsClick();
break;
}
@ -527,7 +531,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
@Override
public boolean onLongClick(final View v) {
switch (v.getId()) {
case R.id.action_buttons: {
case R.id.actions_button: {
showMenuItemToast(v, v.getContentDescription(), true);
return true;
}
@ -645,21 +649,20 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
return 1 - mActionsButton.getTranslationY() / total;
}
final float totalHeight = getControlBarHeight();
return 1 + mTabsContainer.getTranslationY() / totalHeight;
return 1 + mActionBarWithOverlay.getTranslationY() / totalHeight;
}
@Override
public void onContentChanged() {
super.onContentChanged();
mActionBar = (Toolbar) findViewById(R.id.actionbar);
mActionBar = (Toolbar) findViewById(R.id.action_bar);
mTabIndicator = (TabPagerIndicator) findViewById(R.id.main_tabs);
mSlidingMenu = (HomeSlidingMenu) findViewById(R.id.home_menu);
mViewPager = (ExtendedViewPager) findViewById(R.id.main_pager);
mEmptyTabHint = findViewById(R.id.empty_tab_hint);
mActionsButton = findViewById(R.id.action_buttons);
mTabsContainer = findViewById(R.id.tabs_container);
mActionsButton = findViewById(R.id.actions_button);
mActionBarWithOverlay = findViewById(R.id.twidere_action_bar_with_overlay);
mTabIndicator = (TabPagerIndicator) findViewById(R.id.main_tabs);
mActionBarOverlay = findViewById(R.id.actionbar_overlay);
mColorStatusFrameLayout = (TintedStatusFrameLayout) findViewById(R.id.home_content);
}
@ -794,7 +797,7 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
final boolean isTransparent = ThemeUtils.isTransparentBackground(backgroundOption);
final int actionBarAlpha = isTransparent ? ThemeUtils.getUserThemeBackgroundAlpha(this) : 0xFF;
final IHomeActionButton homeActionButton = (IHomeActionButton) mActionsButton;
mTabIndicator.setItemContext(ThemeUtils.getActionBarContext(this));
mTabIndicator.setItemContext(ThemeUtils.getActionBarThemedContext(this, themeResId, themeColor));
ViewSupport.setBackground(mActionBar, ThemeUtils.getActionBarBackground(this, themeResId, themeColor,
backgroundOption, true));
final int statusBarColor;
@ -830,7 +833,6 @@ public class HomeActivity extends BaseAppCompatActivity implements OnClickListen
mColorStatusFrameLayout.setFactor(1);
mTabIndicator.setAlpha(actionBarAlpha / 255f);
mActionsButton.setAlpha(actionBarAlpha / 255f);
ViewSupport.setBackground(mActionBarOverlay, ThemeUtils.getWindowContentOverlay(this));
}
private void setupHomeTabs() {

View File

@ -96,7 +96,6 @@ public class LinkHandlerActivity extends BaseAppCompatActivity implements System
private ActionBarContainer mActionBarContainer;
private boolean mFinishOnly;
private int mActionBarItemsColor;
private int mActionBarHeight;
@ -280,7 +279,7 @@ public class LinkHandlerActivity extends BaseAppCompatActivity implements System
public void onContentChanged() {
super.onContentChanged();
mMainContent = (TintedStatusFrameLayout) findViewById(R.id.main_content);
mActionBarOverlay = findViewById(R.id.twidere_action_bar_overlay);
mActionBarOverlay = findViewById(R.id.twidere_action_bar_with_overlay);
mActionBarContainer = (ActionBarContainer) findViewById(R.id.twidere_action_bar_container);
}
@ -363,7 +362,6 @@ public class LinkHandlerActivity extends BaseAppCompatActivity implements System
ThemeUtils.setActionBarColor(getWindow(), getSupportActionBar(), titleColor, actionBarItemsColor);
}
}
mActionBarItemsColor = actionBarItemsColor;
}
private void setStatusBarColor(int linkId, Uri uri) {

View File

@ -100,7 +100,7 @@ public class ThemePreviewPreference extends Preference implements Constants, OnS
final View windowBackgroundView = view.findViewById(R.id.theme_preview_window_background);
final View windowContentOverlayView = view.findViewById(R.id.theme_preview_window_content_overlay);
final View actionBarOverlay = view.findViewById(R.id.actionbar_overlay);
final Toolbar actionBarView = (Toolbar) view.findViewById(R.id.actionbar);
final Toolbar actionBarView = (Toolbar) view.findViewById(R.id.action_bar);
final ActionMenuView menuBar = (ActionMenuView) view.findViewById(R.id.menu_bar);
final View statusContentView = view.findViewById(R.id.theme_preview_status_content);
final CardView cardView = (CardView) view.findViewById(R.id.card);

View File

@ -296,35 +296,6 @@ public class ThemeUtils implements Constants {
return ActionBarColorDrawable.create(actionBarColor, outlineEnabled);
}
public static Context getActionBarContext(final Context context) {
@SuppressLint("InlinedApi")
final TypedArray a = context.obtainStyledAttributes(new int[]{R.attr.actionBarTheme,
R.attr.actionBarWidgetTheme, android.R.attr.actionBarTheme,
android.R.attr.actionBarWidgetTheme});
final int resId;
if (a.hasValue(0) || a.hasValue(1)) {
resId = a.hasValue(0) ? a.getResourceId(0, 0) : a.getResourceId(1, 0);
} else {
resId = a.hasValue(2) ? a.getResourceId(2, 0) : a.getResourceId(3, 0);
}
a.recycle();
if (resId == 0) return context;
return new ContextThemeWrapper(context, resId);
}
public static float getActionBarElevation(final Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return 0;
@SuppressLint("InlinedApi")
@SuppressWarnings("ConstantConditions")
final TypedArray a = context.obtainStyledAttributes(null, new int[]{android.R.attr.elevation},
android.R.attr.actionBarStyle, 0);
try {
return a.getDimension(0, 0);
} finally {
a.recycle();
}
}
public static Drawable getActionBarHomeAsUpIndicator(android.support.v7.app.ActionBar actionBar) {
final Context context = actionBar.getThemedContext();
@SuppressWarnings("ConstantConditions")
@ -337,9 +308,7 @@ public class ThemeUtils implements Constants {
}
public static int getActionBarPopupThemeRes(final Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return 0;
@SuppressLint("InlinedApi")
final TypedArray a = context.obtainStyledAttributes(new int[]{android.R.attr.actionBarPopupTheme});
final TypedArray a = context.obtainStyledAttributes(new int[]{R.attr.actionBarPopupTheme});
try {
return a.getResourceId(0, 0);
} finally {
@ -1300,4 +1269,21 @@ public class ThemeUtils implements Constants {
return base;
}
}
public static Context getActionBarThemedContext(Context base, int themeId, int accentColor) {
final int actionBarThemeId;
if (isDarkTheme(themeId) || TwidereColorUtils.getYIQLuminance(accentColor) <= ACCENT_COLOR_THRESHOLD) {
actionBarThemeId = R.style.Theme_Twidere_Dark;
} else {
actionBarThemeId = R.style.Theme_Twidere_Light;
}
final Resources.Theme baseTheme = base.getTheme();
final Resources.Theme actionBarTheme = base.getResources().newTheme();
actionBarTheme.setTo(baseTheme);
actionBarTheme.applyStyle(actionBarThemeId, true);
final Context actionBarContext = new android.support.v7.internal.view.ContextThemeWrapper(base, 0);
actionBarContext.getTheme().setTo(actionBarTheme);
return actionBarContext;
}
}

View File

@ -165,7 +165,7 @@ public class ThemedLayoutInflaterFactory implements LayoutInflaterFactory {
}
}
if (view instanceof IThemeAccentView) {
if (isAccentOptimal) {
if (isAccentOptimal || !isColorTint) {
((IThemeAccentView) view).setAccentTintColor(ColorStateList.valueOf(accentColor));
} else {
final int defaultAccentColor = ThemeUtils.getColorFromAttribute(view.getContext(),
@ -178,7 +178,7 @@ public class ThemedLayoutInflaterFactory implements LayoutInflaterFactory {
}
} else if (view instanceof TintableBackgroundView) {
final TintableBackgroundView tintable = (TintableBackgroundView) view;
if (isAccentOptimal) {
if (isAccentOptimal || !isColorTint) {
applyTintableBackgroundViewTint(tintable, accentColor, noTintColor, backgroundTintColor, isColorTint);
}
} else if (view instanceof TwidereToolbar) {
@ -186,8 +186,8 @@ public class ThemedLayoutInflaterFactory implements LayoutInflaterFactory {
themeResourceId, actionBarColor);
((TwidereToolbar) view).setItemColor(itemColor);
} else if (view instanceof EditText) {
if (isAccentOptimal) {
ViewCompat.setBackgroundTintList(view, ColorStateList.valueOf(accentColor));
if (isAccentOptimal || !isColorTint) {
ViewCompat.setBackgroundTintList(view, ColorStateList.valueOf(backgroundTintColor));
}
} else if (view instanceof ProgressBar) {
if (isAccentOptimal) {

View File

@ -110,11 +110,14 @@ public class TwidereActionModeForChildListener implements NativeActionModeAwareL
if (mActionModeView == null) {
if (mIsFloating && mUsePopup) {
// Use the action bar theme.
final TypedValue outValue = new TypedValue();
final Resources.Theme baseTheme = mActivity.getTheme();
baseTheme.resolveAttribute(android.support.v7.appcompat.R.attr.actionBarTheme, outValue, true);
final Context actionBarContext = ThemeUtils.getActionBarThemedContext(mActivity);
final Context actionBarContext;
if (mActivity instanceof IThemedActivity) {
actionBarContext = ThemeUtils.getActionBarThemedContext(mActivity,
((IThemedActivity) mActivity).getCurrentThemeResourceId(),
((IThemedActivity) mActivity).getCurrentThemeColor());
} else {
actionBarContext = ThemeUtils.getActionBarThemedContext(mActivity);
}
mActionModeView = new ActionBarContextView(actionBarContext);
mActionModePopup = new PopupWindow(actionBarContext, null,
@ -122,6 +125,7 @@ public class TwidereActionModeForChildListener implements NativeActionModeAwareL
mActionModePopup.setContentView(mActionModeView);
mActionModePopup.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
final TypedValue outValue = new TypedValue();
actionBarContext.getTheme().resolveAttribute(
android.support.v7.appcompat.R.attr.actionBarSize, outValue, true);
final int height = TypedValue.complexToDimensionPixelSize(outValue.data,

View File

@ -38,6 +38,7 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import org.mariotaku.twidere.R;
import org.mariotaku.twidere.activity.iface.IThemedActivity;
import org.mariotaku.twidere.util.ThemeUtils;
import org.mariotaku.twidere.util.support.ViewSupport;
import org.mariotaku.twidere.util.support.graphics.OutlineCompat;
@ -87,8 +88,14 @@ public class HomeActionButton extends FrameLayout implements IHomeActionButton {
mHelper = new EffectViewHelper(this, new PressElevationProperty(elevation), 200);
if (isInEditMode()) {
inflate(context, R.layout.action_item_home_actions, this);
} else if (context instanceof IThemedActivity) {
int themeResourceId = ((IThemedActivity) context).getCurrentThemeResourceId();
int themeColor = ((IThemedActivity) context).getCurrentThemeColor();
inflate(ThemeUtils.getActionBarThemedContext(context, themeResourceId, themeColor),
R.layout.action_item_home_actions, this);
} else {
inflate(ThemeUtils.getActionBarContext(context), R.layout.action_item_home_actions, this);
inflate(ThemeUtils.getActionBarThemedContext(context), R.layout.action_item_home_actions,
this);
}
mIconView = (ImageView) findViewById(android.R.id.icon);
mProgressBar = (ProgressBar) findViewById(android.R.id.progress);

View File

@ -39,6 +39,7 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import org.mariotaku.twidere.R;
import org.mariotaku.twidere.activity.iface.IThemedActivity;
import org.mariotaku.twidere.util.ThemeUtils;
import org.mariotaku.twidere.util.TwidereColorUtils;
import org.mariotaku.twidere.util.support.ViewSupport;
@ -60,7 +61,17 @@ public class HomeActionButtonCompat extends FrameLayout implements IHomeActionBu
public HomeActionButtonCompat(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
inflate(ThemeUtils.getActionBarContext(context), R.layout.action_item_home_actions_compat, this);
if (isInEditMode()) {
inflate(context, R.layout.action_item_home_actions_compat, this);
} else if (context instanceof IThemedActivity) {
int themeResourceId = ((IThemedActivity) context).getCurrentThemeResourceId();
int themeColor = ((IThemedActivity) context).getCurrentThemeColor();
inflate(ThemeUtils.getActionBarThemedContext(context, themeResourceId, themeColor),
R.layout.action_item_home_actions_compat, this);
} else {
inflate(ThemeUtils.getActionBarThemedContext(context), R.layout.action_item_home_actions_compat,
this);
}
mIconView = (ImageView) findViewById(android.R.id.icon);
mProgressBar = (ProgressBar) findViewById(android.R.id.progress);
final Resources resources = getResources();

View File

@ -1,43 +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/>.
*/
* 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.content.Context;
import android.content.res.TypedArray;
import android.support.v7.internal.widget.ActionBarContainer;
import android.util.AttributeSet;
import org.mariotaku.twidere.R;
import org.mariotaku.twidere.activity.iface.IThemedActivity;
import org.mariotaku.twidere.util.ThemeUtils;
/**
* Created by mariotaku on 15/4/28.
*/
public class TwidereActionBarContainer extends ActionBarContainer {
public TwidereActionBarContainer(Context context) {
super(wrapContext(context));
}
private static final int[] ATTRS = {android.R.attr.layout};
public TwidereActionBarContainer(Context context, AttributeSet attrs) {
super(wrapContext(context), attrs);
final TypedArray a = getContext().obtainStyledAttributes(attrs, ATTRS);
inflate(getContext(), a.getResourceId(0, R.layout.layout_actionbar_content), this);
a.recycle();
}
private static Context wrapContext(Context context) {
if (context instanceof IThemedActivity) {
return ThemeUtils.getActionBarThemedContext(context,
((IThemedActivity) context).getCurrentThemeResourceId(),
((IThemedActivity) context).getCurrentThemeColor());
}
return ThemeUtils.getActionBarThemedContext(context);
}
}

View File

@ -42,6 +42,7 @@
<string name="select_account">Seleccione la cuenta</string>
<string name="username">Nombre de usuario</string>
<string name="password">Contraseña</string>
<string name="label_data_provider">Proveedor de base de datos Twidere</string>
<string name="label_refresh_service">Recargar servicio</string>
<string name="label_background_operation_service">Servicio en segundo plano</string>
<string name="open_in_browser">Abrir en el navegador</string>
@ -199,7 +200,7 @@
<string name="item_2_hours">2 horas</string>
<string name="item_4_hours">4 horas</string>
<string name="display_image_preview">Mostrar imagen previa</string>
<string name="following_you">Siguiéndote</string>
<string name="following_you">Te sigue</string>
<string name="user_list">Lista</string>
<string name="user_lists">Listas</string>
<string name="trends_location">Ubicación de las tendencias</string>
@ -479,7 +480,7 @@
<string name="wizard_page_tabs_unchanged_message">Puedes añadir pestañas en \"Configuración\">\"Pestañas\"</string>
<string name="wizard_page_cards_text">Configura artículos de la tarjeta.</string>
<string name="wizard_page_hints_text">Aquí algunos consejos útiles.</string>
<string name="wizard_page_usage_statistics_text">Twidere participa de un proyecto de investigación que necesita algunos datos de uso.</string>
<string name="wizard_page_usage_statistics_text">Twidere participa en un proyecto de investigación que necesita algunos datos de uso.</string>
<string name="wizard_page_finished_title">Finalizado</string>
<string name="wizard_page_finished_text">Ahora Twidere está preparado para usarse.</string>
<string name="invalid_tab">Pestaña inválida</string>
@ -664,6 +665,8 @@
<string name="members">Miembros</string>
<string name="subscribers">Suscriptor</string>
<string name="read_from_bottom">Leer desde el final</string>
<string name="read_from_bottom_summary_off">Saltar al último tuit después de actualizar</string>
<string name="read_from_bottom_summary_on">Mantenga la posición de lectura después de actualizar</string>
<string name="register">Registrar</string>
<string name="follows">Sigue</string>
<string name="belongs_to">Pertenece a</string>
@ -708,6 +711,7 @@
<string name="permission_label_shorten_status">Acortar tweet</string>
<string name="permission_label_upload_media">Subir archivos multimédia</string>
<string name="permission_label_sync_timeline">Sincronizar cronología</string>
<string name="thumbor_integration">Integración con Thumbor</string>
<string name="server_address">Dirección del servidor</string>
<string name="security_key">Llave de seguridad</string>
<string name="hide_card_actions">Ocultar acciones de las tarjetas</string>
@ -723,4 +727,13 @@
<string name="navigation">Navegación</string>
<string name="reset_to_default">Restablecer a los valores por defecto</string>
<string name="reset_keyboard_shortcuts_confirm">¿Restablecer a valores por defecto los atajos de teclado?</string>
<string name="open_accounts_dashboard">Abrir el panel de tus cuentas</string>
<string name="previous_tab">Pestaña anterior</string>
<string name="next_tab">Pestaña siguiente</string>
<string name="keyboard_shortcut_back">Volver</string>
<string name="press_again_to_close">Presione de nuevo para cerrar</string>
<string name="name_not_set"><xliff:g id="name">%s</xliff:g> no establecido</string>
<string name="swipe_down_to_refresh">Desliza hacia abajo para actualizar</string>
<string name="app_restart_confirm">Twidere se reiniciará para aplicar los ajustes.</string>
<string name="dont_restart">No reinicie</string>
</resources>

View File

@ -42,6 +42,7 @@
<string name="select_account">Pilih akun</string>
<string name="username">Nama pengguna</string>
<string name="password">Kata Sandi</string>
<string name="label_data_provider">Penyedia jasa basis data Twidere</string>
<string name="label_refresh_service">Segarkan layanan</string>
<string name="label_background_operation_service">Latar Belakang layanan operasi</string>
<string name="open_in_browser">Buka di Browser</string>
@ -241,6 +242,7 @@
<string name="status_shortener">Penyingkat kicauan</string>
<string name="status_shortener_default">Tidak ada (Batal mengirim)</string>
<string name="error_message_status_too_long">Kicauan terlalu panjang.</string>
<string name="error_message_message_too_long">Pesan terlalu panjang.</string>
<string name="error_message_no_content">Tidak ada konten</string>
<string name="error_message_tweet_shorten_failed">Penyingkat kicauan gagal.</string>
<string name="error_message_tweet_shortener_not_found">Pemendek kicauan tidak ditemukan, mungkin tidak dipasang.</string>
@ -256,6 +258,8 @@
<string name="Nitems_selected_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> item terpilih</string>
<string name="custom_host_mapping">Kustom host mapping</string>
<string name="custom_host_mapping_summary">Host pemetaan sperti /etc/hosts, tanpa butuh permisi tambahan.</string>
<string name="host_mapping_host">Host</string>
<string name="host_mapping_address">Alamat (bisa alamat host lain)</string>
<string name="add_host_mapping">Tambah pemetaan host</string>
<string name="tcp_dns_query">TCP DNS Query</string>
<string name="tcp_dns_query_summary">Gunakan protokol TCP untuk permintaan DNS dan menghindari DNS Cache Posioning.</string>
@ -265,6 +269,7 @@
<string name="activities_by_friends">Aktivitas oleh teman-teman</string>
<string name="activity_about_me_favorite"><xliff:g id="user">%s</xliff:g> memfavoriti tweet anda.</string>
<string name="activity_about_me_favorite_multi"><xliff:g id="user">%1$s</xliff:g> and <xliff:g id="other">%2$s</xliff:g> Tweet anda difavoritkan.</string>
<string name="activity_about_me_favorited_retweet"><xliff:g id="user">%s</xliff:g> memfavoriti tweet anda.</string>
<string name="activity_about_me_follow"><xliff:g id="user">%s</xliff:g> mengikuti Anda.</string>
<string name="activity_about_me_retweet"><xliff:g id="user">%s</xliff:g> me-retweet tweet anda.</string>
<string name="activity_about_me_list_member_added"><xliff:g id="user">%s</xliff:g> menambahkan Anda ke dalam daftar.</string>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="error_http_407">Otentifikasi proksi dibutuhkan</string>
</resources>

View File

@ -11,6 +11,7 @@
<string name="remove_location">Вилучити місце розташування</string>
<string name="remove_image">Видалити зображення</string>
<string name="remove_photo">Видалити світлину</string>
<string name="status_hint">Що трапилося?</string>
<string name="sign_up">Зареєструватися</string>
<string name="sign_in">Увійти</string>
<string name="rest_base_url">REST Base URL</string>
@ -81,9 +82,21 @@
<string name="look_and_feel">Зовнішній вигляд</string>
<string name="display_profile_image">Зображення профілю</string>
<string name="image_load_summary">Відключення цього параметру збільшить швидкість прокрутки списку і зменшить використання даних.</string>
<string name="in_reply_to_name">У відповідь на <xliff:g id="user_name">%s</xliff:g></string>
<string name="name_retweeted"><xliff:g id="user_name">%s</xliff:g> ретвітнув це</string>
<string name="name_and_another_retweeted"><xliff:g id="user_name">%1$s</xliff:g> та інші ретвітнули це</string>
<string name="name_and_count_retweeted"><xliff:g id="user_name">%1$s</xliff:g> та <xliff:g id="retweet_count">%2$d</xliff:g> інших ретвітнули це</string>
<string name="N_retweeted_quantity_one" tools:ignore="PluralsCandidate"><xliff:g id="retweet_count">%d</xliff:g> ретвіт</string>
<string name="N_retweeted_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="retweet_count">%d</xliff:g> ретвіти</string>
<string name="retweeted_by_name">Ретвітнув <xliff:g id="user_name">%s</xliff:g></string>
<string name="retweeted_by_name_with_count">Ретвітнув <xliff:g id="user_name">%1$s</xliff:g> та <xliff:g id="retweet_count">%2$d</xliff:g> інших</string>
<string name="retweeted_by_count">Ретвітнули <xliff:g id="retweet_count">%d</xliff:g> користувачів</string>
<string name="users_retweeted_this">Користувачі, які ретвітнули це</string>
<string name="users_favorited_this">Додали до обраного</string>
<string name="reply_to">Відповідь на <xliff:g id="user_name">%s</xliff:g></string>
<string name="quote_user">Цитата <xliff:g id="user_name">%s</xliff:g></string>
<string name="time_source"><xliff:g id="time">%1$s</xliff:g> · <xliff:g id="source">%2$s</xliff:g></string>
<string name="source"><xliff:g id="source">%s</xliff:g></string>
<string name="filters">Фільтри</string>
<string name="users">Користувачі</string>
<string name="user">Користувач</string>
@ -102,9 +115,11 @@
<string name="load_item_limit">Кількість завантажених елементів</string>
<string name="load_item_limit_summary">Встановити обмеження кількості елементів для завантаження.</string>
<string name="load_more_automatically">Завантажувати додатковий матеріал автоматично</string>
<string name="load_more_automatically_summary">Завантажити додатковий контент (фото, карти, твіти) автоматично</string>
<string name="quote">Цитата</string>
<string name="add_rule">Додати правило</string>
<string name="text_size">Розмір тексту</string>
<string name="text_size_summary">Розмір тексту твітів.</string>
<string name="cannot_get_location">Не вдається отримати ваше розташування.</string>
<string name="drafts">Чернетки</string>
<string name="description">Опис</string>
@ -133,6 +148,7 @@
<string name="reported_users_for_spam">Повідомити про спам від цих користувачів.</string>
<string name="filename_hint">Ім\'я файлу</string>
<string name="please_wait">Зачекайте.</string>
<string name="saved_to_gallery">Збережено до галереї.</string>
<string name="proxy">Проксі</string>
<string name="http_proxy">HTTP проксі</string>
<string name="http_proxy_summary">Використовувати HTTP проксі для всіх мережевих запитів.</string>
@ -141,6 +157,11 @@
<string name="block">Блокувати</string>
<string name="unblock">Розблокувати</string>
<string name="report_for_spam">Звіт про спам</string>
<string name="twitter_mute_user">Ігнорувати користувача</string>
<string name="twitter_muted_users">Ігноровані користувачі</string>
<string name="message_user_muted">Користувача додано до списку виключених. Його твіти не з\'являться у вашій стрічці та посиланнях.</string>
<string name="message_users_muted">Користувачів додано до списку виключених. Їх твіти не з\'являться у вашій стрічці та посиланнях.</string>
<string name="message_user_unmuted">Користувача видалено зі списку виключених.</string>
<string name="inbox">Вхідні</string>
<string name="load_images">Завантажити зображення</string>
<string name="other_settings">Інші налаштування</string>
@ -163,8 +184,10 @@
<string name="list_members">Список учасників</string>
<string name="list_subscribers">Список підписувачів</string>
<string name="type_to_compose">Напишіть повідомлення</string>
<string name="lists">Списки</string>
<string name="users_lists">Списки користувачів</string>
<string name="lists_following_user">Списки підписаних на цього користувача</string>
<string name="lists_following_you">Читачі</string>
<string name="item_3_minutes">3 хвилини</string>
<string name="item_5_minutes">5 хвилин</string>
<string name="item_10_minutes">10 хвилин</string>
@ -183,6 +206,7 @@
<string name="accounts">Профілі</string>
<string name="account">Профіль</string>
<string name="mention_this_user">Згадати цього користувача</string>
<string name="mention_user_name">Згадка <xliff:g id="name">%1$s</xliff:g></string>
<string name="signing_in_please_wait">Увійдіть, будь ласка, зачекайте та натисніть НАЗАД, щоб вийти.</string>
<string name="connectivity">З\'єднання</string>
<string name="add_member">Додати користувача</string>
@ -205,13 +229,17 @@
<string name="network">Мережа</string>
<string name="content_and_storage">Матеріал і збереження</string>
<string name="image_uploader">Завантажувач зображень</string>
<string name="media_uploader">Завантажувач медіа</string>
<string name="image_uploader_default">Типовий (Твіттер)</string>
<string name="home_refresh">Оновлення у домашній стрічці</string>
<string name="error_message_image_upload_failed">Не вдалося завантажити зображення.</string>
<string name="error_message_image_uploader_not_found">Завантажувач зображень не знайдено, можливо, він видалений.</string>
<string name="image_upload_format">Формат твіта із зображенням</string>
<string name="image_upload_format_summary">\"[LINK]\" = посилання зображення\n\"[TEXT]\" = Текст твіту\n(Розширення тільки)</string>
<string name="status_shortener">Скорочувач твітів</string>
<string name="status_shortener_default">Нічого (Відміна надсилання)</string>
<string name="error_message_status_too_long">Твіт надто довгий.</string>
<string name="error_message_message_too_long">Повідомлення занадто довге.</string>
<string name="error_message_no_content">Нема вмісту</string>
<string name="error_message_tweet_shorten_failed">Помилка скорочувача посилань.</string>
<string name="error_message_tweet_shortener_not_found">Скорочувач посилань не знайдено, можливо, він вилучений.</string>
@ -235,14 +263,26 @@
<string name="activities_about_me">Моя діяльність</string>
<string name="activities_by_friends">Діяльність за друзями</string>
<string name="activity_about_me_favorite"><xliff:g id="user">%s</xliff:g> додав у обране ваш твіт.</string>
<string name="activity_about_me_favorite_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> додали до обраного ваш твіт.</string>
<string name="activity_about_me_favorited_retweet"><xliff:g id="user">%s</xliff:g> додав до обраного ваш ретвіт.</string>
<string name="activity_about_me_favorited_retweet_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> користувачів додали до обраного ваш ретвіт.</string>
<string name="activity_about_me_follow"><xliff:g id="user">%s</xliff:g> підписаний на вас.</string>
<string name="activity_about_me_follow_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> користувачів читають вас.</string>
<string name="activity_about_me_retweet"><xliff:g id="user">%s</xliff:g> ретвітнув ваш твіт.</string>
<string name="activity_about_me_retweet_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> користувачів ретвітнули вас.</string>
<string name="activity_about_me_retweeted_retweet"><xliff:g id="user">%s</xliff:g> ретвітнув ваш ретвіт.</string>
<string name="activity_about_me_retweeted_retweet_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> користувачів ретвітнули ваш ретвіт.</string>
<string name="activity_about_me_list_member_added"><xliff:g id="user">%s</xliff:g> додав вас у свій список.</string>
<string name="activity_about_me_list_member_added_with_name"><xliff:g id="user">%1$s</xliff:g> додав(-ла) вас до списку <xliff:g id="list">%2$s</xliff:g>\".</string>
<string name="activity_about_me_list_member_added_multi"><xliff:g id="user">%1$s</xliff:g> та ще <xliff:g id="other">%2$s</xliff:g> користувачів додали вас до списків.</string>
<string name="activity_by_friends_favorite"><xliff:g id="user">%1$s</xliff:g> додав у обране твіт <xliff:g id="target">%2$s</xliff:g>.</string>
<string name="activity_by_friends_favorite_multi"><xliff:g id="user">%1$s</xliff:g> додав(-ла) до обраного твіти <xliff:g id="target">%2$s</xliff:g> та ще <xliff:g id="other">%3$s</xliff:g> інших.</string>
<string name="activity_by_friends_follow"><xliff:g id="user">%1$s</xliff:g> слідкує за <xliff:g id="target">%2$s</xliff:g>.</string>
<string name="activity_by_friends_follow_multi"><xliff:g id="user">%1$s</xliff:g> читають <xliff:g id="target">%2$s</xliff:g> та ще <xliff:g id="other">%3$s</xliff:g> користувачів.</string>
<string name="activity_by_friends_retweet"><xliff:g id="user">%1$s</xliff:g> ретвітнув твіт <xliff:g id="target">%2$s</xliff:g>.</string>
<string name="activity_by_friends_list_member_added"><xliff:g id="user">%1$s</xliff:g> додав <xliff:g id="target">%2$s</xliff:g> до списку.</string>
<string name="activity_by_friends_list_created"><xliff:g id="user">%1$s</xliff:g> створив список <xliff:g id="target">%2$s</xliff:g>.</string>
<string name="activity_by_friends_list_created_multi"><xliff:g id="user">%1$s</xliff:g> створив список <xliff:g id="target">%2$s</xliff:g> та ще <xliff:g id="other">%1$s</xliff:g>.</string>
<string name="status_not_updated">Твіт не надіслано.</string>
<string name="status_not_updated_summary">Твіт не надіслано і збережено до чернеток.</string>
<string name="incoming_friendships">Очікування запитів на підписку</string>
@ -317,10 +357,12 @@
<string name="permission_description_accounts">Читати інформацію облікового запису</string>
<string name="permission_description_preferences">Налаштування читання</string>
<string name="permissions_request">Запит на дозволи</string>
<string name="permissions_request_message">Додаток потребує наступних прав</string>
<string name="accept_permission_request">Прийняти</string>
<string name="no_thanks">Ні, дякую</string>
<string name="revoke_permissions">Перерозподілити права</string>
<string name="fast_scroll_thumb">Швидка прокрутка пальцем</string>
<string name="indicate_your_status">Вказати ват твіт</string>
<string name="default_ringtone">Типова мелодія</string>
<string name="phishing_link_warning">Попередження про фішингове посилання</string>
<string name="phishing_link_warning_summary">Попереджати, коли ви намагаєтеся відкрити можливе фішингове посилання у приватному повідомленні.</string>
@ -335,6 +377,7 @@
<string name="quote_protected_status_notice">Не рекомендується цитувати захищений твіт. </string>
<string name="edit_draft">Редагувати чернетку</string>
<string name="profile_image">Зображення профілю</string>
<string name="your_profile_image">Зображення профілю</string>
<string name="mention_user">Згадка <xliff:g id="user">%s</xliff:g></string>
<string name="theme_color">Колір теми</string>
<string name="wrong_url_format">Невірний формат URL.</string>
@ -389,6 +432,8 @@
<string name="no_close_after_status_updated_summary">Маленький подарунок для базіки</string>
<string name="status_saved_to_draft">Твіт збережено у чернетці.</string>
<string name="default_account">Типовий профіль</string>
<string name="created_at_with_N_tweets_per_day_quantity_one" tools:ignore="PluralsCandidate"><xliff:g id="created_at">%1$s</xliff:g> (<xliff:g id="daily_tweet">%2$d</xliff:g> твіт на день)</string>
<string name="created_at_with_N_tweets_per_day_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="created_at">%1$s</xliff:g> (<xliff:g id="daily_tweet">%2$d</xliff:g> твітів на день)</string>
<string name="empty_content">Порожній вміст</string>
<string name="fast_image_loading">Швидке завантаження зображення</string>
<string name="fast_image_loading_summary">Вмикання робить завантаження зображень швидшим, вимкніть це, якщо деякі малюнки не відображаються.</string>
@ -416,6 +461,9 @@
<string name="users_statuses">Твіти користувача</string>
<string name="card_animation">Анімація картки</string>
<string name="name_first">Відображати спершу ім\'я</string>
<string name="next_step">Далі</string>
<string name="previous_item">Попередній</string>
<string name="next_item">Далі</string>
<string name="settings_wizard">Параметри майстра</string>
<string name="wizard_page_welcome_title">Ласкаво просимо</string>
<string name="wizard_page_welcome_text">Дякуємо за вибір Twidere.\nВи б хотіли налаштувати його зараз?</string>
@ -427,6 +475,7 @@
<string name="wizard_page_tabs_unchanged_message">Ви можете додати вкладки у \"Налаштування\" - \"Вкладки\"</string>
<string name="wizard_page_cards_text">Елементи налаштування карти.</string>
<string name="wizard_page_hints_text">Ось декілька корисних порад.</string>
<string name="wizard_page_usage_statistics_text">Twidere приймає участь у дослідницькому проєкті, який потребує збору деяких даних о використанні програми.</string>
<string name="wizard_page_finished_title">Завершено</string>
<string name="wizard_page_finished_text">Вже Twidere - готовий для використання.</string>
<string name="invalid_tab">Невірна вкладка</string>
@ -445,6 +494,8 @@
<string name="unsubscribe_from_user_list_confirm_message">Відписатися від списку <xliff:g id="name">%s</xliff:g>? Ви зможете пізніше повторно підписатися на цей список.</string>
<string name="destroy_status">Видалити твіт</string>
<string name="destroy_status_confirm_message">Видалити цей твіт?</string>
<string name="destroy_saved_search">Видалити збережений пошуковий запит \"<xliff:g id="name">%s</xliff:g>\"</string>
<string name="destroy_saved_search_confirm_message">Видалити збережений пошуковий запит \"<xliff:g id="name">%s</xliff:g>\"? Збереження цього пошуку можна буде повторити згодом.</string>
<string name="signing_in_error_browser_sign_in_hint">Помилка при вході, вам потрібно використати вхід через браузер. (Він ігноруватиме ваші налаштування API при вході)</string>
<string name="report_user">Повідомити про <xliff:g id="name">%s</xliff:g></string>
<string name="report_user_confirm_message">Повідомити про <xliff:g id="name">%s</xliff:g> як про спамера? Ви також заблокуєте цього користувача.</string>
@ -457,6 +508,7 @@
<string name="translate">Перекласти</string>
<string name="sponsored_by">Спонсоровано</string>
<string name="special_thanks_to">Окрема подяка</string>
<string name="contributors_list_summary">Якщо не знаходите свого імені, напишіть нам.</string>
<string name="account_options">Параметри профілю</string>
<string name="show_in_timeline">Показати у часовій стрічці</string>
<string name="cards">Картки</string>
@ -468,6 +520,7 @@
<string name="general">Загальні</string>
<string name="hints">Підказки</string>
<string name="finish">Завершити</string>
<string name="background">Фон</string>
<string name="theme_background_default">Типово</string>
<string name="theme_background_solid">Суцільно біле/чорне</string>
<string name="theme_background_transparent">Прозоре</string>
@ -484,6 +537,8 @@
<string name="N_new_mentions_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> нові згадки</string>
<string name="N_new_messages_quantity_one" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> нова розмова</string>
<string name="N_new_messages_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> нові розмови</string>
<string name="status_share_subject_format_with_time">Твіт від <xliff:g id="name">%1$s</xliff:g> (@<xliff:g id="screen_name">%2$s</xliff:g>), о <xliff:g id="time">%3$s</xliff:g></string>
<string name="status_share_text_format_with_link"><xliff:g id="text">%1$s</xliff:g>\n\n<xliff:g id="link">%2$s</xliff:g></string>
<string name="rate_limit">Обмеження частоти</string>
<string name="wizard_hint_rate_limit">Якщо ви зіткнулися з проблемою обмеження частоти, то, будь ласка, не звинувачуйте мене, це політика в Twitter.</string>
<string name="preparing_database">Підготовка бази даних</string>
@ -523,5 +578,53 @@
<string name="status_text_limit">Обмеження довжини твіту</string>
<string name="load_more_from_top">Завантажувати більше зверху</string>
<string name="load_more_from_top_summary">Корисно, якщо ви віддаєте перевагу читати знизу вгору</string>
<string name="compose_now">Новий твіт</string>
<string name="compose_now_summary">Замінює механізм швидкого запуску Google Now на екран Новий твіт</string>
<string name="compose_now_action">Дія Новий твіт</string>
<string name="open_with_account">Відкрити профілем</string>
<string name="card_highlight_option_highlight">Виділення кольором</string>
<string name="timeline_sync_service">Сервіс синхронізації стрічки</string>
<string name="image_preview_scale_type">Спосіб збільшення зображення для перегляду</string>
<string name="image_preview_scale_type_crop">Обрізати</string>
<string name="image_preview_scale_type_fit_center">Вмістити центроване</string>
<string name="quote_protected_status_warning_message">Цей твіт захищено.\n\nЗахищені користувачі зазвичай не дають згоду на вільне розповсюдження своїх твітів.</string>
<string name="send_anyway">Все одно відправити</string>
<string name="following_only">Тільки для ваших читачів</string>
<string name="following_only_summary">Показувати сповіщення тільки від читачів.</string>
<string name="new_direct_message">Нове приватне повідомлення</string>
<string name="plain_list_style">Плаский список</string>
<string name="want_old_icon_back">Мрієш повернути стару піктограму?</string>
<string name="icon_restored_message">Піктограма відновлена!</string>
<string name="add">Додати</string>
<string name="N_media_quantity_one" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> медійних файлів</string>
<string name="N_media_quantity_other" tools:ignore="PluralsCandidate"><xliff:g id="items">%d</xliff:g> медійних файлів</string>
<string name="delete_drafts_confirm">Видалити обрані чернетки?</string>
<string name="extra_configurations">Додаткові налаштування</string>
<string name="click_item_to_config">Оберіть елемент для налаштування</string>
<string name="dark_drawer">Темне випадаюче меню</string>
<string name="retweets_of_me">Ретвіти мене</string>
<string name="from_gallery">З галереї</string>
<string name="from_camera">Зробити фото</string>
<string name="api_url_format_help">[DOMAIN]: Twitter API домен.\nПриклад: https://[DOMAIN].twitter.com/ буде змінено на https://api.twitter.com/.</string>
<string name="no_version_suffix">Без суфіксу версії</string>
<string name="inverse_selection">Інвертувати виділення</string>
<string name="edit_media">Редагувати медіа</string>
<string name="media">Медіа</string>
<string name="mute_user">Ігнорувати <xliff:g id="name">%s</xliff:g></string>
<string name="muted_user">Ігнорований <xliff:g id="name">%s</xliff:g></string>
<string name="unmute_user">Не ігнорувати <xliff:g id="name">%s</xliff:g></string>
<string name="unmuted_user"><xliff:g id="name">%s</xliff:g> більше не ігнорується</string>
<string name="mute">Ігнорувати</string>
<string name="unmute">Вимкнути ігнор</string>
<string name="action_muting">ігнорування</string>
<string name="action_unmuting">зняття ігнорування</string>
<string name="mute_user_confirm_message">Ігнорувати <xliff:g id="name">%s</xliff:g>? Ви більше не побачите твітів користувача, але все одно будете його читачем.</string>
<string name="blocked_by_user_summary">Ви заблоковані користувачем <xliff:g id="name">%s</xliff:g></string>
<string name="overwrite">Перезаписати</string>
<string name="previous_tab">Попередня вкладка</string>
<string name="next_tab">Наступна вкладка</string>
<string name="keyboard_shortcut_back">Назад</string>
<string name="press_again_to_close">Натисни ще раз, щоб закрити</string>
<string name="name_not_set"><xliff:g id="name">%s</xliff:g> не встановлено</string>
<string name="swipe_down_to_refresh">Потягни униз для оновлення</string>
</resources>

View File

@ -19,7 +19,7 @@
-->
<org.mariotaku.twidere.view.HomeActionButton
android:id="@+id/action_buttons"
android:id="@+id/actions_button"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/float_action_button_size"
android:layout_height="@dimen/float_action_button_size"

View File

@ -30,7 +30,7 @@
android:layout_height="match_parent" />
<RelativeLayout
android:id="@+id/twidere_action_bar_overlay"
android:id="@+id/twidere_action_bar_with_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@ -41,26 +41,8 @@
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:layout_alignParentTop="true"
android:gravity="top"
android:touchscreenBlocksFocus="true"
tools:ignore="UnusedAttribute">
<org.mariotaku.twidere.view.TwidereToolbar
android:id="@+id/action_bar"
style="?attr/toolbarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationContentDescription="@string/abc_action_bar_up_description" />
<android.support.v7.internal.widget.ActionBarContextView
android:id="@+id/action_context_bar"
style="?attr/actionModeStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/actionBarTheme"
android:visibility="gone" />
</org.mariotaku.twidere.view.TwidereActionBarContainer>
tools:ignore="UnusedAttribute" />
<View
android:id="@+id/window_overlay"

View File

@ -23,7 +23,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<org.mariotaku.twidere.view.ExtendedViewPager
android:id="@+id/main_pager"
@ -34,37 +35,29 @@
<include layout="@layout/layout_empty_tab_hint"/>
<LinearLayout
android:id="@+id/tabs_container"
<RelativeLayout
android:id="@+id/twidere_action_bar_with_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/actionbar"
style="?actionBarStyle"
<org.mariotaku.twidere.view.TwidereActionBarContainer
android:id="@+id/twidere_action_bar_container"
style="?attr/actionBarStyle"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp">
<org.mariotaku.twidere.view.TabPagerIndicator
android:id="@+id/main_tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:tabExpandEnabled="true"
app:tabHorizontalPadding="@dimen/element_spacing_normal"/>
</android.support.v7.widget.Toolbar>
android:layout_alignParentTop="true"
android:layout="@layout/layout_actionbar_home"
android:touchscreenBlocksFocus="true"
tools:ignore="UnusedAttribute" />
<View
android:id="@+id/actionbar_overlay"
android:id="@+id/window_overlay"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
android:layout_height="wrap_content"
android:layout_below="@+id/twidere_action_bar_container"
android:background="?android:windowContentOverlay" />
</RelativeLayout>
<include layout="@layout/layout_home_actions_button"/>
</org.mariotaku.twidere.view.MainFrameLayout>

View File

@ -24,6 +24,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/element_spacing_normal"
android:paddingBottom="@dimen/element_spacing_normal"
android:paddingLeft="@dimen/element_spacing_large"
android:paddingRight="@dimen/element_spacing_large">

View File

@ -18,8 +18,8 @@
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -29,10 +29,10 @@
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/status_container"
android:layout_alignRight="@+id/status_container"
android:baselineAligned="false"
android:orientation="horizontal"
android:visibility="visible"
tools:visibility="gone"
android:padding="@dimen/element_spacing_large">
<ProgressBar

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<org.mariotaku.twidere.view.TwidereToolbar
android:id="@+id/action_bar"
style="?attr/toolbarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationContentDescription="@string/abc_action_bar_up_description" />
<android.support.v7.internal.widget.ActionBarContextView
android:id="@+id/action_context_bar"
style="?attr/actionModeStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/actionBarTheme"
android:visibility="gone" />
</merge>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<org.mariotaku.twidere.view.TwidereToolbar
android:id="@+id/action_bar"
style="?attr/toolbarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationContentDescription="@string/abc_action_bar_up_description"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp">
<org.mariotaku.twidere.view.TabPagerIndicator
android:id="@+id/main_tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:tabExpandEnabled="true"
app:tabHorizontalPadding="@dimen/element_spacing_normal" />
</org.mariotaku.twidere.view.TwidereToolbar>
<android.support.v7.internal.widget.ActionBarContextView
android:id="@+id/action_context_bar"
style="?attr/actionModeStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/actionBarTheme"
android:visibility="gone" />
</merge>

View File

@ -19,7 +19,7 @@
-->
<org.mariotaku.twidere.view.HomeActionButtonCompat
android:id="@+id/action_buttons"
android:id="@+id/actions_button"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -44,7 +44,7 @@
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/actionbar"
android:id="@+id/action_bar"
style="?actionBarStyle"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"