Showing
14 changed files
with
20 additions
and
56 deletions
| ... | ... | @@ -148,6 +148,12 @@ |
| 148 | 148 | |
| 149 | 149 | <activity android:name=".activity.QrCodeShowActivity"> |
| 150 | 150 | </activity> |
| 151 | + | |
| 152 | + <activity | |
| 153 | + android:name="com.xgimi.gimicinema.activity.SwitchControlActivity" | |
| 154 | + android:theme="@style/AppTheme.NoActionBar"> | |
| 155 | + | |
| 156 | + </activity> | |
| 151 | 157 | </application> |
| 152 | 158 | |
| 153 | 159 | </manifest> |
| \ No newline at end of file | ... | ... |
| ... | ... | @@ -22,7 +22,6 @@ import android.widget.Toast; |
| 22 | 22 | import com.gimi.common.cinema.model.SambaMsg; |
| 23 | 23 | import com.gimi.common.cinema.utils.T; |
| 24 | 24 | import com.gimi.common.cinema.utils.WifiApManger; |
| 25 | -import com.qnbar.switchcontrol.SwitchControlActivity; | |
| 26 | 25 | import com.xgimi.gimicinema.BuildConfig; |
| 27 | 26 | import com.xgimi.gimicinema.R; |
| 28 | 27 | import com.xgimi.gimicinema.mview.ISettingView; | ... | ... |
| 1 | -package com.qnbar.switchcontrol; | |
| 1 | +package com.xgimi.gimicinema.activity; | |
| 2 | 2 | |
| 3 | 3 | import android.graphics.Rect; |
| 4 | 4 | import android.os.Bundle; |
| ... | ... | @@ -13,9 +13,10 @@ import com.adroplat.fist_switch.jni.FistJni; |
| 13 | 13 | import com.adroplat.fist_switch.jni.SubDevice; |
| 14 | 14 | import com.adroplat.fist_switch.utils.protocol.one.FistProtocol; |
| 15 | 15 | import com.google.gson.Gson; |
| 16 | -import com.qnbar.switchcontrol.adapter.DeviceListAdapter; | |
| 17 | -import com.qnbar.switchcontrol.adapter.SwitchListAdapter; | |
| 18 | 16 | import com.qnbar.switchcontrol.model.SwitchMessageEvent; |
| 17 | +import com.xgimi.gimicinema.R; | |
| 18 | +import com.xgimi.gimicinema.adapter.DeviceListAdapter; | |
| 19 | +import com.xgimi.gimicinema.adapter.SwitchListAdapter; | |
| 19 | 20 | import org.greenrobot.eventbus.EventBus; |
| 20 | 21 | import org.greenrobot.eventbus.Subscribe; |
| 21 | 22 | import org.greenrobot.eventbus.ThreadMode; |
| ... | ... | @@ -28,14 +29,8 @@ public class SwitchControlActivity extends AppCompatActivity { |
| 28 | 29 | @Override |
| 29 | 30 | protected void onCreate(Bundle savedInstanceState) { |
| 30 | 31 | super.onCreate(savedInstanceState); |
| 31 | - setContentView(R.layout.content_main); | |
| 32 | -// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); | |
| 33 | -// setSupportActionBar(toolbar); | |
| 34 | -// if (getSupportActionBar() != null) { | |
| 35 | -// getSupportActionBar().setTitle("智能开关设置"); | |
| 36 | -// } | |
| 32 | + setContentView(R.layout.activity_switch_control); | |
| 37 | 33 | EventBus.getDefault().register(this); |
| 38 | - //EventBus,List of Hub,List of Lights | |
| 39 | 34 | //TODO save DeviceNum,SubDeviceNum |
| 40 | 35 | initList(); |
| 41 | 36 | FistJni fistJni = FistJni.getInstance(); | ... | ... |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | * limitations under the License. |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -package com.qnbar.switchcontrol.adapter; | |
| 17 | +package com.xgimi.gimicinema.adapter; | |
| 18 | 18 | |
| 19 | 19 | import android.graphics.Color; |
| 20 | 20 | import android.support.v7.widget.RecyclerView; |
| ... | ... | @@ -26,7 +26,7 @@ import android.view.ViewGroup; |
| 26 | 26 | import android.widget.TextView; |
| 27 | 27 | import com.adroplat.fist_switch.jni.Device; |
| 28 | 28 | import com.adroplat.fist_switch.jni.FistJni; |
| 29 | -import com.qnbar.switchcontrol.R; | |
| 29 | +import com.xgimi.gimicinema.R; | |
| 30 | 30 | |
| 31 | 31 | public class DeviceListAdapter extends RecyclerView.Adapter<DeviceListAdapter.DeviceHolder> |
| 32 | 32 | implements View.OnClickListener, View.OnLongClickListener { | ... | ... |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | * limitations under the License. |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -package com.qnbar.switchcontrol.adapter; | |
| 17 | +package com.xgimi.gimicinema.adapter; | |
| 18 | 18 | |
| 19 | 19 | import android.graphics.Color; |
| 20 | 20 | import android.support.v7.widget.RecyclerView; |
| ... | ... | @@ -26,7 +26,7 @@ import android.view.ViewGroup; |
| 26 | 26 | import android.widget.TextView; |
| 27 | 27 | import com.adroplat.fist_switch.jni.FistJni; |
| 28 | 28 | import com.adroplat.fist_switch.jni.SubDevice; |
| 29 | -import com.qnbar.switchcontrol.R; | |
| 29 | +import com.xgimi.gimicinema.R; | |
| 30 | 30 | |
| 31 | 31 | public class SwitchListAdapter extends RecyclerView.Adapter<SwitchListAdapter.DeviceHolder> |
| 32 | 32 | implements View.OnClickListener, View.OnLongClickListener { | ... | ... |
| ... | ... | @@ -45,7 +45,7 @@ public class MainActivity extends Activity { |
| 45 | 45 | @Override |
| 46 | 46 | protected void onCreate(Bundle savedInstanceState) { |
| 47 | 47 | super.onCreate(savedInstanceState); |
| 48 | - setContentView(R.layout.content_main); | |
| 48 | + setContentView(R.layout.activity_switch_control); | |
| 49 | 49 | EventBus.getDefault().register(this); |
| 50 | 50 | startService(new Intent(this, ConfigService.class)); |
| 51 | 51 | ... | ... |
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | android:orientation="vertical" |
| 11 | 11 | app:layout_behavior="@string/appbar_scrolling_view_behavior" |
| 12 | 12 | tools:showIn="@layout/activity_switch_control" |
| 13 | - tools:context="com.qnbar.switchcontrol.SwitchControlActivity"> | |
| 13 | + tools:context=".activity.SwitchControlActivity"> | |
| 14 | 14 | |
| 15 | 15 | <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> |
| 16 | 16 | ... | ... |
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | android:orientation="vertical" |
| 8 | 8 | > |
| 9 | 9 | <ImageView android:layout_width="80dp" android:layout_height="80dp" |
| 10 | - android:background="@mipmap/host"/> | |
| 10 | + android:background="@drawable/host"/> | |
| 11 | 11 | <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 12 | 12 | android:id="@+id/deviceNumTv" |
| 13 | 13 | android:textSize="16sp" | ... | ... |
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | android:orientation="vertical" |
| 8 | 8 | > |
| 9 | 9 | <ImageView android:layout_width="80dp" android:layout_height="80dp" |
| 10 | - android:background="@mipmap/equipment_switch"/> | |
| 10 | + android:background="@drawable/equipment_switch"/> | |
| 11 | 11 | |
| 12 | 12 | <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 13 | 13 | android:id="@+id/subDeviceNum" | ... | ... |
| ... | ... | @@ -8,11 +8,7 @@ |
| 8 | 8 | android:allowBackup="true" |
| 9 | 9 | android:label="@string/app_name" |
| 10 | 10 | android:supportsRtl="true"> |
| 11 | - <activity | |
| 12 | - android:name=".SwitchControlActivity" | |
| 13 | - android:theme="@style/AppTheme.NoActionBar"> | |
| 14 | 11 | |
| 15 | - </activity> | |
| 16 | 12 | </application> |
| 17 | 13 | |
| 18 | 14 | </manifest> |
| \ No newline at end of file | ... | ... |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<android.support.design.widget.CoordinatorLayout | |
| 3 | - xmlns:android="http://schemas.android.com/apk/res/android" | |
| 4 | - xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 5 | - android:layout_width="match_parent" | |
| 6 | - android:layout_height="match_parent"> | |
| 7 | - | |
| 8 | - <android.support.design.widget.AppBarLayout | |
| 9 | - android:layout_height="wrap_content" | |
| 10 | - android:layout_width="match_parent" | |
| 11 | - android:theme="@style/AppTheme.AppBarOverlay"> | |
| 12 | - | |
| 13 | - <android.support.v7.widget.Toolbar | |
| 14 | - android:id="@+id/toolbar" | |
| 15 | - android:layout_width="match_parent" | |
| 16 | - android:layout_height="?attr/actionBarSize" | |
| 17 | - android:background="?attr/colorPrimary" | |
| 18 | - app:popupTheme="@style/AppTheme.PopupOverlay"/> | |
| 19 | - | |
| 20 | - </android.support.design.widget.AppBarLayout> | |
| 21 | - | |
| 22 | - <include layout="@layout/content_main"/> | |
| 23 | - | |
| 24 | - <android.support.design.widget.FloatingActionButton | |
| 25 | - android:id="@+id/fab" | |
| 26 | - android:layout_width="wrap_content" | |
| 27 | - android:layout_height="wrap_content" | |
| 28 | - android:layout_gravity="bottom|end" | |
| 29 | - android:layout_margin="@dimen/fab_margin" | |
| 30 | - app:srcCompat="@android:drawable/ic_dialog_email"/> | |
| 31 | - | |
| 32 | -</android.support.design.widget.CoordinatorLayout> |
Please
register
or
login
to post a comment