5 changed files with 132 additions and 201 deletions
@ -0,0 +1,4 @@ |
|||||
|
package com.example.swingarmapp_sandblast; |
||||
|
|
||||
|
public class UsbAttachedActivity { |
||||
|
} |
||||
@ -1,11 +0,0 @@ |
|||||
package com.example.swingarmapp_sandblast.viewmodels; |
|
||||
|
|
||||
import androidx.lifecycle.ViewModel; |
|
||||
|
|
||||
public class MainViewModel extends ViewModel { |
|
||||
|
|
||||
public MainViewModel() { |
|
||||
|
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -0,0 +1,4 @@ |
|||||
|
package com.example.swingarmapp_sandblast.viewmodels; |
||||
|
|
||||
|
public class UsbPermissionReceiver { |
||||
|
} |
||||
@ -0,0 +1,124 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||
|
android:layout_width="500dp" |
||||
|
android:layout_height="360dp" |
||||
|
android:layout_gravity="center" |
||||
|
android:background="@color/white" |
||||
|
android:orientation="vertical" |
||||
|
tools:ignore="MissingDefaultResource"> |
||||
|
|
||||
|
<TextView |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center" |
||||
|
android:layout_margin="25dp" |
||||
|
android:letterSpacing="0.5" |
||||
|
android:text="作业模式" |
||||
|
android:textColor="@color/dark_ink_blue" |
||||
|
android:textSize="30sp" |
||||
|
android:textStyle="bold"> |
||||
|
|
||||
|
</TextView> |
||||
|
|
||||
|
<!--第一行 模式选择--> |
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center|top" |
||||
|
android:layout_marginTop="10dp" |
||||
|
android:layout_marginLeft="10dp" |
||||
|
android:gravity="center" |
||||
|
android:orientation="horizontal"> |
||||
|
<RadioGroup |
||||
|
android:id="@+id/manualModeSelectorGroup" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:orientation="vertical" > |
||||
|
|
||||
|
<RadioButton |
||||
|
android:id="@+id/rb_one" |
||||
|
android:layout_width="80dp" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_marginLeft="50dp" |
||||
|
android:layout_marginTop="10dp" |
||||
|
android:gravity="center" |
||||
|
android:button="@null" |
||||
|
android:background="@drawable/radiobutton_background" |
||||
|
android:textColor="@drawable/radio_button_textcolor" |
||||
|
android:textStyle="bold" |
||||
|
android:checked="true" |
||||
|
android:padding="10dp" |
||||
|
android:textSize="40sp" |
||||
|
android:text="无" /> |
||||
|
|
||||
|
<RadioButton |
||||
|
android:id="@+id/rb_two" |
||||
|
android:layout_width="130dp" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_marginLeft="150dp" |
||||
|
android:layout_marginTop="-73dp" |
||||
|
android:background="@drawable/radiobutton_background" |
||||
|
android:button="@null" |
||||
|
android:gravity="center" |
||||
|
android:padding="10dp" |
||||
|
android:text="水平" |
||||
|
android:textColor="@drawable/radio_button_textcolor" |
||||
|
android:textSize="40sp" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<RadioButton |
||||
|
android:id="@+id/rb_three" |
||||
|
android:layout_width="130dp" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_marginLeft="300dp" |
||||
|
android:layout_marginTop="-75dp" |
||||
|
android:background="@drawable/radiobutton_background" |
||||
|
android:button="@null" |
||||
|
|
||||
|
android:textColor="@drawable/radio_button_textcolor" |
||||
|
android:gravity="center" |
||||
|
android:textStyle="bold" |
||||
|
android:padding="10dp" |
||||
|
android:textSize="40sp" |
||||
|
android:text="焊缝" /> |
||||
|
|
||||
|
|
||||
|
<RadioButton |
||||
|
android:id="@+id/rb_four" |
||||
|
android:layout_width="180dp" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_marginLeft="50dp" |
||||
|
android:layout_marginTop="20dp" |
||||
|
android:button="@null" |
||||
|
android:background="@drawable/radiobutton_background" |
||||
|
android:textColor="@drawable/radio_button_textcolor" |
||||
|
android:gravity="center" |
||||
|
android:textStyle="bold" |
||||
|
android:padding="10dp" |
||||
|
android:textSize="40sp" |
||||
|
android:text="竖直向左" /> |
||||
|
<RadioButton |
||||
|
android:id="@+id/rb_five" |
||||
|
android:layout_width="180dp" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_marginLeft="250dp" |
||||
|
android:layout_marginTop="-75dp" |
||||
|
android:button="@null" |
||||
|
android:background="@drawable/radiobutton_background" |
||||
|
android:textColor="@drawable/radio_button_textcolor" |
||||
|
android:gravity="center" |
||||
|
android:textStyle="bold" |
||||
|
android:padding="10dp" |
||||
|
android:textSize="40sp" |
||||
|
android:text="竖直向右" /> |
||||
|
|
||||
|
> |
||||
|
|
||||
|
|
||||
|
</RadioGroup> |
||||
|
</LinearLayout> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</LinearLayout> |
||||
@ -1,190 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||
android:layout_width="500dp" |
|
||||
android:layout_height="360dp" |
|
||||
android:orientation="vertical" |
|
||||
android:layout_gravity="center" |
|
||||
android:padding="16dp"> |
|
||||
<TextView |
|
||||
android:layout_width="match_parent" |
|
||||
android:layout_height="50dp" |
|
||||
android:text="摆臂角度" |
|
||||
android:textColor="@color/black" |
|
||||
android:textStyle="bold" |
|
||||
android:textSize="30sp" |
|
||||
android:layout_marginBottom="10dp" |
|
||||
android:gravity="center"/> |
|
||||
|
|
||||
<LinearLayout |
|
||||
android:layout_width="match_parent" |
|
||||
android:layout_height="150dp" |
|
||||
android:orientation="horizontal"> |
|
||||
|
|
||||
<!-- 输入框组 --> |
|
||||
<LinearLayout |
|
||||
android:id="@+id/inputContainer" |
|
||||
android:layout_width="200dp" |
|
||||
android:layout_height="150dp" |
|
||||
android:orientation="vertical" |
|
||||
android:padding="12dp" |
|
||||
android:clickable="true" |
|
||||
android:focusable="true" |
|
||||
android:background="@drawable/container_active"> |
|
||||
|
|
||||
<TextView |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:text="对称" |
|
||||
android:layout_gravity="center" |
|
||||
android:textSize="20sp" |
|
||||
android:textStyle="bold" |
|
||||
android:paddingBottom="8dp" /> |
|
||||
|
|
||||
<EditText |
|
||||
android:id="@+id/EditAngleTo32" |
|
||||
android:layout_width="100dp" |
|
||||
android:layout_height="35dp" |
|
||||
android:enabled="true" |
|
||||
android:gravity="right|center" |
|
||||
android:background="@drawable/rounded_edittext" |
|
||||
android:layout_marginTop="20dp" |
|
||||
android:layout_marginLeft="0dp" |
|
||||
android:text="120" |
|
||||
android:hint="请输入..." |
|
||||
android:textStyle="bold" |
|
||||
android:inputType="number" /> |
|
||||
<TextView |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:layout_marginTop="-30dp" |
|
||||
android:layout_marginLeft="20dp" |
|
||||
android:text="°" |
|
||||
android:layout_gravity="center" |
|
||||
android:textSize="16sp" |
|
||||
android:textStyle="bold" |
|
||||
android:paddingBottom="8dp" /> |
|
||||
|
|
||||
</LinearLayout> |
|
||||
|
|
||||
<View |
|
||||
android:layout_width="50dp" |
|
||||
android:layout_height="16dp" /> |
|
||||
|
|
||||
<!-- 按钮组 --> |
|
||||
|
|
||||
<LinearLayout |
|
||||
android:id="@+id/buttonContainer" |
|
||||
android:layout_width="200dp" |
|
||||
android:layout_height="150dp" |
|
||||
android:background="@drawable/container_inactive" |
|
||||
android:clickable="true" |
|
||||
android:focusable="true" |
|
||||
android:orientation="vertical" |
|
||||
android:padding="12dp"> |
|
||||
|
|
||||
<TextView |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:paddingBottom="8dp" |
|
||||
android:text="非对称" |
|
||||
android:layout_gravity="center" |
|
||||
android:textSize="20sp" |
|
||||
android:textStyle="bold" /> |
|
||||
|
|
||||
<RadioGroup |
|
||||
android:id="@+id/radioGroup" |
|
||||
android:layout_width="match_parent" |
|
||||
android:layout_height="match_parent" |
|
||||
android:gravity="center" |
|
||||
android:orientation="horizontal"> |
|
||||
|
|
||||
<RadioButton |
|
||||
android:id="@+id/btn_left" |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:background="@color/trasnparent" |
|
||||
android:textColor="@drawable/radio_button_textcolor" |
|
||||
android:enabled="false" |
|
||||
android:button="@null" |
|
||||
android:gravity="center" |
|
||||
android:textSize="22dp" |
|
||||
android:textStyle="bold" |
|
||||
android:text="左侧" /> |
|
||||
|
|
||||
<RadioButton |
|
||||
android:id="@+id/btn_right" |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:layout_marginStart="16dp" |
|
||||
android:background="@color/trasnparent" |
|
||||
android:textColor="@drawable/radio_button_textcolor" |
|
||||
android:button="@null" |
|
||||
android:gravity="center" |
|
||||
android:enabled="false" |
|
||||
android:textStyle="bold" |
|
||||
android:textSize="22dp" |
|
||||
android:text="右侧" /> |
|
||||
</RadioGroup> |
|
||||
</LinearLayout> |
|
||||
|
|
||||
<View |
|
||||
android:layout_width="match_parent" |
|
||||
android:layout_height="16dp" /> |
|
||||
|
|
||||
|
|
||||
|
|
||||
</LinearLayout> |
|
||||
|
|
||||
<!--确定/取消--> |
|
||||
<LinearLayout |
|
||||
android:layout_width="match_parent" |
|
||||
android:layout_height="50dp" |
|
||||
android:layout_gravity="center" |
|
||||
android:layout_marginTop="40dp" |
|
||||
android:gravity="center" |
|
||||
android:orientation="horizontal"> |
|
||||
|
|
||||
<LinearLayout |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="match_parent" |
|
||||
android:gravity="center" |
|
||||
android:layout_marginRight="20dp" |
|
||||
android:background="@drawable/borderbluegreen"> |
|
||||
|
|
||||
<Button |
|
||||
android:id="@+id/swingArmAngleApply" |
|
||||
android:layout_width="200dp" |
|
||||
android:layout_height="match_parent" |
|
||||
|
|
||||
|
|
||||
android:background="@color/trasnparent" |
|
||||
android:text="确定" |
|
||||
android:textColor="@color/blue_green" |
|
||||
android:textSize="20sp" |
|
||||
android:textStyle="bold"> |
|
||||
</Button> |
|
||||
|
|
||||
</LinearLayout> |
|
||||
|
|
||||
<LinearLayout |
|
||||
android:layout_width="wrap_content" |
|
||||
android:layout_height="wrap_content" |
|
||||
android:gravity="center" |
|
||||
android:background="@drawable/borderorange"> |
|
||||
|
|
||||
<Button |
|
||||
android:id="@+id/swingArmAngleCancel" |
|
||||
android:layout_width="200dp" |
|
||||
android:layout_height="match_parent" |
|
||||
android:background="@color/trasnparent" |
|
||||
android:text="取消" |
|
||||
android:textColor="#ed7041" |
|
||||
android:textSize="20sp" |
|
||||
android:textStyle="bold"> |
|
||||
|
|
||||
</Button> |
|
||||
</LinearLayout> |
|
||||
|
|
||||
</LinearLayout> |
|
||||
|
|
||||
</LinearLayout> |
|
||||
Loading…
Reference in new issue