Android页面滑动控件 komi-slider
- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/KobeKomi/Slider
- 软件文档: https://github.com/KobeKomi/Slider/blob/master/README.md
- 官方下载: https://github.com/KobeKomi/Slider/archive/master.zip
软件介绍
slider重在让特定的页面具备滑动功能操作。
slider在此版本只需通过简单的继承、xml布局或者直接将上面3种类型对象通过SliderUtils类即可具备滑动功能。
使用方法
1.目前支持activity、fragment、dialogfragment、dialog、view的滑动
2.通过如下简单操作,即可让页面具备滑动功能。
public class SampleActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slider);
SliderUtils.attachActivity(this, mConfig);
}
}亦或通过简单的继承:
public class ExtendsActivity extends SliderActivity {
}或者是直接通过xml布局,就可以让子View具备滑动功能
<com.komi.slider.Slider xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:slider="http://schemas.android.com/apk/res-auto" android:id="@+id/xml_slider_layout" android:layout_width="match_parent" android:layout_height="match_parent" slider:edgeOnly="false" slider:position="all"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:text="I CAN SLIDE NOW!" android:textSize="23sp" /> </com.komi.slider.Slider>
需要注意的是activity在manifest下配置theme需复写android:windowIsTranslucent,否则拉开的背景会全黑。
<style name="ActivityTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:windowIsTranslucent">true</item> </style>
使用项目
在项目的build.gradle文件中添加库依赖
dependencies{
compile 'com.komi.slider:slider:0.3.2'}
jQuery
Earle Castledine、Craig Sharkie / SitePoint / 2010-02-28 / USD 39.95
jQuery: Novice to Ninja is a compilation of best-practice jQuery solutions to meet the most challenging JavaScript problems. In this question-and-answer book on jQuery, you'll find a cookbook of ready......一起来看看 《jQuery》 这本书的介绍吧!
