@@ -142,6 +142,9 @@ public class BriefsActivity extends BaseActivity implements BriefsContract.View{
|
||
| 142 | 142 |
systemMsgSwitch.post(new Runnable() {
|
| 143 | 143 |
@Override |
| 144 | 144 |
public void run() {
|
| 145 |
+ if(orderMsgSwitch==null||systemMsgSwitch==null){
|
|
| 146 |
+ return; |
|
| 147 |
+ } |
|
| 145 | 148 |
orderMsgSwitch.setText(TextUtils.isEmpty(orderMsg) ? getString(R.string.no_order_msg) : orderMsg); |
| 146 | 149 |
systemMsgSwitch.setText(TextUtils.isEmpty(sysMsg) ? getString(R.string.no_system_msg): sysMsg); |
| 147 | 150 |
} |
@@ -2,6 +2,7 @@ package ai.pai.lensman.main; |
||
| 2 | 2 |
|
| 3 | 3 |
import android.content.Intent; |
| 4 | 4 |
import android.os.Bundle; |
| 5 |
+import android.provider.Settings; |
|
| 5 | 6 |
import android.support.v7.widget.GridLayoutManager; |
| 6 | 7 |
import android.support.v7.widget.LinearLayoutManager; |
| 7 | 8 |
import android.support.v7.widget.RecyclerView; |
@@ -41,7 +42,7 @@ public class MainActivity extends BaseActivity implements MainContract.View {
|
||
| 41 | 42 |
@Override |
| 42 | 43 |
protected void onCreate(Bundle savedInstanceState) {
|
| 43 | 44 |
super.onCreate(savedInstanceState); |
| 44 |
- setContentView(R.layout.activity_upload); |
|
| 45 |
+ setContentView(R.layout.activity_main); |
|
| 45 | 46 |
unbinder = ButterKnife.bind(this); |
| 46 | 47 |
|
| 47 | 48 |
presenter = new MainPresenter(this); |
@@ -65,6 +66,16 @@ public class MainActivity extends BaseActivity implements MainContract.View {
|
||
| 65 | 66 |
LogHelper.d(TAG,"onStop"); |
| 66 | 67 |
} |
| 67 | 68 |
|
| 69 |
+ @OnClick(R.id.layout_box_wifi) |
|
| 70 |
+ void jump2WifiSettings(){
|
|
| 71 |
+ try {
|
|
| 72 |
+ Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS); |
|
| 73 |
+ startActivity(intent); |
|
| 74 |
+ }catch (Exception e){
|
|
| 75 |
+ e.printStackTrace(); |
|
| 76 |
+ } |
|
| 77 |
+ } |
|
| 78 |
+ |
|
| 68 | 79 |
@OnClick(R.id.layout_brief) |
| 69 | 80 |
void jumpToBriefs(){
|
| 70 | 81 |
MobclickAgent.onEvent(this, UmengEvent.home_brief_btn_click); |
@@ -34,6 +34,15 @@ |
||
| 34 | 34 |
android:text="@string/bar_app_name" |
| 35 | 35 |
android:textColor="@color/text_white" |
| 36 | 36 |
android:textSize="@dimen/action_bar_title_medium_text_size" /> |
| 37 |
+ |
|
| 38 |
+ <ImageView |
|
| 39 |
+ android:layout_width="32dp" |
|
| 40 |
+ android:layout_height="32dp" |
|
| 41 |
+ android:padding="4dp" |
|
| 42 |
+ android:layout_gravity="center_vertical" |
|
| 43 |
+ android:layout_marginRight="6dp" |
|
| 44 |
+ android:src="@drawable/upload" /> |
|
| 45 |
+ |
|
| 37 | 46 |
</LinearLayout> |
| 38 | 47 |
</RelativeLayout> |
| 39 | 48 |
|
@@ -65,6 +74,7 @@ |
||
| 65 | 74 |
android:orientation="horizontal"> |
| 66 | 75 |
|
| 67 | 76 |
<RelativeLayout |
| 77 |
+ android:id="@+id/layout_box_wifi" |
|
| 68 | 78 |
android:layout_width="0dp" |
| 69 | 79 |
android:layout_height="match_parent" |
| 70 | 80 |
android:layout_weight="1" |