All Projects → JackWHLiu → Jackknife

JackWHLiu / Jackknife

Licence: apache-2.0
⚔️ 金轮法王,哦不,是轮子大师带你玩转Android,是时候尝试下MVVM了。这是一个Android应用开发全家桶库,支持Kotlin+MVVM+Dagger2+Retrofit架构。

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Jackknife

Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-85.58%)
Mutual labels:  customview, android-ui
Statelayout
StateLayout is a simple-use Android layout library which handles Loading, Content and Error states
Stars: ✭ 88 (-59.07%)
Mutual labels:  customview, android-ui
Testleavesloading
Android 自定义 View 之 LeavesLoading
Stars: ✭ 55 (-74.42%)
Mutual labels:  customview, android-ui
Minimp3
Minimalistic MP3 decoder single header library
Stars: ✭ 898 (+317.67%)
Mutual labels:  audio, codec
Rangeview
Android range view for cropping (video, audio, etc.)
Stars: ✭ 157 (-26.98%)
Mutual labels:  audio, customview
Android Customtoast
Easy to use Custom Toast Library for Android
Stars: ✭ 24 (-88.84%)
Mutual labels:  customview, android-ui
Aurio
Audio Fingerprinting & Retrieval for .NET
Stars: ✭ 84 (-60.93%)
Mutual labels:  audio, live
Audio Visualizer Android
🎵 [Android Library] A light-weight and easy-to-use Audio Visualizer for Android.
Stars: ✭ 581 (+170.23%)
Mutual labels:  audio, android-ui
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (-30.7%)
Mutual labels:  audio, codec
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+5566.98%)
Mutual labels:  audio, codec
Pjproject
PJSIP project
Stars: ✭ 786 (+265.58%)
Mutual labels:  voip, android-ndk
Mwengine
Audio engine and DSP for Android, written in C++ providing low latency performance in a musical context, supporting both OpenSL and AAudio.
Stars: ✭ 190 (-11.63%)
Mutual labels:  audio, android-ndk
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+247.91%)
Mutual labels:  customview, android-ui
Webrtc
Pure Go implementation of the WebRTC API
Stars: ✭ 8,399 (+3806.51%)
Mutual labels:  audio, voip
Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+240.93%)
Mutual labels:  audio, codec
Opus
Modern audio compression for the internet.
Stars: ✭ 1,171 (+444.65%)
Mutual labels:  audio, codec
Mumble
Mumble is an open-source, low-latency, high quality voice chat software.
Stars: ✭ 4,418 (+1954.88%)
Mutual labels:  audio, voip
Vgmstream
vgmstream - A library for playback of various streamed audio formats used in video games.
Stars: ✭ 524 (+143.72%)
Mutual labels:  audio, codec
Textwriter
Animate your texts like never before
Stars: ✭ 140 (-34.88%)
Mutual labels:  customview, android-ui
Starrtc Server
免费IM系统,IM即时通信消息系统(含一对一文字聊天,群聊,聊天室),免费一对一voip实时通话,录屏,webrtc服务端,免费直播连麦,互动直播,视频直播,RTSP拉流,RTMP推流,语音对讲,免费在线会议,视频会议等服务端程序,支持物联网平台,✨万水千山总是情,来个star行不行✨
Stars: ✭ 2,295 (+967.44%)
Mutual labels:  voip, live

JackKnife SDK官方文档 Release Codacy Badge

License Author QQ Group

jackknife-mvvm(Android开发架构)

API

jackknife-widget(Android开发UI)

API

jackknife-av(Android开发NDK)

API

一、环境配置

//添加以下代码到项目的build.gradle
allprojects {
	repositories {
		maven { url "https://jitpack.io" }
	}
}
//添加以下代码到app模块的build.gradle
dependencies {
	implementation 'com.github.JackWHLiu.jackknife:jackknife-mvvm:latest'//jackknife MVVM库
	implementation 'com.github.JackWHLiu.jackknife:jackknife-widget:latest' //jackknife自定义控件库
	implementation 'com.github.JackWHLiu.jackknife:jackknife-av:latest'// jackknife音视频库
}

latest替换成 Release中绿色区域内的版本号,如果为红色,表示最新版本构建失败,这种情况请查看release,找到可用版本使用。

二、如何使用

MVVM架构(jackknife-mvvm)
1、包含功能模块
  • 运行时权限申请
  • 切换皮肤
  • 生命周期配置
  • 屏幕适配
  • 工具类库
    • AC:提供数组和ArrayList的转换
    • ApkUtils:与安装包相关的一些操作,可以读取当前app版本名、版本号等
    • AppProcessUtils:进程级别的操作
    • CacheUtils:清缓存工具
    • DensityUtils:像素单位转换
    • FragmentUtils:Fragment相关操作
    • GlobalContext:获取全局的ApplicationContext
    • ImageUtils:图形处理
    • IntentUtils:Intent的Extra读取
    • IoUtils:文件(夹)处理
    • LanguageUtils:语言切换
    • ManifestUtils:AndroidManifest.xml信息读取
    • Math:数学相关
    • NetworkUtils:检测网络
    • Number:定义了整数和分数
    • PinyinUtils:汉字或汉语句子转拼音
    • ReflectionUtils:反射相关
    • RegexUtils:使用正则表达式校验字符串
    • RomUtils:手机机型适配
    • SPUtils:SharedPreferences存取
    • ScreenUtils:读取屏幕宽高
    • SecurityUtils:对称加密(DES)、非对称加密(RSA)
    • ServiceUtils:系统服务获取
    • TextUtils:文字操作
    • TimeUtils:时间格式化
    • ToastUtils:自动线程切换Toast
    • ThreadUtils:线程相关
    • DialogUtils:对话框
    • StatusBarUtils:系统状态栏工具
    • NavigationBarUtils:系统导航栏工具
  • 崩溃信息收集(仅支持Java项目)
2、MVVM使用示例

Kotlin项目:https://github.com/JackWHLiu/jackknife_kotlin_samples (持续随版本更新的前沿案例)

Java项目:https://github.com/JackWHLiu/jackknife_java_samples (只提供基本使用,适合新手)

数据库ORM模块(jackknife-orm)
1、初始化配置

Orm.init(OrmConfig)完成初始化配置;//调用Orm的init方法

2、完成实体类的编写

如果你想使用jackknife-orm自动创表,你只需要实现OrmTable接口再配置一些基本信息即可。 需要注意的是,在一个OrmTable的实现类中,必须有一个配置主键的属性,如果为id,一般命名为_id。

(1)@Table

配置你要映射的表名

(2)@Column

配置你要映射的列名,静态属性会被自动忽略,无需配置Ignore注解,例如Parcelable的CREATOR必须为static的,所以不需要配置Ignore

(3)@Ignore

配置你要跳过映射的列名

(4)@PrimaryKey

配置主键

(5)@Check

配置检查条件

(6)@Default

配置默认值

(7)@Unique

配置唯一约束

(8)@NotNull

配置非空约束

3、创表

以User为例,TableManager.createTable(User.class);//创建OrmTable的实现类的表,创表一般在初始化配置时完成,因为这样可以在表结构改变时,自动更新。 如果在第一步中使用了OrmConfig的创表配置config.tables(),则不需要此步骤。

4、事务提交

如果要保证事务提交,请使用Transaction#execute(Worker worker),然后使用OrmDao中带safety后缀的API

5、表升级

支持数据库表字段重命名,更新OrmTable结构后,务必在初始化配置的时候提升db版本,原数据不会丢失,但是使用内置查询API会查询不到,把字段名命名回来则又可以查询到。(谨慎使用)

6、常用API

首先要获取到操作该表的DAO对象,以User为例 OrmDao<User> dao = DaoFactory.getDao(User.class);

名称 所在类 描述
insert(T bean) OrmDao 单条插入,插入一条数据
insert(List<T> bean) OrmDao 多条插入,插入一些数据
deleteAll() OrmDao 删除所有数据
delete(WhereBuilder builder) OrmDao 按条件删除数据
delete(T bean) OrmDao 删除特定数据
update(WhereBuilder builder) OrmDao 按条件修改数据
update(T bean) OrmDao 更新特定数据
selectOne() OrmDao 查询第一条数据
selectOne(QueryBuilder builder) OrmDao 查询最符合条件的一条数据
select(QueryBuilder builder) OrmDao 按条件查询数据
selectAll() OrmDao 查询所有数据
selectCount() OrmDao 查询数据的条数
selectCount(QueryBuilder builder) OrmDao 查询符合条件数据的条数
createTable(Class<? extends OrmTable> tableClass) TableManager 创建一张表
dropTable(Class<? extends OrmTable> tableClass) TableManager 删除一张表
upgradeTable(Class<? extends OrmTable> tableClass) TableManager 升级一张表
音视频开发(jackknife-av)(暂时不要用,优化中)
  • codec:编解码
  • ffmpeg:FFmpeg命令行
  • live:直播推流
  • player:直播拉流、视频播放
  • util:音视频工具
  • wallpaper:墙纸
自定义View(jackknife-widget)( https://github.com/JackWHLiu/AndroidCustomView

  • animator:动画引擎
  • bottom:底部导航栏
  • calendar:日历日期选择
  • floatingview:悬浮磁铁控件
  • lrc:歌词滚动控件
  • luckyview:幸运转盘
  • popupdialog:底部弹出的菜单栏
  • pull:ListView下拉刷新、上拉加载
  • reader:电子书阅读
  • recyclerview:RecyclerView下拉刷新、上拉加载
  • refresh:布局容器刷新
  • wheelview:级联滑轮选择

  • 拖动广告动画:AnimatorDragger、AnimatorHorizontalScrollView、AnimatorLinearLayout、AnimatorRecycler、AnimatorScrollView、AnimatorViewWrapper
  • 自动跳跃焦点EditText组:AutoEditText、AutoEditTextGroup、AutoScrollTextView、MacEditText、MacEditTextGroup、VerifyCodeEditText、VerifyCodeEditTextGroup
  • 带删除按钮文本框:ClearEditText
  • 变速环形进度条:CircularProgressBar
  • 颜色选取:ColorPickerView
  • 音频均衡器:EqualizerView
  • 流式布局:FlowLayout、FlowRadioGroup
  • 炫光文字:GradientTextView
  • 标签页:HorizontalTabBar
  • 字母导航:LetterView
  • 正在加载...进度条:LoadingView
  • 仿安卓微信底部导航条滑动颜色渐变:ShadeView
  • 拖拽开关(带过程):ToggleButton
  • 语音消息录制:VoiceRecordView

如果你觉得有用的话,不妨starfork一下!

回到页首并支持 https://github.com/JackWHLiu/jackknife

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].