Advertisement
khagaru

XML Local widget UI

Jun 25th, 2021 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.41 KB | None | 0 0
  1. 1.# Radio xml---------------------------------------------------------------------------------------------------
  2.  <RadioGroup
  3.        android:id="@+id/radiogroup"
  4.        android:layout_width="wrap_content"
  5.        android:layout_height="wrap_content"
  6.        android:layout_marginStart="20dp"
  7.        android:layout_marginTop="20dp"
  8.        android:orientation="horizontal"
  9.        tools:ignore="UselessParent">
  10.  
  11.         <RadioButton
  12.            android:layout_width="wrap_content"
  13.            android:layout_height="wrap_content"
  14.            android:text="Fighter"
  15.            android:textSize="15sp"
  16.            android:checked="true"
  17.            android:id="@+id/rOne"
  18.  
  19.            tools:ignore="HardcodedText" />
  20.  
  21.         <RadioButton
  22.            android:layout_width="wrap_content"
  23.            android:layout_height="wrap_content"
  24.            android:text="Mage"
  25.            android:layout_marginRight="15dp"
  26.            android:textSize="15sp"
  27.            android:id="@+id/rTwo"
  28.  
  29.            tools:ignore="HardcodedText,RtlHardcoded" />
  30.  
  31.         <RadioButton
  32.            android:layout_width="wrap_content"
  33.            android:layout_height="wrap_content"
  34.            android:text="Tank"
  35.            android:layout_marginRight="15dp"
  36.            android:textSize="15sp"
  37.            android:id="@+id/rThree"
  38.  
  39.            tools:ignore="HardcodedText,RtlHardcoded" />
  40.  
  41. 2.Materiel Images--------------------------------------
  42.  first, go to Theme section-> then add
  43.      </style>
  44.     <style name="RoundedSquare">
  45.         <item name="cornerSize">10%</item>
  46.     </style>
  47.     <style name="Circular">
  48.         <item name="cornerSize">50%</item>
  49.     </style>
  50.  
  51. -->Now go to XML code- Wrtie
  52.  <com.google.android.material.imageview.ShapeableImageView
  53.        android:background="@drawable/me"
  54.        android:id="@+id/imageView"
  55.        android:layout_width="117dp"
  56.        android:layout_height="116dp"
  57.        android:layout_marginTop="24dp"
  58.        app:layout_constraintEnd_toEndOf="parent"
  59.        app:layout_constraintHorizontal_bias="0.238"
  60.        app:layout_constraintStart_toStartOf="parent"
  61.        app:layout_constraintTop_toTopOf="parent"
  62.        tools:srcCompat="@tools:sample/avatars"
  63.        app:shapeAppearance="@style/Circular" // foe made image circular//
  64.        app:strokeWidth="1dp" // image side sytle border//
  65.        app:strokeColor="#5E35B1" // image  side border colour//
  66.        />
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement