Advertisement
androidgeek18

activity_main.xml

Nov 30th, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.25 KB | Source Code | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:id="@+id/main"
  6.    android:layout_width="match_parent"
  7.    android:layout_height="match_parent"
  8.    android:background="@color/grey_background"
  9.    tools:context=".MainActivity">
  10.  
  11.     <SeekBar
  12.        android:id="@+id/blues"
  13.        android:layout_width="350dp"
  14.        android:layout_height="40dp"
  15.        android:background="@drawable/blue_rectangle_bg"
  16.        android:elevation="6dp"
  17.        android:max="100"
  18.        android:progressDrawable="@drawable/blue_seekbar_progress"
  19.        app:layout_constraintBottom_toBottomOf="parent"
  20.        app:layout_constraintEnd_toEndOf="parent"
  21.        app:layout_constraintHorizontal_bias="0.491"
  22.        app:layout_constraintStart_toStartOf="parent"
  23.        app:layout_constraintTop_toTopOf="parent"
  24.        app:layout_constraintVertical_bias="0.571" />
  25.  
  26.     <SeekBar
  27.        android:id="@+id/whites"
  28.        android:layout_width="350dp"
  29.        android:layout_height="40dp"
  30.        android:background="@drawable/white_rectangle_bg"
  31.        android:elevation="6dp"
  32.        android:max="100"
  33.        android:progressDrawable="@drawable/white_seekbar_progress"
  34.        app:layout_constraintBottom_toBottomOf="parent"
  35.        app:layout_constraintEnd_toEndOf="parent"
  36.        app:layout_constraintHorizontal_bias="0.491"
  37.        app:layout_constraintStart_toStartOf="parent"
  38.        app:layout_constraintTop_toTopOf="parent"
  39.        app:layout_constraintVertical_bias="0.707" />
  40.  
  41.     <!-- RadioGroup for RadioButtons -->
  42.     <TextView
  43.        android:id="@+id/whitesValueText"
  44.        android:layout_width="wrap_content"
  45.        android:layout_height="wrap_content"
  46.        android:layout_centerHorizontal="true"
  47.        android:text="@string/whites_percentage_text"
  48.        android:textSize="14sp"
  49.        android:layout_marginBottom="10dp"
  50.        android:layout_marginTop="10dp"
  51.        app:layout_constraintBottom_toTopOf="@+id/whites"
  52.        app:layout_constraintEnd_toEndOf="parent"
  53.        app:layout_constraintHorizontal_bias="0.498"
  54.        app:layout_constraintStart_toStartOf="parent"
  55.        app:layout_constraintTop_toBottomOf="@+id/blues"
  56.        app:layout_constraintVertical_bias="1.0"
  57.        android:background="@drawable/edit_text_border"
  58.        android:textColor="@color/black"
  59.        android:padding="6dp" />
  60.  
  61.     <RadioGroup
  62.        android:id="@+id/modeGroup"
  63.        android:layout_width="wrap_content"
  64.        android:layout_height="wrap_content"
  65.        android:layout_marginTop="16dp"
  66.        android:orientation="horizontal"
  67.        app:layout_constraintEnd_toEndOf="parent"
  68.        app:layout_constraintStart_toStartOf="parent"
  69.        app:layout_constraintTop_toBottomOf="@id/whites">
  70.  
  71.         <RadioButton
  72.            android:id="@+id/manualBtn"
  73.            android:layout_width="wrap_content"
  74.            android:layout_height="wrap_content"
  75.            android:layout_marginTop="8dp"
  76.            android:layout_marginEnd="6dp"
  77.            android:layout_marginBottom="8dp"
  78.            android:background="@drawable/blue_rectangle_bg"
  79.            android:elevation="6dp"
  80.            android:padding="6dp"
  81.            android:radius="8dp"
  82.            android:singleLine="true"
  83.            android:text="@string/manual_mode"
  84.            app:layout_constraintBottom_toBottomOf="parent"
  85.            app:layout_constraintEnd_toEndOf="parent"
  86.            app:layout_constraintHorizontal_bias="0.894"
  87.            app:layout_constraintStart_toStartOf="parent"
  88.            app:layout_constraintTop_toBottomOf="@+id/whites"
  89.            app:layout_constraintVertical_bias="0.057" />
  90.  
  91.         <RadioButton
  92.            android:id="@+id/autoBtn"
  93.            android:layout_width="wrap_content"
  94.            android:layout_height="wrap_content"
  95.            android:layout_marginTop="8dp"
  96.            android:layout_marginEnd="6dp"
  97.            android:layout_marginBottom="8dp"
  98.            android:background="@drawable/blue_rectangle_bg"
  99.            android:elevation="6dp"
  100.            android:padding="6dp"
  101.            android:radius="8dp"
  102.            android:text="@string/auto_mode"
  103.            app:layout_constraintBottom_toBottomOf="parent"
  104.            app:layout_constraintEnd_toEndOf="parent"
  105.            app:layout_constraintHorizontal_bias="0.096"
  106.            app:layout_constraintStart_toStartOf="parent"
  107.            app:layout_constraintTop_toBottomOf="@+id/whites"
  108.            app:layout_constraintVertical_bias="0.057" />
  109.  
  110.     </RadioGroup>
  111.  
  112.     <androidx.appcompat.widget.AppCompatButton
  113.        android:id="@+id/power_on"
  114.        android:layout_width="wrap_content"
  115.        android:layout_height="wrap_content"
  116.        android:clickable="true"
  117.        android:elevation="6dp"
  118.        android:focusable="true"
  119.        android:padding="6dp"
  120.        android:text="@string/power_on"
  121.        android:textColor="@color/black"
  122.        app:layout_constraintBottom_toBottomOf="parent"
  123.        app:layout_constraintEnd_toEndOf="parent"
  124.        app:layout_constraintHorizontal_bias="0.271"
  125.        app:layout_constraintStart_toStartOf="parent"
  126.        app:layout_constraintTop_toTopOf="parent"
  127.        app:layout_constraintVertical_bias="0.891" />
  128.  
  129.     <androidx.appcompat.widget.AppCompatButton
  130.        android:id="@+id/power_off"
  131.        android:layout_width="wrap_content"
  132.        android:layout_height="wrap_content"
  133.        android:clickable="true"
  134.        android:elevation="6dp"
  135.        android:focusable="true"
  136.        android:padding="6dp"
  137.        android:text="@string/power_off"
  138.        android:textColor="@color/black"
  139.        app:layout_constraintBottom_toBottomOf="parent"
  140.        app:layout_constraintEnd_toEndOf="parent"
  141.        app:layout_constraintHorizontal_bias="0.759"
  142.        app:layout_constraintStart_toStartOf="parent"
  143.        app:layout_constraintTop_toTopOf="parent"
  144.        app:layout_constraintVertical_bias="0.891" />
  145.  
  146.     <Button
  147.        android:id="@+id/scanBtn"
  148.        android:layout_width="125dp"
  149.        android:layout_height="60dp"
  150.        android:elevation="6dp"
  151.        android:radius="10dp"
  152.        android:text="@string/scan_devices"
  153.        android:layout_marginTop="10dp"
  154.        app:layout_constraintEnd_toEndOf="parent"
  155.        app:layout_constraintHorizontal_bias="0.902"
  156.        app:layout_constraintStart_toStartOf="parent"
  157.        app:layout_constraintTop_toTopOf="parent" />
  158.  
  159.     <TextView
  160.        android:id="@+id/selectedDevice"
  161.        android:layout_width="wrap_content"
  162.        android:layout_height="wrap_content"
  163.        android:layout_marginTop="8dp"
  164.        android:background="@drawable/edit_text_border"
  165.        android:elevation="6dp"
  166.        android:padding="8dp"
  167.        android:text="@string/no_device_selected"
  168.        android:textColor="@color/black"
  169.        android:textSize="20sp"
  170.        app:layout_constraintBottom_toTopOf="@+id/blues"
  171.        app:layout_constraintEnd_toEndOf="parent"
  172.        app:layout_constraintStart_toStartOf="parent"
  173.        app:layout_constraintTop_toTopOf="parent" />
  174.  
  175. </androidx.constraintlayout.widget.ConstraintLayout>
  176.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement