Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Android button - how to make transparent background and no border ?

$
0
0

I have an app that started on iOS and I'm migrating it to Android, I have a horizontal stack layout where I have a few controls to help the user filter / update a list view below it. Everything works and looks great except the button.

1) The width of the button is much wider than the image itself

2) I'd rather the button background was transparent with no border - like iOS buttons, is this possible with Android / Xamarin.Forms

        <StackLayout HorizontalOptions="Center" Orientation="Horizontal">
            <Label HorizontalOptions="Start" VerticalTextAlignment="Center" Text="Show sent"></Label>
            <Switch HorizontalOptions="Start" VerticalOptions="Center" IsToggled="{Binding ShowSent}"></Switch>
            <Button HorizontalOptions="Start" VerticalOptions="Center" Image="Instagram/i759refresh2toolbarselected.png"
            Command="{Binding RefreshCommand}"></Button>
        </StackLayout>

The attached screenshot shows how the panel appears at the top of the screen.


Viewing all articles
Browse latest Browse all 91519

Trending Articles