Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.# Radio xml---------------------------------------------------------------------------------------------------
- <RadioGroup
- android:id="@+id/radiogroup"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="20dp"
- android:layout_marginTop="20dp"
- android:orientation="horizontal"
- tools:ignore="UselessParent">
- <RadioButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Fighter"
- android:textSize="15sp"
- android:checked="true"
- android:id="@+id/rOne"
- tools:ignore="HardcodedText" />
- <RadioButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Mage"
- android:layout_marginRight="15dp"
- android:textSize="15sp"
- android:id="@+id/rTwo"
- tools:ignore="HardcodedText,RtlHardcoded" />
- <RadioButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Tank"
- android:layout_marginRight="15dp"
- android:textSize="15sp"
- android:id="@+id/rThree"
- tools:ignore="HardcodedText,RtlHardcoded" />
- 2.Materiel Images--------------------------------------
- first, go to Theme section-> then add
- </style>
- <style name="RoundedSquare">
- <item name="cornerSize">10%</item>
- </style>
- <style name="Circular">
- <item name="cornerSize">50%</item>
- </style>
- -->Now go to XML code- Wrtie
- <com.google.android.material.imageview.ShapeableImageView
- android:background="@drawable/me"
- android:id="@+id/imageView"
- android:layout_width="117dp"
- android:layout_height="116dp"
- android:layout_marginTop="24dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.238"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- tools:srcCompat="@tools:sample/avatars"
- app:shapeAppearance="@style/Circular" // foe made image circular//
- app:strokeWidth="1dp" // image side sytle border//
- app:strokeColor="#5E35B1" // image side border colour//
- />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement