کتابخونه ای برای 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
دیدگاه ها (۱)

ساخت یک floating action button زیبا با استفاده از کتابخونه ز...

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

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

💥 برای اولین بار در ایران📱 کیت تبدیل لنز آیفون X به آیفون 11...

اهمیت حفظ مشتریان فعلی در بازاریابی

سبحان الله

👌👌👌👌👌👌👌👌👌👌

👌👌👌👌👌👌👌👌👌👌

👌👌👌👌👌👌👌👌👌

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

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