آموزش کتابخانه recyclerviewhelper
-
مطالب مشابه
-
توسط Omid Zakeri
کتابخانه WindowImageView صفحه نمایش را به صورت یک background خاص نمایش می دهد همان طور که می بینید جلوه زیبا و حرفه ای به اپلیکیشن شما می دهد.
ابتدا در قسمت build.gradle موارد زیر را اضافه کنید:
repositories { maven { url "https://jitpack.io" } } dependencies { compile 'com.github.Bleoo:WindowImageView:1.0.2' }
در قسمت xml.
<io.github.bleoo.windowimageview.WindowImageView android:id="@+id/window_image_view" android:layout_width="match_parent" android:layout_height="180dp" app:frescoEnable="false" app:src="@drawable/timg" />
و در قسمت کلاس مربوط اکتیویتی قسمت زیر را اضافه کنید:
window_image_view.setFrescoEnable(true); window_image_view.setImageResource(R.drawable.timg); window_image_view.bindRecyclerView(recyclerView);
راهنمایی و پشتیبانی : WindowImageView
WindowImageView-master.zip
-
توسط Omid Zakeri
MultiSnapRecyclerView کتابخانه ای با طراحی زیبا که به شما این امکان را می دهد لیست خود را به بهترین شکل و با طراحی فوق العاده طراحی کنید.
ابتدا در قسمت Gradle مورد زیر را اضافه کنید:
dependencies { implementation 'com.github.takusemba:multisnaprecyclerview:1.3.3' }
قسمت xml
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView android:layout_width="match_parent" android:layout_height="wrap_content" app:msrv_gravity="start" or center, end app:msrv_ms_per_inch="@dimen/normal_speed" // speed of scrolling through. app:msrv_snap_count="2" /> items to scroll over
set layout manager
LinearLayoutManager layoutManager = new LinearLayoutManager(this); multiSnapRecyclerView.setLayoutManager(layoutManager); multiSnapRecyclerView.setAdapter(adapter); multiSnapRecyclerView.setOnSnapListener(new OnSnapListener() { @Override public void snapped(int position) { // do something with the position of the snapped view } });
راهنما و پشتیبانی : MultiSnapRecyclerView
MultiSnapRecyclerView-master.zip
-
توسط Omid Zakeri
با استفاده از این کتابخانه شما میتوانید ckeckBox هایی دارای حالت انیمیشن را به برنامه خود اضافه کنید
build.gradle
repositories { // ... maven { url "https://jitpack.io" } }
dependency
dependencies { compile 'com.github.lguipeng:AnimCheckBox:1.0.1' }
**Maven**
<repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> <dependency> <groupId>com.github.lguipeng</groupId> <artifactId>AnimCheckBox</artifactId> <version>1.0.1</version> </dependency>
Layout File
<com.github.lguipeng.library.animcheckbox.AnimCheckBox android:layout_gravity="center_horizontal" android:layout_width="80dp" android:padding="4dp" android:layout_height="wrap_content" app:stroke_width="4dp" app:stroke_color="#2196F3" app:circle_color="#1976D2" app:checked="true"/>
Java File
AnimCheckBox checkbox = (AnimCheckBox)findViewById(R.id.checkbox) checkbox.setChecked(true); boolean animation = true; checkbox.setChecked(false, animation);
support AnimCheckBox
AnimCheckBox-master.zip
-
توسط Omid Zakeri
شما با استفاده از این کتابخانه زیبا و جذاب میتوانید لیست contact یا هر لیست دیگر را به صورت نمایه زیر نمایش دهید:
حالا برای دانلود این کتابخانه قسمت زیر را در gradle اضافه کنید:
dependencies { compile 'com.gjiazhe:wavesidebar:1.3' }
و در قسمت Layout میتوانید از این کتابخانه به صورت زیر استفاده کنید:
<com.gjiazhe.wavesidebar.WaveSideBar android:id="@+id/side_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingRight="8dp" app:sidebar_position="right" app:sidebar_max_offset="80dp" app:sidebar_lazy_respond="false" app:sidebar_text_color="#8D6E63" app:sidebar_text_size="14sp" app:sidebar_text_alignment="center"/>
سری ویژگی های این کتابخانه شامل موارد زیر است :
شما می توانید از این ویژگی ها در قسمت layout یا در قسمت اکتیویتی استفاده کنید :
WaveSideBar sideBar = (WaveSideBar) findViewById(R.id.side_bar); sideBar.setTextColor(Color.BLACK); sideBar.setMaxOffset(100); sideBar.setPosition(WaveSideBar.POSITION_LEFT); sideBar.setTextAlign(WaveSideBar.TEXT_ALIGN_CENTER); sideBar.setLazyRespond(true);
WaveSideBar sideBar = (WaveSideBar) findViewById(R.id.side_bar); sideBar.setOnSelectIndexItemListener(new WaveSideBar.OnSelectIndexItemListener() { @Override public void onSelectIndexItem(String index) { Log.d("WaveSideBar", index); // Do something here .... } });
شما با استفاده از متد setIndexItems می توانید برای Customize استفاده کنید.
با استفاده از متد setPosition شما می توانید موقعیت قرار گیری آیتم هارا انتخاب کنید:
sideBar.setPosition(WaveSideBar.POSITION_LEFT);
پشتیبانی WaveSideBar
WaveSideBar-master.zip
-
توسط Omid Zakeri
این کتابخانه به منظور ارائه انیمیشن های جدید برای اکتیویتی ها در Android ایجاد شده است. با استفاده از کلاس ViewDragHelper، می توانید انیمیشن هایی ایجاد کنید که امکان کنترل کامل نمایش را توسط کاربر فراهم می کند.
Dragger در حال حاضر با استفاده از Rebound (کوچک، 41.7kb) از فیس بوک برای ارائه انیمیشن های واقع گرایانه و بهبود عملکرد دستگاه های قدیمی است.
این کتابخانه باید بر روی API 10 کار کند.
برای استفاده از این کتابخانه شما ابتدا موارد زیر را به build.gradle اضافه کنید:
repositories { maven { url "https://jitpack.io" } } dependencies { compile 'com.github.ppamorim:dragger:1.2' }
سپس می توانید از این کتابخانه به صورت زیر استفاده کنید :
<com.github.ppamorim.library.DraggerView android:layout_width="match_parent" android:layout_height="match_parent" dragger_layout:drag_view_id="@+id/drag_view" dragger_layout:shadow_view_id="@+id/shadow_view" dragger_layout:drag_position="top"> <FrameLayout android:id="@+id/shadow_view" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/transparent" android:visibility="invisible"/> <LinearLayout android:id="@+id/drag_view" android:layout_width="match_parent" android:layout_height="match_parent"/> </com.github.ppamorim.library.DraggerView>
قسمت styles:
<style name="YourTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="android:windowAnimationStyle">@null</item> </style>
شما میتوانید در قسمت manifest اکتیویتی مربوطه را اضافه کنید :
<activity android:name="com.github.dragger.BaseActivity" android:theme="@style/YourTheme"/>
یا از روش زیر میتوانید استفاده کنید:
public class YourActivity extends DraggerActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setShadowView(R.layout.custom_shadow); // It is not necessary, use if you want. setContentView(R.layout.layout_content); } } سری متد هایی که شما می توانید در این کاتبخانه استفاده کنید و به صورت Custom نمایش دهید:
setDraggerCallback(DraggerCallback) //Interface that's provides some infos of the animation. setSlideEnabled(boolean) //Enable or disable the drag, useful to use with ScrollViews. setHorizontalDragRange(float) //Draggable distance that the draggableView can use, horizontally. setVerticalDragRange(float) //Draggable distance that the draggableView can use, vertically. setRunAnimationOnFinishInflate(boolean) //Run the initial animation, useful if you only want the drag function. setDraggerLimit(float) //Set the max limit drag, default is 0.5 (center of the screen). setDraggerPosition(DraggerPosition) //Set the position of archor. setTension(float) //Tension of the animation. This represent with the friction, how much time the animation will be executed. setFriction(float) //Friction of the animation. This represent with the tension, how much friction is applied at the tension animation. show() //Show the drag view with Rebound animation. closeActivity() //Simply close the activity with Rebound animation, based of the DraggerPosition choosen.
پشتیبانی:Dragger
Dragger-master.zip
-
-
فایل
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .