Round corner for BottomSheetDialogFragment

I have a custom BttomSheetDialogFragment and I want to have round corners in top of Bottom View This is my Custom class that inflates my layout that I want to appear from bottom View mView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mView = inflater.inflate(R.layout.charge_layout, container, false); initChargeLayoutViews(); return mView; } and … Read more

Adjust icon size of Floating action button (fab)

The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp. So the space between icon and button should be 16dp. <ImageButton android:id=”@+id/fab_add” android:layout_width=”56dp” android:layout_height=”56dp” android:layout_gravity=”bottom|right” android:layout_marginBottom=”16dp” android:layout_marginRight=”16dp” android:background=”@drawable/ripple_oval” android:elevation=”8dp” android:src=”” /> ripple_oval.xml <ripple xmlns:android=”” android:color=”?android:colorControlHighlight”> <item> <shape android:shape=”oval”> <solid android:color=”?android:colorAccent” /> </shape> </item> </ripple> And … Read more

How to use the new Material Design Icon themes: Outlined, Rounded, Two-Tone and Sharp?

Google has revamped its Material Design Icons with 4 new preset themes: Outlined, Rounded, Two-Tone and Sharp, in addition to the regular Filled/Baseline theme: But, unfortunately, it doesn’t say anywhere how to use the new themes. I’ve been using it via Google Web Fonts by including the link: <link href=”” rel=”stylesheet”> And then using the … Read more

How can a divider line be added in an Android RecyclerView?

I am developing an android application where I am using RecyclerView. I need to add a divider in RecyclerView. I tried to add – recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST)); below is my xml code – < android:id=”@+id/drawerList” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_marginTop=”15dp” /> 24 Answers 24

Coloring Buttons in Android with Material Design and AppCompat

Before the AppCompat update came out today I was able to change the color of buttons in Android L but not on older versions. After including the new AppCompat update I am unable to change the color for either version, when I do try the button just disappears. Does anyone know how to change the … Read more

Android Material Design Button Styles

I’m confused on button styles for material design. I’d like to get colorful raised buttons like in the attached link., like the “force stop” and “uninstall” buttons seen under the usage section. Are there available styles or do I need to define them? I couldn’t find the default button styles. Example: <Button style=”@style/PrimaryButton” android:layout_width=”wrap_content” … Read more