Medium phone text

This commit is contained in:
世界 2020-06-26 08:48:53 +00:00
parent 6e0285415b
commit b49f6c5a3c
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
4 changed files with 20 additions and 8 deletions

View File

@ -160,8 +160,9 @@ public class DrawerProfileCell extends FrameLayout {
shadowView.getDrawable().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
}
nameTextView.setTextColor(Theme.getColor(Theme.key_chats_menuName));
phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuName));
if (useAdb() || useImageBackground) {
phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuPhone));
if (shadowView.getVisibility() != VISIBLE) {
shadowView.setVisibility(VISIBLE);
}
@ -190,7 +191,6 @@ public class DrawerProfileCell extends FrameLayout {
if (shadowView.getVisibility() != visibility) {
shadowView.setVisibility(visibility);
}
phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuPhoneCats));
super.onDraw(canvas);
}

View File

@ -118,6 +118,7 @@ import java.util.Set;
import cn.hutool.core.util.RuntimeUtil;
import kotlin.Unit;
import libv2ray.Libv2ray;
import tw.nekomimi.nekogram.BottomBuilder;
import tw.nekomimi.nekogram.NekoConfig;
import tw.nekomimi.nekogram.NekoXConfig;
@ -519,10 +520,17 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
NekoXConfig.developerModeEntrance = true;
}
BottomBuilder builder = new BottomBuilder(getParentActivity());
builder.addTitle(cell.getTextView().getText().toString(), false);
String message = cell.getTextView().getText().toString();
try {
if (!BuildVars.isMini) {
message += "\n" + Libv2ray.checkVersionX();
}
} catch (Exception ignored) {}
builder.addTitle(message);
String finalMessage = message;
builder.addItem(LocaleController.getString("Copy", R.string.Copy), R.drawable.baseline_content_copy_24, (it) -> {
builder.dismiss();
AndroidUtilities.addToClipboard(cell.getTextView().getText().toString());
AndroidUtilities.addToClipboard(finalMessage);
AlertUtil.showToast(LocaleController.getString("TextCopied", R.string.TextCopied));
return Unit.INSTANCE;
});
@ -2349,8 +2357,8 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
cell.getTextView().setMovementMethod(null);
cell.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
String abi = FileUtil.getAbi();
cell.setText(String.format("%1$s %2$s", LocaleController.getString("NekoX", R.string.NekoX), String.format(Locale.US, "v%s %s %s", BuildConfig.VERSION_NAME, abi, BuildConfig.BUILD_TYPE)));
cell.setText("Nekogram X v" + BuildConfig.VERSION_NAME + " " + FileUtil.getAbi() + " " + BuildConfig.BUILD_TYPE);
cell.getTextView().setPadding(0, AndroidUtilities.dp(14), 0, AndroidUtilities.dp(14));
view = cell;
Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);

View File

@ -162,7 +162,7 @@ public class NekoConfig {
hideKeyboardOnChatScroll = preferences.getBoolean("hideKeyboardOnChatScroll", false);
avatarAsDrawerBackground = preferences.getBoolean("avatarAsDrawerBackground", true);
useSystemEmoji = preferences.getBoolean("useSystemEmoji", false);
showTabsOnForward = preferences.getBoolean("showTabsOnForward", showTabsOnForward);
showTabsOnForward = preferences.getBoolean("showTabsOnForward", false);
rearVideoMessages = preferences.getBoolean("rearVideoMessages", false);
hideAllTab = preferences.getBoolean("hideAllTab", false);

View File

@ -137,7 +137,11 @@ object FileUtil {
if (libDirs.size == 1) libDirs[0] else {
Build.CPU_ABI.toLowerCase()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Build.SUPPORTED_ABIS[0]
} else {
Build.CPU_ABI
}.toLowerCase()
}.also {