feat#415_绑定等待提醒
This commit is contained in:
parent
8781a2bb14
commit
71e15f204e
|
|
@ -26,6 +26,6 @@ android.enableJetifier=true
|
|||
android.useAndroidX=true
|
||||
android.useDeprecatedNdk=true
|
||||
|
||||
versionCode=103
|
||||
versionName=4.12.03
|
||||
versionCode=105
|
||||
versionName=4.12.05
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
|
||||
public void toDevice() {
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
// ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
finish();
|
||||
|
|
@ -417,7 +417,7 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
// ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
AnimationUtil.startAnimation(HotSpotConnentDeviceActivity.this);
|
||||
|
|
@ -456,13 +456,13 @@ public class HotSpotConnentDeviceActivity extends BaseActivity {
|
|||
Commons.DevicePosition = Commons.DEVICE.size() - 1;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
// ToastUtil.show(HotSpotConnentDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
Commons.IS_EventBus = true;
|
||||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
AppRoute.newToStart(HotSpotConnentDeviceActivity.this,deviceObj,true);
|
||||
ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
// ToastUtil.show(HotSpotConnentDeviceActivity.this, "绑定设备成功");
|
||||
EventBean eventBean =new EventBean(EventBean.LINK_FINISH,0);
|
||||
EventBus.getDefault().post(eventBean);
|
||||
AnimationUtil.startAnimation(HotSpotConnentDeviceActivity.this);
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ public class HotSpotConnentPetDeviceActivity extends BaseActivity {
|
|||
Commons.DevicePosition = Commons.DEVICE.size() - 1;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
ToastUtil.show(HotSpotConnentPetDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
// ToastUtil.show(HotSpotConnentPetDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
Commons.IS_EventBus = true;
|
||||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
|
|
|
|||
|
|
@ -4,18 +4,23 @@ import static com.ifish.activity.MainTabActivity.map;
|
|||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.clj.fastble.data.BleScanState;
|
||||
|
|
@ -104,6 +109,7 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
private Device deviceBean;
|
||||
|
||||
private boolean isBind = false;
|
||||
private boolean isShowHint = true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
|
@ -123,26 +129,26 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
e.printStackTrace();
|
||||
}
|
||||
isBind = getIntent().getBooleanExtra(BaseGradeActivity.BINDDEVICE,false);
|
||||
|
||||
|
||||
L.i("jjia------------"+isBind);
|
||||
if (isBind){
|
||||
DialogUtil.Companion.showLoadingDialog(this,true,"设备正在联网中,请耐心等待.....");
|
||||
DialogUtil.Companion.showLoadingDialog(this,true,"设备正在联网中,请耐心等待");
|
||||
startDownTimer();
|
||||
}
|
||||
// showHint();
|
||||
}
|
||||
|
||||
private void showHint(){
|
||||
|
||||
IosAlertDialog openDialog = new IosAlertDialog(this).builder();
|
||||
openDialog.setCancelable(true);
|
||||
openDialog.setTitle("温馨提示");
|
||||
openDialog.setMessage("请检查输入密码是否正确");
|
||||
openDialog.setPositiveButton("确定", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
}
|
||||
});
|
||||
openDialog.show();
|
||||
isShowHint = false;
|
||||
Toast toast = new Toast(this);
|
||||
toast.setDuration(Toast.LENGTH_LONG);
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
View view = inflater.inflate(R.layout.hint_toast, null);
|
||||
toast.setView(view);
|
||||
toast.setGravity(Gravity.CENTER,0,120);
|
||||
toast.show();
|
||||
|
||||
}
|
||||
public void onEventMainThread(EventBean eventBean){
|
||||
if (eventBean!=null && EventBean.CHANGE_DEVICE_NAME.equals(eventBean.name)){
|
||||
|
|
@ -170,6 +176,7 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
protected void onDestroy() {
|
||||
isToast = false;
|
||||
EventBus.getDefault().unregister(this);
|
||||
DialogUtil.Companion.setLoadingDialogDismiss(this);
|
||||
closeSoket();
|
||||
closeDownTimer();
|
||||
stopAllTimer();
|
||||
|
|
@ -414,7 +421,7 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
tv_wendu.setText("");
|
||||
sw.setRefreshing(false);
|
||||
if (isToast) {
|
||||
ToastUtil.showSpecial(MainSix_4F_ControlActivity.this, Commons.Text.Repost);
|
||||
// ToastUtil.showSpecial(MainSix_4F_ControlActivity.this, Commons.Text.Repost);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -463,7 +470,7 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
resetIVFlag();
|
||||
isWaterDialog = false;
|
||||
dismissProgressDialog();
|
||||
ToastUtil.showSpecial(MainSix_4F_ControlActivity.this, Commons.Text.Repost);
|
||||
// ToastUtil.showSpecial(MainSix_4F_ControlActivity.this, Commons.Text.Repost);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -608,7 +615,12 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
L.i("jjia---------c------1"+event.toString());
|
||||
hidegif();
|
||||
dismissProgressDialog();
|
||||
if (isBind){
|
||||
DialogUtil.Companion.setLoadingDialogDismiss(this);
|
||||
if (isShowHint){
|
||||
showHint();
|
||||
}
|
||||
}
|
||||
dismissProgressDialogCancelble();
|
||||
tv_offline.setVisibility(View.GONE);
|
||||
backInfoModelSix_4F = event;
|
||||
|
|
@ -1354,12 +1366,13 @@ public class MainSix_4F_ControlActivity extends BaseGradeActivity implements Swi
|
|||
countDownTimer = new CountDownTimer(40000,1000) {
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
DialogUtil.Companion.setProgress(dowmCount);
|
||||
dowmCount++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
DialogUtil.Companion.setLoadingDialogDismiss(MainSix_4F_ControlActivity.this);
|
||||
showHint();
|
||||
DialogUtil.Companion.setError();
|
||||
}
|
||||
};
|
||||
countDownTimer.start();
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ public class AirKissUtil {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
ToastUtil.show(curActivity, "绑定设备成功");
|
||||
// ToastUtil.show(curActivity, "绑定设备成功");
|
||||
AppRoute.newToStart(curActivity,deviceObj,true);
|
||||
curActivity.finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
|
|
@ -599,7 +599,7 @@ public class AirKissUtil {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
ToastUtil.show(curActivity, "绑定设备成功");
|
||||
// ToastUtil.show(curActivity, "绑定设备成功");
|
||||
AppRoute.newToStart(curActivity,deviceObj,true);
|
||||
|
||||
curActivity.finish();
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
case AirKiss:
|
||||
// 处理AirKiss逻辑
|
||||
L.i("jjia----------------bssid="+bssid);
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "开始AirKiss联网...");
|
||||
// ToastUtil.show(NewBindDeviceActivity.this, "开始AirKiss联网...");
|
||||
airKissUtil.connectDeviceByAirKiss(this, ssid, bssid, pwd);
|
||||
break;
|
||||
}
|
||||
|
|
@ -1104,7 +1104,7 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
// ToastUtil.show(NewBindDeviceActivity.this, "设备序号" + Commons.DevicePosition + "---" + Commons.DEVICE.size());
|
||||
|
||||
|
||||
if (deviceObj!=null){
|
||||
|
|
@ -1144,7 +1144,7 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
|
||||
private void toIntent(Device device){
|
||||
dismissDialog();
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
// ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,device,true);
|
||||
EventBus.getDefault().post(new ConnectMessageEvent(1, "test"));
|
||||
finish();
|
||||
|
|
@ -1196,7 +1196,7 @@ public class NewBindDeviceActivity extends AppCompatActivity {
|
|||
Commons.HAVE_DEVICE = true;//改变判断是否绑定的变量
|
||||
Commons.IS_CAMERA = false;
|
||||
sp.putBoolean(Commons.LoginSPKey.IS_CAMERA, Commons.IS_CAMERA);
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
// ToastUtil.show(NewBindDeviceActivity.this, "绑定设备成功");
|
||||
AppRoute.newToStart(NewBindDeviceActivity.this,deviceObj,true);
|
||||
finish();
|
||||
L.i("===================绑定设备成功=" + device_mac);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import android.provider.Settings;
|
|||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
|
@ -1971,19 +1972,31 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
|||
});
|
||||
openDialog.show();
|
||||
}
|
||||
AlertDialog alertDialog;
|
||||
IosAlertDialog alertDialog;
|
||||
public void showDevice(){
|
||||
// 检测页面
|
||||
if (!isShowIng){
|
||||
isShowIng = true;
|
||||
isShowEd = true;
|
||||
|
||||
alertDialog = new AlertDialog.Builder(requireActivity())
|
||||
.setTitle("提示")
|
||||
.setMessage("发现一个新设备是否去添加")
|
||||
.setOnDismissListener(dialogInterface -> isShowIng = false)
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
alertDialog = new IosAlertDialog(requireContext(), Gravity.BOTTOM).builder();
|
||||
alertDialog.setTextColor(R.color.danghao_color);
|
||||
alertDialog.setCancelable(false);
|
||||
alertDialog.setTitle("发现设备");
|
||||
alertDialog.setMessage("鱼缸智能插座1个");
|
||||
alertDialog.setNegativeButton("忽略", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
isShowIng = false;
|
||||
alertDialog.dismiss();
|
||||
isShowIng = false;
|
||||
startDownTimer();
|
||||
}
|
||||
});
|
||||
alertDialog.setPositiveButton("添加", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
alertDialog.dismiss();
|
||||
isShowIng = false;
|
||||
closeDownTimer();
|
||||
Intent intent = new Intent();
|
||||
|
|
@ -1994,18 +2007,13 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
|||
intent.putExtra("device", currentDevice);
|
||||
startActivity(intent);
|
||||
AnimationUtil.finishAnimation(requireActivity());
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
isShowIng = false;
|
||||
startDownTimer();
|
||||
})
|
||||
.create();
|
||||
|
||||
}
|
||||
});
|
||||
alertDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int dowmCount = 1;
|
||||
CountDownTimer countDownTimer;
|
||||
private void startDownTimer(){
|
||||
|
|
@ -2066,7 +2074,6 @@ public class DeviceFragment extends BaseV4Fragment implements ObservableScrollVi
|
|||
if (alertDialog!=null){
|
||||
L.i("jjia---扫描暂停----------");
|
||||
alertDialog.dismiss();
|
||||
alertDialog.cancel();
|
||||
alertDialog = null;
|
||||
}
|
||||
closeDownTimer();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.ifish.utils
|
||||
|
||||
import android.app.Activity
|
||||
import com.ifish.baseclass.BaseActivity
|
||||
|
||||
/**
|
||||
* Created by achang on 2018/10/6.
|
||||
|
|
@ -30,16 +29,23 @@ class DialogUtil{
|
|||
return mLoadingDialog!!
|
||||
}
|
||||
|
||||
fun setProgress(value: Int){
|
||||
mLoadingDialog?.setProgress(value)
|
||||
}
|
||||
|
||||
fun setError(){
|
||||
mLoadingDialog?.setError()
|
||||
}
|
||||
fun setLoadingDialogDismiss(activity: Activity?) {
|
||||
mLoadingDialog?.apply {
|
||||
if (this.isShowing ) {
|
||||
activity?.apply {
|
||||
if (!this.isFinishing)
|
||||
mLoadingDialog!!.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
mLoadingDialog = null
|
||||
}
|
||||
}
|
||||
}
|
||||
// LogUtil.logD("setLoadingDialogDismiss===========")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,32 +2,62 @@ package com.ifish.utils
|
|||
|
||||
import android.app.Activity
|
||||
import android.app.Dialog
|
||||
import android.text.TextUtils
|
||||
import android.graphics.drawable.AnimationDrawable
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.cardview.widget.CardView
|
||||
import com.ifish.activity.R
|
||||
import com.ifish.utils.Commons.Text
|
||||
|
||||
|
||||
|
||||
class LoadingDialog(context: Activity,hint:String?) : Dialog(context, R.style.fullDialog) {
|
||||
|
||||
var progress: ProgressBar
|
||||
var ivCancel: ImageView? = null
|
||||
var image: AnimationDrawable? = null
|
||||
var cardview: CardView? = null
|
||||
var tvCancel: TextView? = null
|
||||
init {
|
||||
val inflate = View.inflate(context, R.layout.dialog_loading, null)
|
||||
// val mParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)
|
||||
|
||||
setCancelable(false)
|
||||
setContentView(inflate)
|
||||
var icon =findViewById<ImageView>(R.id.iconx)
|
||||
image = icon.drawable as AnimationDrawable
|
||||
image?.start()
|
||||
|
||||
|
||||
progress =findViewById<ProgressBar>(R.id.dg_pb_loading)
|
||||
cardview =findViewById<CardView>(R.id.cardview)
|
||||
ivCancel =findViewById<ImageView>(R.id.iv_cancel)
|
||||
tvCancel =findViewById<TextView>(R.id.tv_cancel)
|
||||
|
||||
var view =findViewById<TextView>(R.id.tv_hint)
|
||||
tvCancel?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
view.text = hint
|
||||
if (TextUtils.isEmpty(hint)){
|
||||
|
||||
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
setCanceledOnTouchOutside(false)
|
||||
}
|
||||
|
||||
fun setProgress(value: Int){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
progress?.setProgress(value,true)
|
||||
}
|
||||
}
|
||||
|
||||
fun setError(){
|
||||
cardview?.visibility = View.GONE
|
||||
ivCancel?.visibility = View.VISIBLE
|
||||
tvCancel?.visibility = View.VISIBLE
|
||||
image?.stop()
|
||||
|
||||
}
|
||||
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
// window!!.setDimAmount(0f) //去除阴影遮罩效果
|
||||
setCanceledOnTouchOutside(false)
|
||||
// setCancelable(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ import android.widget.FrameLayout;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.ifish.activity.R;
|
||||
|
||||
/**
|
||||
|
|
@ -37,7 +40,7 @@ public class IosAlertDialog {
|
|||
private boolean showNegBtn = false;
|
||||
private boolean isMiddleShowEclipse = false; //setMsg时 文本内容超过最多5行后,省略号是否居中显示,默认不居中
|
||||
private int maxLines = 5;
|
||||
|
||||
int gravity = Gravity.CENTER;
|
||||
public IosAlertDialog(Context context) {
|
||||
this.context = context;
|
||||
WindowManager windowManager = (WindowManager) context
|
||||
|
|
@ -45,6 +48,16 @@ public class IosAlertDialog {
|
|||
display = windowManager.getDefaultDisplay();
|
||||
}
|
||||
|
||||
public IosAlertDialog(Context context,int gravity) {
|
||||
this.context = context;
|
||||
WindowManager windowManager = (WindowManager) context
|
||||
.getSystemService(Context.WINDOW_SERVICE);
|
||||
display = windowManager.getDefaultDisplay();
|
||||
this.gravity = gravity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IosAlertDialog builder() {
|
||||
// 获取Dialog布局
|
||||
View view = LayoutInflater.from(context).inflate(
|
||||
|
|
@ -64,14 +77,18 @@ public class IosAlertDialog {
|
|||
|
||||
// 定义Dialog布局和参数
|
||||
dialog = new Dialog(context, R.style.AlertDialogStyle);
|
||||
dialog.getWindow().setGravity(Gravity.CENTER);
|
||||
dialog.getWindow().setGravity(gravity);
|
||||
dialog.setContentView(view);
|
||||
// 调整dialog背景大小
|
||||
lLayout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (display
|
||||
.getWidth() * 0.7), LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
.getWidth() * 0.9), LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setTextColor(int color){
|
||||
txt_msg.setTextColor(ContextCompat.getColor(context,color));
|
||||
}
|
||||
|
||||
public IosAlertDialog setTitle(String title) {
|
||||
showTitle = true;
|
||||
if ("".equals(title)) {
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/bluetooth_one" android:duration="500"/>
|
||||
<item android:drawable="@drawable/bluetooth_two" android:duration="500"/>
|
||||
<item android:drawable="@drawable/bluetooth_three" android:duration="500"/>
|
||||
<item android:drawable="@drawable/bluetooth_four" android:duration="500"/>
|
||||
</animation-list>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 设置背景色 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="2dp"></corners>
|
||||
<solid android:color="#1A999999"></solid>
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
<!-- 设置进度条颜色 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="2dp"></corners>
|
||||
<solid android:color="@color/cyan"></solid>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -1,49 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1A000000"
|
||||
android:layout_gravity="center">
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
app:cardCornerRadius="@dimen/dp_15"
|
||||
android:layout_gravity="center"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginHorizontal="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
app:cardCornerRadius="20dp"
|
||||
android:elevation="0dp"
|
||||
android:layout_marginHorizontal="60dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:gravity="center"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@color/white"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:orientation="vertical"
|
||||
android:layout_height="150dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iconx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:src="@drawable/bluetooth_connect"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/dg_pb_loading"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:max="40"
|
||||
android:progress="20"
|
||||
android:progressDrawable="@drawable/progress_drawable"
|
||||
android:layout_margin="20dp"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/shape_loading_anim"
|
||||
android:indeterminateOnly="true" />
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="正在加载中..."
|
||||
android:textSize="18sp"
|
||||
android:text="设备正在联网中,请耐心等待"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/bluetooth_five"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:visibility="gone"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignBottom="@id/iv_cancel"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:layout_height="50dp"/>
|
||||
</RelativeLayout>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wv_wv"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="恭喜您,联网成功了"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/danghao_color"
|
||||
/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -24,15 +24,15 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="#c6c6c6" />
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -43,24 +43,24 @@
|
|||
<Button
|
||||
android:id="@+id/btn_neg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="43dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="false"
|
||||
android:background="@drawable/ios_dialog_left_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#037BFF"
|
||||
android:textColor="#999999"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_line"
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="#c6c6c6" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_pos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="43dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="false"
|
||||
android:background="@drawable/ios_dialog_right_bg"
|
||||
|
|
|
|||
|
|
@ -321,4 +321,6 @@
|
|||
<!--弹窗背景是否变暗-->
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue