feat: 新增设备操作页面的activity

This commit is contained in:
niushuai233 2022-10-18 13:58:55 +08:00
parent 8e60f3114e
commit cd78f8fd10
3 changed files with 72 additions and 0 deletions

View File

@ -18,6 +18,15 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity
android:name=".ui.device.DeviceActivity"
android:exported="true">
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>

View File

@ -0,0 +1,20 @@
package cc.niushuai.project.devcontrol.ui.device;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import cc.niushuai.project.devcontrol.databinding.DeviceActivityBinding;
public class DeviceActivity extends AppCompatActivity {
private DeviceActivityBinding binding;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DeviceActivityBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
}
}

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/device_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".ui.device.DeviceActivity">
<RelativeLayout
android:id="@+id/device_activity_rl"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/device_btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/test_btn_1">
</Button>
<TextView
android:id="@+id/device_tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/test_hello_blank_textview_1"/>
<TextView
android:id="@+id/device_tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/device_tv1"
android:text="@string/test_hello_blank_textview_2"/>
<TextView
android:id="@+id/device_tv3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/device_tv2"
android:text="@string/test_hello_blank_textview_3"/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>