This article contains all the basic components with minimal attributes to be used in our JioMeet. As we defined all the style attributes in themes, we don't need to define some of the duplicated attributes (like font, text size, textColor, corners, corner family, background, and some other attributes) again in the layout XML.
In order to apply the new UI theme for any activity, use Theme.App.NewUi for your activity in manifest.
Note: All the resources related to any module should be within that source package.
Ex: All the dashboard resources should be in the package/dashboard directory.
To add a new res directory you should add the path to your module. It will enable to addition of any resources in that module/res directory.
object SourceSets {
val resourceDirectories = listOf(
"org/jio/meet/dashboard"
)
}
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/menu_contacts_screen"
app:title="My Profile" />
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/menu_home" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Design Meeting Webinar"
android:textAppearance="?attr/textAppearanceListItem" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="30 minutes ago"
android:textAppearance="?attr/textAppearanceListItemSmall" />
To disable any button use enabled = false attribute.
<Button
style="?attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Small Button (Enabled)" />
<Button
style="?attr/buttonStyleSmallSecondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="true"
android:text="Small Button (Secondary)" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Large Button (Enabled)" />
<Button
style="?attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TextButton"
app:icon="@drawable/ic_menu_chat" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:endIconMode="clear_text">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Simple Input Field"
android:text="dhsladhakdjha" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="?attr/textInputStyleBottomLined"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Simple Input Field"
android:text="Simple Input Field" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.checkbox.MaterialCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CheckBox (Enabled)" />
<RadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="RadioButton (Enabled)" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Switch (Enabled)" />
<com.google.android.material.chip.Chip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="dasdhasldhasl" />
<TextView
android:id="@+id/audioOptionSpeaker"
style="?attr/bottomSheetTextItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/audio_speaker"
app:drawableStartCompat="@drawable/ic_speaker_on" />
Use bottomSheetTextItemStyle style attribute to apply the bottom sheet option item.
MaterialDatePicker.Builder.datePicker().build().show(supportFragmentManager, "MaterialDatePicker")
MaterialTimePicker.Builder().build().show(supportFragmentManager, "MaterialTimePicker")