Commit 6e9ad4e95c3c64110401790c193b375af6638479
1 parent
e5e8362a
1 修改分享页面样式
Showing
5 changed files
with
39 additions
and
35 deletions
app/src/main/java/com/cnlive/strike/xiaojiaspeaker/MainActivity.java
| @@ -35,13 +35,13 @@ public class MainActivity extends AppCompatActivity { | @@ -35,13 +35,13 @@ public class MainActivity extends AppCompatActivity { | ||
| 35 | protected void onCreate(Bundle savedInstanceState) { | 35 | protected void onCreate(Bundle savedInstanceState) { |
| 36 | super.onCreate(savedInstanceState); | 36 | super.onCreate(savedInstanceState); |
| 37 | binding = DataBindingUtil.setContentView(this, R.layout.activity_speaker_main); | 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 | XiaoJIaCommInfo.setUserIcon(this,"123456"); | 41 | XiaoJIaCommInfo.setUserIcon(this,"123456"); |
| 42 | XiaoJIaCommInfo.setUserNickName(this,"我的昵称"); | 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 | // XiaoJIaCommInfo.setUserId(this, "10513196"); | 46 | // XiaoJIaCommInfo.setUserId(this, "10513196"); |
| 47 | // XiaoJIaCommInfo.setUserPhone(this, "15010140838"); | 47 | // XiaoJIaCommInfo.setUserPhone(this, "15010140838"); |
config.gradle
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/DeviceManagerFragmentView.java
| @@ -102,14 +102,7 @@ public class DeviceManagerFragmentView implements MvpView { | @@ -102,14 +102,7 @@ public class DeviceManagerFragmentView implements MvpView { | ||
| 102 | @Override | 102 | @Override |
| 103 | public void onClick(View view) { | 103 | public void onClick(View view) { |
| 104 | if (currentUser.getIsMaster() == FamilyListBean.THE_HOST) { | 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 | } else { | 106 | } else { |
| 114 | AlertUtil.showDeftToast(getContext(), getContext().getResources().getString(R.string.change_device_no_pression_tip)); | 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,7 +29,7 @@ import org.greenrobot.eventbus.ThreadMode; | ||
| 29 | public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragmentView, DeviceManagerFragmentPresenter, Object, FragmentDeviceManagerBinding> { | 29 | public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragmentView, DeviceManagerFragmentPresenter, Object, FragmentDeviceManagerBinding> { |
| 30 | private FamilyListBean.UsersBeanX.DeviceListBean currentDeviceInfo; | 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 | DeviceManagerFragment fragment = new DeviceManagerFragment(); | 33 | DeviceManagerFragment fragment = new DeviceManagerFragment(); |
| 34 | Bundle bundle = new Bundle(); | 34 | Bundle bundle = new Bundle(); |
| 35 | bundle.putSerializable("currentDeviceInfo", currentDeviceInfo); | 35 | bundle.putSerializable("currentDeviceInfo", currentDeviceInfo); |
| @@ -58,9 +58,9 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | @@ -58,9 +58,9 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | ||
| 58 | if (null != getMvpView()) { | 58 | if (null != getMvpView()) { |
| 59 | if (null != getArguments()) { | 59 | if (null != getArguments()) { |
| 60 | currentDeviceInfo = (FamilyListBean.UsersBeanX.DeviceListBean) getArguments().getSerializable("currentDeviceInfo"); | 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 | getPresenter().getDeviceDetailMsg(getActivity(), currentDeviceInfo.getMcid()); | 64 | getPresenter().getDeviceDetailMsg(getActivity(), currentDeviceInfo.getMcid()); |
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| @@ -87,6 +87,15 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | @@ -87,6 +87,15 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | ||
| 87 | getActivity().finish(); | 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 | private void initTopBar() { | 101 | private void initTopBar() { |
| @@ -105,9 +114,9 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | @@ -105,9 +114,9 @@ public class DeviceManagerFragment extends MvpBindingFragment<DeviceManagerFragm | ||
| 105 | @Override | 114 | @Override |
| 106 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | 115 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { |
| 107 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); | 116 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); |
| 108 | - if (null==getMvpView()){ | 117 | + if (null == getMvpView()) { |
| 109 | return; | 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,8 +4,8 @@ | ||
| 4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
| 5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
| 6 | android:layout_height="match_parent" | 6 | android:layout_height="match_parent" |
| 7 | - android:orientation="vertical" | ||
| 8 | android:background="@color/white" | 7 | android:background="@color/white" |
| 8 | + android:orientation="vertical" | ||
| 9 | tools:context=".ui.activity.ShareFriendActivity"> | 9 | tools:context=".ui.activity.ShareFriendActivity"> |
| 10 | 10 | ||
| 11 | 11 | ||
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | android:layout_width="match_parent" | 29 | android:layout_width="match_parent" |
| 30 | android:layout_height="wrap_content" | 30 | android:layout_height="wrap_content" |
| 31 | android:layout_centerHorizontal="true" | 31 | android:layout_centerHorizontal="true" |
| 32 | - android:layout_margin="20dp" | 32 | + android:layout_marginTop="20dp" |
| 33 | android:orientation="vertical"> | 33 | android:orientation="vertical"> |
| 34 | 34 | ||
| 35 | <LinearLayout | 35 | <LinearLayout |
| @@ -71,14 +71,16 @@ | @@ -71,14 +71,16 @@ | ||
| 71 | android:layout_marginTop="15dp" | 71 | android:layout_marginTop="15dp" |
| 72 | android:text="@string/scanto_get_invite" | 72 | android:text="@string/scanto_get_invite" |
| 73 | android:textColor="@color/color_fff" | 73 | android:textColor="@color/color_fff" |
| 74 | - android:textSize="15sp" /> | 74 | + android:textSize="20sp" |
| 75 | + android:textStyle="bold" /> | ||
| 75 | 76 | ||
| 76 | <ImageView | 77 | <ImageView |
| 77 | android:id="@+id/erweima" | 78 | android:id="@+id/erweima" |
| 78 | android:layout_width="150dp" | 79 | android:layout_width="150dp" |
| 79 | android:layout_height="150dp" | 80 | android:layout_height="150dp" |
| 80 | android:layout_gravity="center_horizontal" | 81 | android:layout_gravity="center_horizontal" |
| 81 | - android:layout_marginTop="15dp" /> | 82 | + android:layout_marginTop="15dp" |
| 83 | + android:scaleType="fitXY" /> | ||
| 82 | 84 | ||
| 83 | <LinearLayout | 85 | <LinearLayout |
| 84 | android:layout_width="match_parent" | 86 | android:layout_width="match_parent" |
| @@ -88,13 +90,13 @@ | @@ -88,13 +90,13 @@ | ||
| 88 | android:gravity="center"> | 90 | android:gravity="center"> |
| 89 | 91 | ||
| 90 | <TextView | 92 | <TextView |
| 91 | - android:layout_width="15dp" | ||
| 92 | - android:layout_height="15dp" | 93 | + android:layout_width="17dp" |
| 94 | + android:layout_height="17dp" | ||
| 93 | android:background="@drawable/shape_xiaojia_green_circle" | 95 | android:background="@drawable/shape_xiaojia_green_circle" |
| 94 | android:gravity="center" | 96 | android:gravity="center" |
| 95 | android:text="1" | 97 | android:text="1" |
| 96 | android:textColor="@color/white" | 98 | android:textColor="@color/white" |
| 97 | - android:textSize="11sp" | 99 | + android:textSize="13sp" |
| 98 | android:textStyle="bold" /> | 100 | android:textStyle="bold" /> |
| 99 | 101 | ||
| 100 | <TextView | 102 | <TextView |
| @@ -104,17 +106,17 @@ | @@ -104,17 +106,17 @@ | ||
| 104 | android:layout_marginRight="5dp" | 106 | android:layout_marginRight="5dp" |
| 105 | android:text="下载网家家 >" | 107 | android:text="下载网家家 >" |
| 106 | android:textColor="@color/color_282828" | 108 | android:textColor="@color/color_282828" |
| 107 | - android:textSize="12sp" | 109 | + android:textSize="13sp" |
| 108 | android:textStyle="bold" /> | 110 | android:textStyle="bold" /> |
| 109 | 111 | ||
| 110 | <TextView | 112 | <TextView |
| 111 | - android:layout_width="15dp" | ||
| 112 | - android:layout_height="15dp" | 113 | + android:layout_width="17dp" |
| 114 | + android:layout_height="17dp" | ||
| 113 | android:background="@drawable/shape_xiaojia_green_circle" | 115 | android:background="@drawable/shape_xiaojia_green_circle" |
| 114 | android:gravity="center" | 116 | android:gravity="center" |
| 115 | android:text="2" | 117 | android:text="2" |
| 116 | android:textColor="@color/white" | 118 | android:textColor="@color/white" |
| 117 | - android:textSize="11sp" | 119 | + android:textSize="13sp" |
| 118 | android:textStyle="bold" /> | 120 | android:textStyle="bold" /> |
| 119 | 121 | ||
| 120 | <TextView | 122 | <TextView |
| @@ -124,17 +126,17 @@ | @@ -124,17 +126,17 @@ | ||
| 124 | android:layout_marginRight="5dp" | 126 | android:layout_marginRight="5dp" |
| 125 | android:text="注册/登录 >" | 127 | android:text="注册/登录 >" |
| 126 | android:textColor="@color/color_282828" | 128 | android:textColor="@color/color_282828" |
| 127 | - android:textSize="12sp" | 129 | + android:textSize="13sp" |
| 128 | android:textStyle="bold" /> | 130 | android:textStyle="bold" /> |
| 129 | 131 | ||
| 130 | <TextView | 132 | <TextView |
| 131 | - android:layout_width="15dp" | ||
| 132 | - android:layout_height="15dp" | 133 | + android:layout_width="17dp" |
| 134 | + android:layout_height="17dp" | ||
| 133 | android:background="@drawable/shape_xiaojia_green_circle" | 135 | android:background="@drawable/shape_xiaojia_green_circle" |
| 134 | android:gravity="center" | 136 | android:gravity="center" |
| 135 | android:text="3" | 137 | android:text="3" |
| 136 | android:textColor="@color/white" | 138 | android:textColor="@color/white" |
| 137 | - android:textSize="11sp" | 139 | + android:textSize="13sp" |
| 138 | android:textStyle="bold" /> | 140 | android:textStyle="bold" /> |
| 139 | 141 | ||
| 140 | <TextView | 142 | <TextView |
| @@ -144,7 +146,7 @@ | @@ -144,7 +146,7 @@ | ||
| 144 | android:layout_marginRight="5dp" | 146 | android:layout_marginRight="5dp" |
| 145 | android:text="扫码绑定" | 147 | android:text="扫码绑定" |
| 146 | android:textColor="@color/color_282828" | 148 | android:textColor="@color/color_282828" |
| 147 | - android:textSize="12sp" | 149 | + android:textSize="13sp" |
| 148 | android:textStyle="bold" /> | 150 | android:textStyle="bold" /> |
| 149 | </LinearLayout> | 151 | </LinearLayout> |
| 150 | 152 |