Commit cd862ad3 by gao.chao

下载更新,动态设置drawble

parent e89e38d3
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<activity android:name=".ViewActviity" /> <activity android:name=".ViewActviity" />
<activity android:name=".QRActivity" /> <activity android:name=".QRActivity" />
<activity android:name=".TitleActivity" /> <activity android:name=".TitleActivity" />
<activity android:name=".DownLoadAPKActivity"/>
</application> </application>
<!-- 配置APP ID --> <!-- 配置APP ID -->
......
package com.mayi.demo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.commonpage.UpdateDownLoadAPKActvity;
public class DownLoadAPKActivity extends UpdateDownLoadAPKActvity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.avtivity_download_apk);
findViewById(R.id.b1).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
UpdateDownLoadAPK();
}
});
findViewById(R.id.b2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
forceUpdateDownLoadAPK();
}
});
}
private void forceUpdateDownLoadAPK() {
AppConfig appConfig = new AppConfig();
appConfig.setServerVersion(3);
appConfig.setFileSize("40");
appConfig.setForceUpdate(true);
appConfig.setNeedUpdate(true);
appConfig.setUpdateRemark("强制更新\n强制更新");
appConfig.setUpdateUrl("https://kuka-life.oss-cn-hangzhou.aliyuncs.com/usermanager/app/android/userManager.apk");
downLoadAPK(appConfig);
}
private void UpdateDownLoadAPK() {
AppConfig appConfig = new AppConfig();
appConfig.setNeedUpdate(true);
appConfig.setServerVersion(3);
appConfig.setFileSize("40");
appConfig.setUpdateRemark("提示更新\n提示更新");
appConfig.setUpdateUrl("https://kuka-life.oss-cn-hangzhou.aliyuncs.com/usermanager/app/android/userManager.apk");
downLoadAPK(appConfig);
}
}
...@@ -28,11 +28,10 @@ public class FunctionActivity extends BaseActivity{ ...@@ -28,11 +28,10 @@ public class FunctionActivity extends BaseActivity{
findViewById(R.id.b3).setOnClickListener(new OnMultiClickListener() { findViewById(R.id.b3).setOnClickListener(new OnMultiClickListener() {
@Override @Override
public void onMultiClick(View v) { public void onMultiClick(View v) {
downLoadAPK(); gotoActivity(DownLoadAPKActivity.class);
} }
}); });
} }
private void downLoadAPK() {
}
} }
...@@ -10,6 +10,7 @@ import android.view.ViewGroup; ...@@ -10,6 +10,7 @@ import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import com.mayi.fastdevelop.base.BaseActivity; import com.mayi.fastdevelop.base.BaseActivity;
import com.mayi.fastdevelop.util.DrawableUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -46,6 +47,7 @@ public class MainActivity extends BaseActivity { ...@@ -46,6 +47,7 @@ public class MainActivity extends BaseActivity {
public void onBindViewHolder(@NonNull MyViewHolder viewHolder, int i) { public void onBindViewHolder(@NonNull MyViewHolder viewHolder, int i) {
viewHolder.tv.setOnClickListener(list.get(i).getClickListener()); viewHolder.tv.setOnClickListener(list.get(i).getClickListener());
viewHolder.tv.setText(list.get(i).getText()); viewHolder.tv.setText(list.get(i).getText());
DrawableUtils.setStatePressedDrawable(viewHolder.tv,"#555555","#F00000","#999999");
} }
@Override @Override
......
...@@ -24,44 +24,27 @@ public class PermissionActivity extends BaseActivity { ...@@ -24,44 +24,27 @@ public class PermissionActivity extends BaseActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_permission); setContentView(R.layout.activity_permission);
Button install = findViewById(R.id.install);
Button apply = findViewById(R.id.apply); Button apply = findViewById(R.id.apply);
final TextView result=findViewById(R.id.result); final TextView result = findViewById(R.id.result);
apply.setOnClickListener(new OnMultiClickListener() { apply.setOnClickListener(new OnMultiClickListener() {
@Override @Override
public void onMultiClick(View v) { public void onMultiClick(View v) {
PermissionUtil.requestPermission(new PermissionUtil.PermissionCallback() { PermissionUtil.requestPermission(new PermissionUtil.PermissionCallback() {
@Override @Override
public void onSuccess(List<String> data) { public void onSuccess(List<String> data) {
showToast("ANT PermissionUtil"+ "onSuccess:" + JSON.toJSONString(data)); showToast("ANT PermissionUtil" + "onSuccess:" + JSON.toJSONString(data));
result.setText("请求成功:"+JSON.toJSONString(data)); result.setText("请求成功:" + JSON.toJSONString(data));
} }
@Override @Override
public void onFail(List<String> data) { public void onFail(List<String> data) {
showToast("ANT PermissionUtil"+ "onFail:" + JSON.toJSONString(data)); showToast("ANT PermissionUtil" + "onFail:" + JSON.toJSONString(data));
result.setText("请求失败:"+JSON.toJSONString(data)); result.setText("请求失败:" + JSON.toJSONString(data));
} }
}, Permission.Group.CAMERA); }, Permission.Group.CAMERA);
} }
}); });
install.setOnClickListener(new OnMultiClickListener() {
@Override
public void onMultiClick(View v) {
PermissionUtil.installAPP(new PermissionUtil.PermissionInstallCallback() {
@Override
public void onSuccess() {
showToast("安装成功");
}
@Override
public void onFail() {
showToast("安装失败");
}
}, Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+"app-debug.apk");
}
});
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="下载安装APP" /> android:text="下载安装APP" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
\ No newline at end of file
...@@ -15,10 +15,4 @@ ...@@ -15,10 +15,4 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<Button
android:id="@+id/install"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="安装APP" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/b1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下载安装APP" />
<Button
android:id="@+id/b2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="强制下载安装APP" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
...@@ -6,8 +6,8 @@ android { ...@@ -6,8 +6,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 28 targetSdkVersion 28
versionCode 1 versionCode 2
versionName "1.0" versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk { ndk {
// 设置支持的SO库架构 // 设置支持的SO库架构
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.mayi.fastdevelop"> package="com.mayi.fastdevelop">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
......
...@@ -8,7 +8,6 @@ import java.io.Serializable; ...@@ -8,7 +8,6 @@ import java.io.Serializable;
* app 启动 - 配置信息 * app 启动 - 配置信息
*/ */
public class AppConfig implements Serializable { public class AppConfig implements Serializable {
private String wxUpdateUrl; // "微信更新地址",
/** /**
* 是否需要更新. * 是否需要更新.
*/ */
...@@ -39,14 +38,6 @@ public class AppConfig implements Serializable { ...@@ -39,14 +38,6 @@ public class AppConfig implements Serializable {
*/ */
private String updateRemark; private String updateRemark;
public String getWxUpdateUrl() {
return wxUpdateUrl;
}
public void setWxUpdateUrl(String wxUpdateUrl) {
this.wxUpdateUrl = wxUpdateUrl;
}
public String getFileSize() { public String getFileSize() {
return fileSize; return fileSize;
} }
......
package com.mayi.fastdevelop.commonpage;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.Nullable;
import com.mayi.fastdevelop.base.BaseActivity;
import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.constant.Key;
import com.mayi.fastdevelop.constant.RequestCode;
import com.mayi.fastdevelop.util.DownLoadUtil;
import com.mayi.fastdevelop.util.PermissionUtil;
import com.mayi.fastdevelop.util.SpUtil;
import com.mayi.fastdevelop.util.ToastUtil;
import com.mayi.fastdevelop.view.installapk.AppUpgradeManager;
/**
* 下载安装Activity
*/
public abstract class UpdateDownLoadAPKActvity extends BaseActivity {
private ApkInstallReceiver receiver;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
IntentFilter filter = new IntentFilter();
filter.addAction("android.intent.action.DOWNLOAD_COMPLETE");
filter.addAction("android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED");
filter.addAction(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
receiver = new ApkInstallReceiver();
registerReceiver(receiver, filter);
}
public void downLoadAPK(AppConfig appConfig) {
AppUpgradeManager appUpgradeManager = new AppUpgradeManager(this);
appUpgradeManager.showUpdateTipDialog(appConfig);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
if (requestCode == RequestCode.REQUEST_CODE_APP_INSTALL) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (getPackageManager().canRequestPackageInstalls()) {
installApk();
} else {
showToast("未允许应用安装,无法升级!");
}
}
}
super.onActivityResult(requestCode, resultCode, data);
}
private class ApkInstallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(DownloadManager.ACTION_DOWNLOAD_COMPLETE)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//开启设置安装未知来源应用权限界面
if (!context.getPackageManager().canRequestPackageInstalls()) {
Intent intent2 = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES);
startActivityForResult(intent2, RequestCode.REQUEST_CODE_APP_INSTALL);
ToastUtil.show(context, "请允许安装应用!");
return;
}
}
installApk();
}
}
}
private void installApk() {
long id = SpUtil.get(Key.ANT_DOWNLOAD_ID, -1L);
if (-1 != id) {
DownloadManager dManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
Uri downloadFileUri = dManager != null ? dManager.getUriForDownloadedFile(id) : null;
if (downloadFileUri == null) {
return;
}
PermissionUtil.installAPP(new PermissionUtil.PermissionInstallCallback() {
@Override
public void onSuccess() {
showToast("安装成功");
SpUtil.set(Key.ANT_DOWNLOAD_ID, -1L);
}
@Override
public void onFail() {
showToast("安装失败");
SpUtil.set(Key.ANT_DOWNLOAD_ID, -1L);
}
}, DownLoadUtil.getRealPathFromURI(this, downloadFileUri));
}
}
@Override
protected void onDestroy() {
unregisterReceiver(receiver);
super.onDestroy();
}
}
package com.mayi.fastdevelop.constant;
public class RequestCode {
public static final int REQUEST_CODE_APP_INSTALL = 0x00;
}
...@@ -3,15 +3,14 @@ package com.mayi.fastdevelop.util; ...@@ -3,15 +3,14 @@ package com.mayi.fastdevelop.util;
import android.app.DownloadManager; import android.app.DownloadManager;
import android.app.DownloadManager.Request; import android.app.DownloadManager.Request;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Environment; import android.os.Environment;
import android.provider.MediaStore;
import android.webkit.MimeTypeMap; import android.webkit.MimeTypeMap;
import com.mayi.fastdevelop.constant.Key; import com.mayi.fastdevelop.constant.Key;
import java.io.File;
/** /**
* 下载更新的util 主要是负责 版本的相关更新工作 * 下载更新的util 主要是负责 版本的相关更新工作
...@@ -47,20 +46,6 @@ public class DownLoadUtil { ...@@ -47,20 +46,6 @@ public class DownLoadUtil {
} }
} }
//文件的安装 方法
public static boolean install(Context context, String filePath) {
Intent intent = new Intent(Intent.ACTION_VIEW);
File file = new File(filePath);
if (file != null && file.length() > 0 && file.exists() && file.isFile()) {
intent.setDataAndType(Uri.parse("file://" + filePath), "application/vnd.android.package-archive");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
return true;
}
return false;
}
///获取当前下载进度 ///获取当前下载进度
public static int[] getBytesAndStatus(Context context, long downloadId) { public static int[] getBytesAndStatus(Context context, long downloadId) {
DownloadManager downLoadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); DownloadManager downLoadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
...@@ -84,5 +69,21 @@ public class DownLoadUtil { ...@@ -84,5 +69,21 @@ public class DownLoadUtil {
return bytesAndStatus; return bytesAndStatus;
} }
//根据uri 获取实际路径
public static String getRealPathFromURI(Context context, Uri contentURI) {
String result;
Cursor cursor = context.getContentResolver().query(contentURI,
new String[]{MediaStore.Images.ImageColumns.DATA},//
null, null, null);
if (cursor == null) {
result = contentURI.getPath();
} else {
cursor.moveToFirst();
int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
result = cursor.getString(index);
cursor.close();
}
return result;
}
} }
\ No newline at end of file
package com.mayi.fastdevelop.util;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
import android.view.View;
//动态设置Drawable
public class DrawableUtils {
/**
* 设置view背景
* @param view
* @param str_strokeColor
* @param str_fillColor 点击时颜色
* @param str_unFillColor 未点击时颜色
*/
public static void setStatePressedDrawable(View view,String str_strokeColor,String str_fillColor,String str_unFillColor){
StateListDrawable drawable = new StateListDrawable();
int strokeWidth = 1; // 1dp 边框宽度
int roundRadius = 5; // 5dp 圆角半径
int strokeColor = Color.parseColor(str_strokeColor);//边框颜色
int fillColor = Color.parseColor(str_fillColor); //内部填充颜色
GradientDrawable statePressed = new GradientDrawable();//创建drawable
statePressed.setColor(fillColor);
statePressed.setCornerRadius(roundRadius);
statePressed.setStroke(strokeWidth, strokeColor);
int unfillColor = Color.parseColor(str_unFillColor); //内部填充颜色
GradientDrawable unStatePressed = new GradientDrawable();//创建drawable
unStatePressed.setColor(unfillColor);
unStatePressed.setCornerRadius(roundRadius);
unStatePressed.setStroke(strokeWidth, strokeColor);
drawable.addState(new int[]{android.R.attr.state_pressed}, statePressed);
drawable.addState(new int[]{-android.R.attr.state_pressed}, unStatePressed);
view.setBackground(drawable);
}
}
...@@ -27,6 +27,7 @@ public class LoadingPictures { ...@@ -27,6 +27,7 @@ public class LoadingPictures {
public static void loadFile(File file, ImageView img) { public static void loadFile(File file, ImageView img) {
Picasso.with(img.getContext()) Picasso.with(img.getContext())
.load(file) .load(file)
.resize(2000, 2000)
.placeholder(placeholder) .placeholder(placeholder)
.error(error) .error(error)
.into(img); .into(img);
......
package com.mayi.fastdevelop.view; package com.mayi.fastdevelop.view.installapk;
import android.Manifest;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.StateListDrawable;
import android.net.Uri;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View; import android.view.View;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
...@@ -12,9 +24,15 @@ import com.mayi.fastdevelop.bean.AppConfig; ...@@ -12,9 +24,15 @@ import com.mayi.fastdevelop.bean.AppConfig;
import com.mayi.fastdevelop.constant.Key; import com.mayi.fastdevelop.constant.Key;
import com.mayi.fastdevelop.util.ActivitysManager; import com.mayi.fastdevelop.util.ActivitysManager;
import com.mayi.fastdevelop.util.DownLoadUtil; import com.mayi.fastdevelop.util.DownLoadUtil;
import com.mayi.fastdevelop.util.PermissionUtil;
import com.mayi.fastdevelop.util.SpUtil; import com.mayi.fastdevelop.util.SpUtil;
import com.mayi.fastdevelop.util.ToastUtil;
import com.mayi.fastdevelop.view.dialog.BaseDialog; import com.mayi.fastdevelop.view.dialog.BaseDialog;
import com.mayi.fastdevelop.view.dialog.DialogViewHolder; import com.mayi.fastdevelop.view.dialog.DialogViewHolder;
import com.yanzhenjie.permission.AndPermission;
import com.yanzhenjie.permission.Rationale;
import java.util.List;
/** /**
* APP 升级管理 * APP 升级管理
...@@ -36,7 +54,10 @@ public class AppUpgradeManager { ...@@ -36,7 +54,10 @@ public class AppUpgradeManager {
/** /**
* 显示更新提示 * 显示更新提示
*/ */
private void showUpdateTipDialog(final AppConfig info) { public void showUpdateTipDialog(final AppConfig info) {
if (!info.isNeedUpdate()) {
return;
}
new BaseDialog(mContext, R.layout.dialog_update) { new BaseDialog(mContext, R.layout.dialog_update) {
@Override @Override
public void convert(DialogViewHolder holder) { public void convert(DialogViewHolder holder) {
...@@ -46,9 +67,19 @@ public class AppUpgradeManager { ...@@ -46,9 +67,19 @@ public class AppUpgradeManager {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
dismiss(); dismiss();
showApkProgressDialog(); PermissionUtil.requestPermission(new PermissionUtil.PermissionCallback() {
mHandler.post(mRunnable); @Override
DownLoadUtil.downLoadAPK(mContext, info.getUpdateUrl()); public void onSuccess(List<String> data) {
showApkProgressDialog();
mHandler.post(mRunnable);
DownLoadUtil.downLoadAPK(mContext, info.getUpdateUrl());
}
@Override
public void onFail(List<String> data) {
ToastUtil.show(mContext, "没有下载权限,无法下载APK");
}
}, Manifest.permission.WRITE_EXTERNAL_STORAGE);
} }
}); });
holder.setOnClick(R.id.txt_cancel, new View.OnClickListener() { holder.setOnClick(R.id.txt_cancel, new View.OnClickListener() {
...@@ -56,7 +87,21 @@ public class AppUpgradeManager { ...@@ -56,7 +87,21 @@ public class AppUpgradeManager {
public void onClick(View v) { public void onClick(View v) {
dismiss(); dismiss();
//如果是强制更新 点击取消 直接退出app //如果是强制更新 点击取消 直接退出app
ActivitysManager.exitApp(mContext); if (info.isForceUpdate()) {
ActivitysManager.exitApp(mContext);
}
}
});
holder.setOnClick(R.id.txt_browsers, new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
Uri content_url = Uri.parse(info.getUpdateUrl());
intent.setData(content_url);
mContext.startActivity(intent);
} }
}); });
} }
......
...@@ -47,31 +47,40 @@ ...@@ -47,31 +47,40 @@
android:layout_marginLeft="@dimen/space_30px" android:layout_marginLeft="@dimen/space_30px"
android:layout_marginRight="@dimen/space_30px" android:layout_marginRight="@dimen/space_30px"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:orientation="horizontal"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/txt_cancel" android:id="@+id/txt_sure"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginRight="@dimen/space_40px" android:background="@drawable/btn_accont_grey_radius"
android:layout_weight="1"
android:background="@drawable/bg_white_border_accent_rectangle"
android:gravity="center" android:gravity="center"
android:text="@string/cancel" android:text="@string/sure"
android:textColor="@color/colorAccent" android:textColor="@color/white"
android:textSize="@dimen/txt_size_36px" /> android:textSize="@dimen/txt_size_36px" />
<TextView <TextView
android:id="@+id/txt_sure" android:id="@+id/txt_browsers"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_weight="1" android:layout_marginTop="@dimen/im_dp_10"
android:background="@drawable/btn_accont_grey_radius" android:background="@drawable/btn_accont_grey_radius"
android:gravity="center" android:gravity="center"
android:text="@string/sure" android:text="@string/go_browsers"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/txt_size_36px" /> android:textSize="@dimen/txt_size_36px" />
<TextView
android:id="@+id/txt_cancel"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="@dimen/im_dp_10"
android:background="@drawable/bg_white_border_accent_rectangle"
android:gravity="center"
android:text="@string/cancel"
android:textColor="@color/colorAccent"
android:textSize="@dimen/txt_size_36px" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -10,4 +10,6 @@ ...@@ -10,4 +10,6 @@
<string name="app_version_update">新版本发布</string> <string name="app_version_update">新版本发布</string>
<string name="package_size">更新包大小:%1$sM</string> <string name="package_size">更新包大小:%1$sM</string>
<string name="downloading">正在下载</string> <string name="downloading">正在下载</string>
<string name="install_apk_error">安装APK错误</string>
<string name="go_browsers">跳转浏览器,下载安装APK</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment