About 2,300,000 results
Open links in new tab
  1. Android - border for button - Stack Overflow

    Oct 7, 2011 · Since Android Design Support v28 was introduced, it's easy to create a bordered button using MaterialButton. This class supplies updated Material styles for the button in the constructor. Using app:strokeColor and app:strokeWidth you can create a custom border as following: 1. When you use androidx: build.gradle.

  2. Adding a border/outline to buttons in android studio

    Feb 12, 2023 · I would like to add a border to a button. I have tried the usual stuff i.e creating a drawable file and referencing that in the xml file. But this does not seem to be working. Anyone know why? Here is my XML code for the button:

  3. android - Material design button with border - Stack Overflow

    May 23, 2016 · However, is there a way to make Material design bordered (transparent inside) button? Something like below? You can also use the Material Components for Android. Add the dependency to your build.gradle: In this case you can use the MaterialButton in your layout file:

  4. How to create customized Buttons in Android with different …

    Feb 19, 2021 · We will be creating a new drawable file which will contain the customizations such as shape, color, and gradient which we want to set on our button. To create a drawable file, click on: app -> res -> drawable (right click) -> New -> Drawable …

  5. Add buttons to your app | Views | Android Developers

    Oct 31, 2024 · To create a borderless button, apply the borderlessButtonStyle style to the button, as in the following example: <Button android:id="@+id/supabutton" style="?android:attr/borderlessButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="I'm a button" />

  6. Android Bordered Button. The goal here is very simple. Create a…

    Dec 28, 2016 · Create a transparent button that has a colored border. You need to create a drawable for the <Button> that defines the transparent background and border. <shape android:shape="rectangle">...

  7. Android Button Design, Custom Button, Round Button, Color

    Aug 3, 2022 · Typically for a button, there are just three important states: normal, pressed and enabled. For each of the states of the selector, we can set a different drawable/color/shape on our button. Let’s get started with the implementation of each of these in a new Android Studio Project. We’ll be looking at each of the drawable files one at a time.

  8. How to add border to Android Button - Code2care

    Jul 12, 2020 · We cannot add a border to an Android button using Button view attributes, to do so we need to create an XML file in the drawable folder and set this drawable XML as background to the Button view. Examples : 1. button_border.xml: Place this file in drawable folder.

  9. medyo/Fancybuttons: Icons, Borders, Radius ... for Android buttons - GitHub

    ⚠️ This library was made years ago when it wasn't that easy to customize Android buttons like today. I highly recommend you to use Material Design button as it offers the same features and most importantly it's backed by the Android Team. Icons, Borders, Radius ... for Android buttons.

  10. How can I make make a border for a clicked imagebutton in Android

    Feb 18, 2014 · I would like, when the button is in pressed state, there to be a white border with rounded corners. What can I do to make this happen? Can this be done using just code or will I need an extra background image?

  11. Some results have been removed
Refresh