mirror of
https://github.com/niushuai233/DevControl.git
synced 2024-10-27 22:43:20 +08:00
feat: 新增设备操作页面的activity
This commit is contained in:
parent
8e60f3114e
commit
cd78f8fd10
@ -18,6 +18,15 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.device.DeviceActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -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());
|
||||
}
|
||||
}
|
43
app/src/main/res/layout/device_activity.xml
Normal file
43
app/src/main/res/layout/device_activity.xml
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user