Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

radio button android:inputType

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent">

<RadioGroup
    android:id="@+id/radioUnits"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <RadioButton
        android:layout_width="match_parent"
        android:layout_height="75dp"
        android:text="@string/M"
        android:id="@+id/M"
        android:layout_gravity="center_horizontal"
        android:checked="true" />

    <RadioButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/mM"
        android:inputType="text"
        android:id="@+id/mM"
        android:layout_gravity="center_horizontal"/>
    <RadioButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/uM"
        android:id="@+id/uM"
        android:layout_gravity="center_horizontal"
        android:layout_weight="0.09"/>
    <RadioButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/pM"
        android:id="@+id/pM"
        android:layout_gravity="center_horizontal"
        android:layout_weight="0.09"/>
    <RadioButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/cM"
        android:id="@+id/cM"
        android:layout_gravity="center_horizontal"
        android:layout_weight="0.09"/>

</RadioGroup>

    <Button
    android:id="@+id/b1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Set"
    android:layout_weight="0.15"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_marginLeft="68dp"
        android:layout_marginBottom="133dp" />

    <Button
        android:id="@+id/b2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Cancel"
        android:layout_gravity="right"
        android:layout_alignTop="@+id/b1"
        android:layout_toRightOf="@+id/b1"
        android:layout_toEndOf="@+id/b1"
        android:layout_marginLeft="77dp" />

</RelativeLayout>
Comment

PREVIOUS NEXT
Code Example
Java :: java running sum of array 
Java :: random number generator java with range 
Java :: how to change actionbar color in android programmatically 
Java :: java swing set icon to JFrame 
Java :: mockito mock void methods 
Java :: java swing menu click event 
Java :: how to find the prime numbers in java 
Java :: java 8 find in list 
Java :: read timed out android studio 
Java :: Program type already present: android.support.v4.app.INotificationSideChannel 
Java :: how to clear text fields in java 
Java :: java linear search 
Java :: raise error java 
Java :: code to include layout from java in android 
Java :: android canvas line thickness 
Java :: how to use user uid in android 
Java :: java toggle button get state 
Java :: set view layout params android 
Java :: use regex in if statement java 
Java :: java initialize class 
Java :: java string literals 
Java :: public class in java 
Java :: java search string in string 
Java :: convert java to c# 
Java :: get arguments in fragment kotlin 
Java :: System.out.printf("%"+(n)+"s ") 
Java :: enum values to string array 
Java :: create a hashmap 
Java :: icon share android 
Java :: java compute sum and average of array elements 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =