android tab选项卡火车票,Androd开源库

优质Android 源码现有各类源码接近6000套,视频教程100套,主要涉及.net网站、软件与安卓系列源码,

每套源码都已经经过测试,必须附加使用说明或帮助文档。靠谱不坑爹! 需要打包下载合集地址请的朋友

,欢迎您与我交流 QQ群: 258450620 或QQ:50841662

Android 源代码大约6000套,源代码数据大约8G,源代码视频教程大约30G

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

本人定期更新经典案例及解决方案如有疑问请联系我QQ1822282728

Android runtime permissions powered by RxJava2

allprojects {

repositories {

...

maven { url 'https://jitpack.io' }

}

}

dependencies {

implementation 'com.github.tbruyelle:rxpermissions:0.10.2'

}

完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数

compile 'com.lzy.widget:imagepicker:0.6.1' //指定版本

相册选择图片.

城市选择、定位、搜索及右侧字母导航,类似美团 百度糯米 饿了么等APP选择城市功能

dependencies {

implementation 'com.zaaach:citypicker:2.0.3' //必选

implementation 'com.android.support:recyclerview-v7:27.1.1' //必选

}

android 经量级选择图片框架,支持拍照,获取相册图片,可以多选,单选

存在bug

step1: add to your project build.gradle

buildscript {

repositories {

maven { url "https://jitpack.io" }

...

}

}

step2: Add the dependency

dependencies {

compile 'com.jhworks.library:ImageSelect:1.1.1'

}

史上最简单侧滑菜单,0耦合,支持任意ViewGroup。一步集成侧滑(删除)菜单,高仿QQ、IOS

Step 1. Add the JitPack repository to your build file。 Add it in your root build.gradle at the end of repositories:

allprojects {

repositories {

...

maven { url "https://jitpack.io" }

}

}

Step 2. Add the dependency

dependencies {

implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.3.0'

}

EasySwipeMenuLayout

侧滑删除

https://github.com/anzaizai/EasySwipeMenuLayout

you need to add jitpack repository infomaition to build.gradle in your project.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.2.0'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

maven { url "https://jitpack.io" }

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

You need to add library dependencies infomation to build.gradle in your module.

compile 'com.github.anzaizai:EasySwipeMenuLayout:1.1.2'

XMarqueeView

作者:jxnk25

链接:https://www.jianshu.com/p/8d0972ac2236

來源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

dependencies {

compile 'com.xhb:xmarqueeview:2.0.0'

}

Dachshund Tab Layout

炫酷的tablayout

开源地址:

AndroidAutoLayout

Android屏幕适配方案,直接填写设计图上的像素尺寸即可完成适配,最大限度解决适配问题

开源地址:

SectionedRecyclerView

dependencies{

compile 'com.truizlop.sectionedrecyclerview:library:1.2.0'

}

hellocharts-android

Android Studio/Gradle

Maven Central/jCenter, add dependency to your build.gradle:

dependencies{

compile 'com.github.lecho:hellocharts-library:1.5.8@aar'

}

JitPack.io, add jitpack.io repositiory and dependency to your build.gradle:

repositories {

maven {

url "https://jitpack.io"

}

}

dependencies {

compile 'com.github.lecho:hellocharts-android:v1.5.8'

}

org.slf4j:slf4j-api:添加日志管理

dependencies {

compile 'org.slf4j:slf4j-api:1.7.25'

compile 'com.github.tony19:logback-android:1.1.1-12'

}

jpinyin

JPinyin是一个汉字转拼音的Java开源类库,在PinYin4j的功能基础上做了一些改进。

https://github.com/stuxuhai/jpinyin

app 中的 build.gradle:

allprojects {

repositories {

...

maven { url "https://jitpack.io" }

}

}

dependencies {

compile 'com.github.SilenceDut:jpinyin:v1.0'

}

FlycoTabLayout

dependencies{

compile 'com.android.support:support-v4:23.1.1'

compile 'com.nineoldandroids:library:2.4.0'

compile 'com.flyco.roundview:FlycoRoundView_Lib:1.1.2@aar'

compile 'com.flyco.tablayout:FlycoTabLayout_Lib:1.5.0@aar'

}

After v2.0.0

dependencies{

compile 'com.android.support:support-v4:23.1.1'

compile 'com.nineoldandroids:library:2.4.0'

compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.0.0@aar'

}

After v2.0.2(support 3.0+)

dependencies{

compile 'com.android.support:support-v4:23.1.1'

compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'

}

topsnackbar

Show a Snackbar from the top.

https://github.com/AndreiD/TSnackBar

app 中的 build.gradle:

dependencies {

compile 'com.androidadvance:topsnackbar:1.1.1'

}

permissions4m

意为 Permissions for M,基于 hongyangAndroid 的 MPermissions 项目二次开发,使用编译时注解,较运行时注解效率更高。起初目的是仅作为纯粹的 Andriod 编译时注解项目,较原有项目有以下升级:

https://github.com/jokermonn/permissions4m#single

project 中的 build.gradle:

buildscript {

// ...

}

allprojects {

repositories {

// 请添加如下一行

maven { url 'https://jitpack.io' }

}

}

app 中的 build.gradle:

dependencies {

compile 'com.github.jokermonn:permissions4m:2.1.2-lib'

annotationProcessor 'com.github.jokermonn:permissions4m:2.1.2-processor'

}

阿里ARouter使用

android {

defaultConfig {

...

javaCompileOptions {

annotationProcessorOptions {

arguments = [ moduleName : project.getName() ]

}

}

}

}

dependencies {

// 替换成最新版本, 需要注意的是api

// 要与compiler匹配使用,均使用最新版可以保证兼容

compile 'com.alibaba:arouter-api:x.x.x'

annotationProcessor 'com.alibaba:arouter-compiler:x.x.x'

...

}

底部弹出窗体

compile 'com.flipboard:bottomsheet-commons:1.5.1'

compile 'com.flipboard:bottomsheet-core:1.5.1'

FadingActionBar

标题栏透明渐变效果的实现

Android库实现了动作条的衰落效果,类似于Play Music应用程序中的效果

https://github.com/ManuelPeinado/FadingActionBar

compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android 左侧选项卡可以使用 TabLayout 实现,具体步骤如下: 1. 在布局文件中,将 TabLayout 和 ViewPager 包含在一个父容器中,例如 LinearLayout。 2. 设置 LinearLayout 的方向为水平方向。 3. 设置 TabLayout 的 layout_gravity 属性为 left 或 right,表示 TabLayout 在父容器的左侧或右侧。 4. 设置 TabLayout 的 app:tabMode 属性为 scrollable,表示可以滚动。 5. 设置 TabLayout 的 app:tabGravity 属性为 fill,表示 Tab 均分 LinearLayout。 6. 在代码中创建 Fragment,通过 FragmentPagerAdapter 或 FragmentStatePagerAdapter 将 Fragment 添加到 ViewPager 中。 7. 将 ViewPager 与 TabLayout 关联起来,通过 setupWithViewPager() 方法实现。 示例代码如下: ``` <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="left" app:tabMode="scrollable" app:tabGravity="fill" /> <android.support.v4.view.ViewPager android:id="@+id/view_pager" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" /> </LinearLayout> ``` 在 Activity 中,可以通过以下代码创建 FragmentPagerAdapter 或 FragmentStatePagerAdapter: ``` public class MyPagerAdapter extends FragmentPagerAdapter { private List<Fragment> fragments; public MyPagerAdapter(FragmentManager fm, List<Fragment> fragments) { super(fm); this.fragments = fragments; } @Override public Fragment getItem(int position) { return fragments.get(position); } @Override public int getCount() { return fragments.size(); } @Override public CharSequence getPageTitle(int position) { // 设置 Tab 的标题 return "Tab " + (position + 1); } } ``` 在 Activity 中,可以通过以下代码将 ViewPager 与 TabLayout 关联起来: ``` ViewPager viewPager = findViewById(R.id.view_pager); TabLayout tabLayout = findViewById(R.id.tab_layout); List<Fragment> fragments = new ArrayList<>(); fragments.add(new MyFragment()); fragments.add(new MyFragment()); fragments.add(new MyFragment()); MyPagerAdapter pagerAdapter = new MyPagerAdapter(getSupportFragmentManager(), fragments); viewPager.setAdapter(pagerAdapter); tabLayout.setupWithViewPager(viewPager); ``` 其中,MyFragment 是自定义的 Fragment。 注意:这里的示例代码使用的是 Support Library,如果使用的是 AndroidX,需要将包名从 android.support 改为 androidx。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值