跳转小程序
This commit is contained in:
@@ -39,7 +39,7 @@ android {
|
||||
targetSdkVersion 29
|
||||
// multiDexEnabled true
|
||||
versionCode 6
|
||||
versionName "1.1.7"
|
||||
versionName "1.1.8"
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
ndk {
|
||||
|
||||
@@ -164,6 +164,9 @@ android {
|
||||
// implementation 'androidx.camera:camera-view:1.0.0-alpha30'
|
||||
// implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc05'//视频图片选择器
|
||||
implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc05'
|
||||
implementation 'com.lzy.net:okrx2:2.0.2'
|
||||
//必须使用
|
||||
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -172,7 +175,5 @@ android {
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// implementation project(path: ':picture_library')
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,36 +1,23 @@
|
||||
package com.sl.house_property;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.util.Log;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import adapter.StartViewpagerAdapter;
|
||||
import cn.jpush.android.api.JPushInterface;
|
||||
import tools.Config;
|
||||
import utils.ConfigTitiles;
|
||||
import utils.SetBigMap;
|
||||
@@ -231,10 +218,8 @@ public class MainActivity extends Activity {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {//分发事件
|
||||
super.dispatchTouchEvent(ev);
|
||||
@@ -242,6 +227,4 @@ public class MainActivity extends Activity {
|
||||
return mGestureDetector.onTouchEvent(ev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -54,9 +54,13 @@ import com.sl.house_property.order.SettleActivity;
|
||||
import com.sl.house_property.user.MyMarketShopActivity;
|
||||
import com.sl.house_property.user.MyPropertyActivity;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.BannerConfig;
|
||||
import com.youth.banner.Transformer;
|
||||
import com.youth.banner.listener.OnBannerClickListener;
|
||||
import com.youth.banner.loader.ImageLoader;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -569,27 +573,19 @@ public class MainFragment extends BaseFragment<FragmentMainBinding> implements V
|
||||
}
|
||||
startActivity(intent);
|
||||
break;
|
||||
case R.id.cargara://车库
|
||||
Toast.makeText(getContext(), "功能正在开发", Toast.LENGTH_SHORT).show();
|
||||
// if ((Config.getInstance(MainFragment.this.getContext()).getUser() == null)) {
|
||||
// intent = new Intent(MainFragment.this.getContext(), LoginActivity.class);
|
||||
// } else {
|
||||
// intent = new Intent(getActivity(), CarGarageActivity.class);
|
||||
// }
|
||||
// startActivity(intent);
|
||||
case R.id.cargara://社区内购
|
||||
String appId = "wx7e09fff168f6e58d"; // 填移动应用(App)的 AppId,非小程序的 AppID
|
||||
IWXAPI api = WXAPIFactory.createWXAPI(getActivity(), appId);
|
||||
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
|
||||
req.userName = "gh_f750eee96b89"; // 填小程序原始id
|
||||
req.path = "/pages/index/index"; ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
|
||||
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
|
||||
api.sendReq(req);
|
||||
break;
|
||||
case R.id.moew1:
|
||||
intent = new Intent(getActivity(), MyMarketShopActivity.class);
|
||||
startActivity(intent);
|
||||
break;
|
||||
// case R.id.moew2:
|
||||
// if ((Config.getInstance(MainFragment.this.getContext()).getUser() == null)) {
|
||||
// intent = new Intent(MainFragment.this.getContext(), LoginActivity.class);
|
||||
// } else {
|
||||
// intent = new Intent(getActivity(), NewlistActivity.class);
|
||||
// }
|
||||
// startActivity(intent);
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,15 +635,22 @@ public class MainFragment extends BaseFragment<FragmentMainBinding> implements V
|
||||
banner.setIndicatorGravity(BannerConfig.CENTER);
|
||||
banner.start();
|
||||
|
||||
/*mDataBinding.banner.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
mDataBinding.banner.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void OnBannerClick(int i) {
|
||||
Intent intent = new Intent(getContext(), NewsDetailActivity.class);
|
||||
// intent.putExtra("url", homegridentityvArrayList.get(position).getMessage_url());
|
||||
// intent.putExtra("titile", homegridentityvArrayList.get(position).getMessage_title());
|
||||
startActivity(intent);
|
||||
Advert_carouseleEntity advert_carouseleEntity = user.get(i);
|
||||
String advert_source = advert_carouseleEntity.getAdvert_source();
|
||||
if(advert_source.length()>0){
|
||||
String appId = "wx7e09fff168f6e58d"; // 填移动应用(App)的 AppId,非小程序的 AppID
|
||||
IWXAPI api = WXAPIFactory.createWXAPI(getActivity(), appId);
|
||||
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
|
||||
req.userName = "gh_f750eee96b89"; // 填小程序原始id
|
||||
req.path = advert_source; ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
|
||||
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
|
||||
api.sendReq(req);
|
||||
}
|
||||
}
|
||||
});*/
|
||||
});
|
||||
TextPaint tp = mDataBinding.usershoptextid.getPaint();
|
||||
|
||||
tp.setFakeBoldText(true);
|
||||
|
||||
74
app/src/main/java/entity/GetVesionResponseBean.java
Normal file
74
app/src/main/java/entity/GetVesionResponseBean.java
Normal file
@@ -0,0 +1,74 @@
|
||||
package entity;
|
||||
|
||||
public class GetVesionResponseBean {
|
||||
|
||||
|
||||
/**
|
||||
* status : 0
|
||||
* result : {"success":0,"msg":"成功","version":"1.1.0"}
|
||||
*/
|
||||
|
||||
private int status;
|
||||
private ResultBean result;
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* success : 0
|
||||
* msg : 成功
|
||||
* version : 1.1.0
|
||||
*/
|
||||
|
||||
private int success;
|
||||
private String msg;
|
||||
private String version;
|
||||
private String content;
|
||||
|
||||
public int getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(int success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
228
app/src/main/java/utils/UpdateManager.java
Normal file
228
app/src/main/java/utils/UpdateManager.java
Normal file
@@ -0,0 +1,228 @@
|
||||
package utils;
|
||||
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.sl.house_property.R;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
public class UpdateManager {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
//提示语
|
||||
private String updateMsg = "有最新的软件包哦,亲快下载吧~";
|
||||
|
||||
//返回的安装包url
|
||||
private String apkUrl;
|
||||
|
||||
private Dialog noticeDialog;
|
||||
|
||||
private Dialog downloadDialog;
|
||||
/* 下载包安装路径 */
|
||||
private static final String savePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath();
|
||||
|
||||
private static final String saveFileName = savePath + "/app-release-latest.apk";
|
||||
|
||||
/* 进度条与通知ui刷新的handler和msg常量 */
|
||||
private ProgressBar mProgress;
|
||||
|
||||
private static final int DOWN_UPDATE = 1;
|
||||
|
||||
private static final int DOWN_OVER = 2;
|
||||
|
||||
private int progress;
|
||||
|
||||
private Thread downLoadThread;
|
||||
|
||||
private boolean interceptFlag = false;
|
||||
|
||||
|
||||
private Handler mHandler = new Handler(){
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case DOWN_UPDATE:
|
||||
mProgress.setProgress(progress);
|
||||
break;
|
||||
case DOWN_OVER:
|
||||
installApk(mContext);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
public UpdateManager(Context context, String apkUrl){
|
||||
this.mContext = context;
|
||||
this.apkUrl=apkUrl;
|
||||
}
|
||||
|
||||
//外部接口让主Activity调用
|
||||
public void checkUpdateInfo(){
|
||||
showNoticeDialog();
|
||||
}
|
||||
//外部接口让主Activity调用
|
||||
public void checkUpdateDownload(){
|
||||
showDownloadDialog();
|
||||
}
|
||||
|
||||
/*
|
||||
* 版本更新提示
|
||||
*/
|
||||
private void showNoticeDialog(){
|
||||
Builder builder = new Builder(mContext);
|
||||
builder.setTitle("软件版本更新");
|
||||
builder.setMessage(updateMsg);
|
||||
builder.setPositiveButton("下载", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
showDownloadDialog();
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton("以后再说", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
noticeDialog = builder.create();
|
||||
noticeDialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新提示
|
||||
*/
|
||||
private void showDownloadDialog(){
|
||||
Builder builder = new Builder(mContext);
|
||||
builder.setTitle("软件版本更新");
|
||||
builder.setMessage("正在下载");
|
||||
final LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||
View v = inflater.inflate(R.layout.progress, null);
|
||||
mProgress = (ProgressBar)v.findViewById(R.id.progress);
|
||||
|
||||
builder.setView(v);
|
||||
builder.setNegativeButton("取消", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
interceptFlag = true;
|
||||
}
|
||||
});
|
||||
downloadDialog = builder.create();
|
||||
downloadDialog.show();
|
||||
|
||||
downloadApk();
|
||||
}
|
||||
|
||||
private Runnable mdownApkRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
URL url = new URL(apkUrl);
|
||||
|
||||
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
|
||||
conn.connect();
|
||||
int length = conn.getContentLength();
|
||||
InputStream is = conn.getInputStream();
|
||||
|
||||
File file = new File(savePath);
|
||||
if(!file.exists()){
|
||||
file.mkdir();
|
||||
}
|
||||
String apkFile = saveFileName;
|
||||
File ApkFile = new File(apkFile);
|
||||
FileOutputStream fos = new FileOutputStream(ApkFile);
|
||||
|
||||
int count = 0;
|
||||
byte buf[] = new byte[1024];
|
||||
|
||||
do{
|
||||
int numread = is.read(buf);
|
||||
count += numread;
|
||||
progress =(int)(((float)count / length) * 100);
|
||||
//更新进度
|
||||
mHandler.sendEmptyMessage(DOWN_UPDATE);
|
||||
if(numread <= 0){
|
||||
//下载完成通知安装
|
||||
mHandler.sendEmptyMessage(DOWN_OVER);
|
||||
break;
|
||||
}
|
||||
fos.write(buf,0,numread);
|
||||
}while(!interceptFlag);//点击取消就停止下载.
|
||||
|
||||
fos.close();
|
||||
is.close();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch(IOException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 下载apk
|
||||
* @param
|
||||
*/
|
||||
|
||||
private void downloadApk(){
|
||||
downLoadThread = new Thread(mdownApkRunnable);
|
||||
downLoadThread.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装apk
|
||||
* @param
|
||||
*/
|
||||
|
||||
public static void installApk(Context context) {
|
||||
|
||||
File apkfile = new File(saveFileName);
|
||||
if (!apkfile.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File file = new File(
|
||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
|
||||
, "app-release-latest.apk");
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
if(Build.VERSION.SDK_INT>=24) { //判读版本是否在7.0以上
|
||||
|
||||
Uri apkUri = FileProvider.getUriForFile(context, "com.fanghoo.mendian.fileProvider", file);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
|
||||
}else{
|
||||
intent.setDataAndType(Uri.fromFile(apkfile),
|
||||
"application/vnd.android.package-archive");
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
51
app/src/main/java/utils/VersionUtils.java
Normal file
51
app/src/main/java/utils/VersionUtils.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class VersionUtils {
|
||||
|
||||
/**
|
||||
* 版本号比较
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static int compareVersion(String dangqianversion, String newVersion) {
|
||||
if (String.valueOf(dangqianversion).equals(newVersion)) {
|
||||
return 0;
|
||||
}
|
||||
String[] version1Array = String.valueOf(dangqianversion).split("\\.");
|
||||
String[] version2Array = newVersion.split("\\.");
|
||||
Log.d("HomePageActivity", "version1Array==" + version1Array.length);
|
||||
Log.d("HomePageActivity", "version2Array==" + version2Array.length);
|
||||
int index = 0;
|
||||
// 获取最小长度值
|
||||
int minLen = Math.min(version1Array.length, version2Array.length);
|
||||
int diff = 0;
|
||||
// 循环判断每位的大小
|
||||
Log.d("HomePageActivity", "verTag2=2222=" + version1Array[index]);
|
||||
while (index < minLen
|
||||
&& (diff = Integer.parseInt(version1Array[index])
|
||||
- Integer.parseInt(version2Array[index])) == 0) {
|
||||
index++;
|
||||
}
|
||||
if (diff == 0) {
|
||||
// 如果位数不一致,比较多余位数
|
||||
for (int i = index; i < version1Array.length; i++) {
|
||||
if (Integer.parseInt(version1Array[i]) > 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = index; i < version2Array.length; i++) {
|
||||
if (Integer.parseInt(version2Array[i]) > 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
return diff > 0 ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
6
app/src/main/res/drawable/bg_version_btn.xml
Normal file
6
app/src/main/res/drawable/bg_version_btn.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffd700" />
|
||||
<corners android:radius="25dp" />
|
||||
</shape>
|
||||
7
app/src/main/res/drawable/bg_version_btn_two.xml
Normal file
7
app/src/main/res/drawable/bg_version_btn_two.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ffffffff" />
|
||||
<corners android:radius="25dp" />
|
||||
<stroke android:width="1dp" android:color="#f3f3f3" />
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/bg_version_dialog.xml
Normal file
6
app/src/main/res/drawable/bg_version_dialog.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/colorWhite" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
||||
@@ -102,7 +102,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/entrancegurd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/door">
|
||||
@@ -119,7 +119,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/service"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dip"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/garage">
|
||||
@@ -137,11 +137,10 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/cargara"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dip"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/garage">
|
||||
android:background="@mipmap/sqng">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
13
app/src/main/res/layout/progress.xml
Normal file
13
app/src/main/res/layout/progress.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
/>
|
||||
</LinearLayout>
|
||||
106
app/src/main/res/layout/version_dailog.xml
Normal file
106
app/src/main/res/layout/version_dailog.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_version_dialog">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="11dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_8c619"
|
||||
android:text="发现新版本" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_below="@id/tv1"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:background="@color/color_ffeb7f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/view"
|
||||
android:layout_marginTop="11dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_6c6c6c"
|
||||
android:text="V1.2.4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/tv_version"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/color_6c6c6c"
|
||||
android:text="更新内容:" />
|
||||
<Button
|
||||
android:id="@+id/btn_update_one"
|
||||
android:layout_width="137dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_version_btn_two"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_5b4c00"
|
||||
android:text="稍后更新" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_update"
|
||||
android:layout_width="137dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_version_btn"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_5b4c00"
|
||||
android:text="立即更新" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/btn_update"
|
||||
android:layout_below="@id/tv2">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:textColor="@color/color_6c6c6c"
|
||||
android:text="111111:" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
BIN
app/src/main/res/mipmap-xhdpi/sqng.jpg
Normal file
BIN
app/src/main/res/mipmap-xhdpi/sqng.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
@@ -27,4 +27,9 @@
|
||||
<color name="monney_select_back">#0A71A2</color>
|
||||
<color name="monney_noselect_back">#eaeaea</color>
|
||||
<color name="text_name">#606492</color>
|
||||
<color name="color_5b4c00">#5b4c00</color>
|
||||
<color name="color_6c6c6c">#6c6c6c</color>
|
||||
<color name="color_8c619">#f8c619</color>
|
||||
<color name="color_ffeb7f">#ffeb7f</color>
|
||||
<color name="colorWhite">#FFF</color>
|
||||
</resources>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<string name="selectpicture">从相册中选择</string>
|
||||
<string name="nopemission">未得到权限</string>
|
||||
<string name="cannotgetpath">未得到路径</string>
|
||||
<string name="carroom">车库</string>
|
||||
<string name="carroom">社区内购</string>
|
||||
<string name="door">门禁</string>
|
||||
<string name="usershop">业主商城</string>
|
||||
|
||||
|
||||
23
技术文档
23
技术文档
@@ -1,2 +1,23 @@
|
||||
1.今日头条适配:https://github.com/JessYanCoding/AndroidAutoSize
|
||||
使用方法:https://blog.csdn.net/taowuhua0505/article/details/88239803
|
||||
使用方法:https://blog.csdn.net/taowuhua0505/article/details/88239803
|
||||
|
||||
|
||||
2.查看应用签名
|
||||
|
||||
(1).使用Android开发工具包(Android SDK)中的命令行工具 keytool。在终端或命令提示符中,使用以下命令:
|
||||
|
||||
keytool -list -v -keystore /path/to/your/app.apk
|
||||
|
||||
(2). 查看 APK 文件的签名
|
||||
使用解压工具解压 APK 文件,在 META-INF 文件夹拿到 CERT.RSA 文件。
|
||||
假设 CERT.RSA 文件的路径是 D:\GetOn\ceshi\release\CERT.RSA
|
||||
在 CMD 中输入
|
||||
|
||||
keytool -printcert -file D:\GetOn\ceshi\release\CERT.RSA
|
||||
就可以得到签名信息了,MD5值
|
||||
|
||||
(3).查看 jks 文件的签名
|
||||
jks 作为签名文件,也可以通过命令行来查看的其中的签名信息,假设签名文件的位置是D:\GetOn\ceshi\release\test_release.jks
|
||||
在终端中输入
|
||||
|
||||
keytool -list -v -keystore D:\GetOn\ceshi\release\test_release.jks
|
||||
|
||||
Reference in New Issue
Block a user