{% if state.amp %} {% else %} {% endif %}

کتابخونه ای برای floating action button

کتابخونه ای برای floating action button

برای استفاده فقط با اضافه کردن یک خط کد به gradle:
compile 'com.melnykov:floatingactionbutton:1.3.0'

و اضافه کردن این کد به فایل xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<com.melnykov.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/ic_action_content_new"
fab:fab_colorNormal="@color/primary"
fab:fab_colorPressed="@color/primary_pressed"
fab:fab_colorRipple="@color/ripple" />
</FrameLayout>



و می مونه 3 خط کد برای کدهای جاواتون :
ListView listView = (ListView) findViewById(android.R.id.list);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.attachToListView(listView);

تمام شما صاحب یک FloatingActionButton
شدید

لینک در گیتهاب:
https://github.com/makovkastar/FloatingActionButton

سایت اسفندونه رو هم فراموش نکنین http://esfandune.ir
دیدگاه ها (۱)

به مناسبت میلاد با سعادت حضرت مهدی(عج) کد تخفیف 50 درصدی به ...

سلام یه سایت خوب برای انتخاب (متریال) رنگ بندی برنامه و هم...

یک کتابخونه عالی برای متریال برای استفاده این خط کد را به ...

آموزش جامع برنامه نویسی ios http://www.esfandune.ir/%D9%81...

در حال بارگزاری

خطا در دریافت مطلب های مرتبط