Commit 6e9ad4e95c3c64110401790c193b375af6638479

Authored by YangShuai
1 parent e5e8362a

1 修改分享页面样式

app/src/main/java/com/cnlive/strike/xiaojiaspeaker/MainActivity.java
... ... @@ -35,13 +35,13 @@ public class MainActivity extends AppCompatActivity {
35 35 protected void onCreate(Bundle savedInstanceState) {
36 36 super.onCreate(savedInstanceState);
37 37 binding = DataBindingUtil.setContentView(this, R.layout.activity_speaker_main);
38   - XiaoJIaCommInfo.setUserId(this, "10514333".trim());
39   - XiaoJIaCommInfo.setUserPhone(this, "18301489586".trim());
  38 +// XiaoJIaCommInfo.setUserId(this, "10514333".trim());
  39 +// XiaoJIaCommInfo.setUserPhone(this, "18301489586".trim());
40 40  
41 41 XiaoJIaCommInfo.setUserIcon(this,"123456");
42 42 XiaoJIaCommInfo.setUserNickName(this,"我的昵称");
43   -// XiaoJIaCommInfo.setUserId(this, "10535072".trim());
44   -// XiaoJIaCommInfo.setUserPhone(this, "15532913679".trim());
  43 + XiaoJIaCommInfo.setUserId(this, "358200".trim());
  44 + XiaoJIaCommInfo.setUserPhone(this, "10000000051".trim());
45 45  
46 46 // XiaoJIaCommInfo.setUserId(this, "10513196");
47 47 // XiaoJIaCommInfo.setUserPhone(this, "15010140838");
... ...
config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.3.3",
  24 + version: "0.3.5",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/DeviceManagerFragmentView.java
... ... @@ -102,14 +102,7 @@ public class DeviceManagerFragmentView implements MvpView {
102 102 @Override
103 103 public void onClick(View view) {
104 104 if (currentUser.getIsMaster() == FamilyListBean.THE_HOST) {
105   - //判断GPS是否打开
106   - boolean isOpenGPS = CheckUtil.isOPenGps(getContext());
107   - if (!isOpenGPS) {
108   - CheckUtil.openGPS(getContext());
109   - } else {
110   - //判断蓝牙是否打开
111   - getPermissionsWithTip();
112   - }
  105 + BlueToothStep2Activity.startActivity(getContext());
113 106 } else {
114 107 AlertUtil.showDeftToast(getContext(), getContext().getResources().getString(R.string.change_device_no_pression_tip));
115 108 }
... ...
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/ui/fragment/DeviceManagerFragment.java
... ... @@ -29,7 +29,7 @@ import org.greenrobot.eventbus.ThreadMode;
29 29 public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragmentView, DeviceManagerFragmentPresenter, Object, FragmentDeviceManagerBinding> {
30 30 private FamilyListBean.UsersBeanX.DeviceListBean currentDeviceInfo;
31 31  
32   - public static DeviceManagerFragment newInstance(FamilyListBean.UsersBeanX currentUser,FamilyListBean.UsersBeanX.DeviceListBean currentDeviceInfo) {
  32 + public static DeviceManagerFragment newInstance(FamilyListBean.UsersBeanX currentUser, FamilyListBean.UsersBeanX.DeviceListBean currentDeviceInfo) {
33 33 DeviceManagerFragment fragment = new DeviceManagerFragment();
34 34 Bundle bundle = new Bundle();
35 35 bundle.putSerializable("currentDeviceInfo", currentDeviceInfo);
... ... @@ -58,9 +58,9 @@ public class DeviceManagerFragment extends MvpBindingFragment&lt;DeviceManagerFragm
58 58 if (null != getMvpView()) {
59 59 if (null != getArguments()) {
60 60 currentDeviceInfo = (FamilyListBean.UsersBeanX.DeviceListBean) getArguments().getSerializable("currentDeviceInfo");
61   - FamilyListBean.UsersBeanX currentUser= (FamilyListBean.UsersBeanX) getArguments().getSerializable("currentUser");
62   - if (null != currentDeviceInfo && !TextUtils.isEmpty(currentDeviceInfo.getMcid())&&null!=currentUser) {
63   - getMvpView().initView(currentUser,currentDeviceInfo);
  61 + FamilyListBean.UsersBeanX currentUser = (FamilyListBean.UsersBeanX) getArguments().getSerializable("currentUser");
  62 + if (null != currentDeviceInfo && !TextUtils.isEmpty(currentDeviceInfo.getMcid()) && null != currentUser) {
  63 + getMvpView().initView(currentUser, currentDeviceInfo);
64 64 getPresenter().getDeviceDetailMsg(getActivity(), currentDeviceInfo.getMcid());
65 65 }
66 66 }
... ... @@ -87,6 +87,15 @@ public class DeviceManagerFragment extends MvpBindingFragment&lt;DeviceManagerFragm
87 87 getActivity().finish();
88 88 }
89 89 }
  90 + //配网成功
  91 + else if (EventMsg.CONFIG_NET_SUCCESS == msg.getEventType()) {
  92 + if (null != getMvpView()) {
  93 + if (null != currentDeviceInfo && !TextUtils.isEmpty(currentDeviceInfo.getMcid())) {
  94 + getPresenter().getDeviceDetailMsg(getActivity(), currentDeviceInfo.getMcid());
  95 +
  96 + }
  97 + }
  98 + }
90 99 }
91 100  
92 101 private void initTopBar() {
... ... @@ -105,9 +114,9 @@ public class DeviceManagerFragment extends MvpBindingFragment&lt;DeviceManagerFragm
105 114 @Override
106 115 public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
107 116 super.onRequestPermissionsResult(requestCode, permissions, grantResults);
108   - if (null==getMvpView()){
  117 + if (null == getMvpView()) {
109 118 return;
110 119 }
111   - getMvpView().onRequestPermissionsResult(requestCode,permissions,grantResults);
  120 + getMvpView().onRequestPermissionsResult(requestCode, permissions, grantResults);
112 121 }
113 122 }
... ...
module_xiaojiaSoundBox/src/main/res/layout/activity_share_friend.xml
... ... @@ -4,8 +4,8 @@
4 4 xmlns:tools="http://schemas.android.com/tools"
5 5 android:layout_width="match_parent"
6 6 android:layout_height="match_parent"
7   - android:orientation="vertical"
8 7 android:background="@color/white"
  8 + android:orientation="vertical"
9 9 tools:context=".ui.activity.ShareFriendActivity">
10 10  
11 11  
... ... @@ -29,7 +29,7 @@
29 29 android:layout_width="match_parent"
30 30 android:layout_height="wrap_content"
31 31 android:layout_centerHorizontal="true"
32   - android:layout_margin="20dp"
  32 + android:layout_marginTop="20dp"
33 33 android:orientation="vertical">
34 34  
35 35 <LinearLayout
... ... @@ -71,14 +71,16 @@
71 71 android:layout_marginTop="15dp"
72 72 android:text="@string/scanto_get_invite"
73 73 android:textColor="@color/color_fff"
74   - android:textSize="15sp" />
  74 + android:textSize="20sp"
  75 + android:textStyle="bold" />
75 76  
76 77 <ImageView
77 78 android:id="@+id/erweima"
78 79 android:layout_width="150dp"
79 80 android:layout_height="150dp"
80 81 android:layout_gravity="center_horizontal"
81   - android:layout_marginTop="15dp" />
  82 + android:layout_marginTop="15dp"
  83 + android:scaleType="fitXY" />
82 84  
83 85 <LinearLayout
84 86 android:layout_width="match_parent"
... ... @@ -88,13 +90,13 @@
88 90 android:gravity="center">
89 91  
90 92 <TextView
91   - android:layout_width="15dp"
92   - android:layout_height="15dp"
  93 + android:layout_width="17dp"
  94 + android:layout_height="17dp"
93 95 android:background="@drawable/shape_xiaojia_green_circle"
94 96 android:gravity="center"
95 97 android:text="1"
96 98 android:textColor="@color/white"
97   - android:textSize="11sp"
  99 + android:textSize="13sp"
98 100 android:textStyle="bold" />
99 101  
100 102 <TextView
... ... @@ -104,17 +106,17 @@
104 106 android:layout_marginRight="5dp"
105 107 android:text="下载网家家 >"
106 108 android:textColor="@color/color_282828"
107   - android:textSize="12sp"
  109 + android:textSize="13sp"
108 110 android:textStyle="bold" />
109 111  
110 112 <TextView
111   - android:layout_width="15dp"
112   - android:layout_height="15dp"
  113 + android:layout_width="17dp"
  114 + android:layout_height="17dp"
113 115 android:background="@drawable/shape_xiaojia_green_circle"
114 116 android:gravity="center"
115 117 android:text="2"
116 118 android:textColor="@color/white"
117   - android:textSize="11sp"
  119 + android:textSize="13sp"
118 120 android:textStyle="bold" />
119 121  
120 122 <TextView
... ... @@ -124,17 +126,17 @@
124 126 android:layout_marginRight="5dp"
125 127 android:text="注册/登录 >"
126 128 android:textColor="@color/color_282828"
127   - android:textSize="12sp"
  129 + android:textSize="13sp"
128 130 android:textStyle="bold" />
129 131  
130 132 <TextView
131   - android:layout_width="15dp"
132   - android:layout_height="15dp"
  133 + android:layout_width="17dp"
  134 + android:layout_height="17dp"
133 135 android:background="@drawable/shape_xiaojia_green_circle"
134 136 android:gravity="center"
135 137 android:text="3"
136 138 android:textColor="@color/white"
137   - android:textSize="11sp"
  139 + android:textSize="13sp"
138 140 android:textStyle="bold" />
139 141  
140 142 <TextView
... ... @@ -144,7 +146,7 @@
144 146 android:layout_marginRight="5dp"
145 147 android:text="扫码绑定"
146 148 android:textColor="@color/color_282828"
147   - android:textSize="12sp"
  149 + android:textSize="13sp"
148 150 android:textStyle="bold" />
149 151 </LinearLayout>
150 152  
... ...