Last active
July 19, 2017 07:24
-
-
Save martijn00/671b6fec9b22e842d2c4 to your computer and use it in GitHub Desktop.
FAB Button using MvvmCross
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:local="http://schemas.android.com/apk/res-auto" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<android.support.design.widget.FloatingActionButton | |
android:id="@+id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom|right" | |
android:padding="@dimen/element_margin_medium" | |
android:src="@drawable/icon_add_static" | |
local:MvxBind="Click ClickCommand" | |
local:borderWidth="0dp" | |
android:layout_alignParentBottom="true" | |
android:layout_alignParentEnd="true" /> | |
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:local="http://schemas.android.com/apk/res-auto" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<com.refractored.fab.FloatingActionButton | |
android:id="@+id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom|right" | |
android:layout_margin="16dp" | |
android:src="@drawable/icon_add_static" | |
local:MvxBind="Click ClickCommand" | |
local:fab_colorNormal="@color/colorPrimary" | |
local:fab_colorPressed="@color/colorPrimaryDark" | |
local:fab_colorRipple="@color/colorAccent" | |
android:layout_alignParentBottom="true" | |
android:layout_alignParentEnd="true" /> | |
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Setup : MvxAndroidSetup | |
{ | |
public Setup(Context applicationContext) | |
: base(applicationContext) | |
{ | |
} | |
protected override IList<Assembly> AndroidViewAssemblies | |
{ | |
get | |
{ | |
var assemblies = base.AndroidViewAssemblies; | |
assemblies.Add(typeof(Android.Support.Design.Widget.FloatingActionButton).Assembly); | |
assemblies.Add(typeof(com.refractored.fab.FloatingActionButton).Assembly); | |
return assemblies; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well IList doesnt work now and it overrides IEnumerable automatically, still binding doesnt work for me