上海人才網站廣告公司網上接單平臺
前言:
?????? 針對不同群體的需求,想著應該拓展寫方向。醫(yī)療app很受大家喜歡,就打算順手寫個消防app,里面基礎框架還是挺簡潔 規(guī)整的。登陸注冊和本地數據庫寫的便于大家理解。是廣大學子的畢設首選啊!
?
?
?
此app主要為了傳遞 消防知識,以及歌頌消防士兵的奉獻精神。在這里我們向他們致敬!此app采用本地數據庫litpal,涵蓋多種三方依賴,webView,登錄注冊,頭像修改,EventBus,Butterknife,SmartRefreshLayout,XTabLayout,懸浮球,對于初學者及畢業(yè)生是很好的項目。注釋很全。ui依然是我自己設計的。
?項目內使用的依賴,局部展示 :
plugins {id 'com.android.application' } def dbflow_version = "4.2.4"android {namespace 'com.vipbasemaster'/* 編譯版本 */compileSdk 33//默認配置defaultConfig {/* 應用Id */applicationId "com.vipbasemaster"/* 最小sdk */minSdk 23/* 目標版本 */targetSdk 33/* 版本編號 */versionCode 1/* 版本名稱 */versionName "1.0"/* 添加多 dex分包支持 */multiDexEnabled = truetestInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"}//構建類型配置buildTypes {release {/* 是否開啟代碼混淆,默認false */minifyEnabled false/* 混淆規(guī)則配置文件 */proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'}}//編譯選項compileOptions {/*編譯Java源代碼時使用的Java版本兼容性*/sourceCompatibility JavaVersion.VERSION_1_8/*用于生成類的Java版本*/targetCompatibility JavaVersion.VERSION_1_8} } //依賴 dependencies {implementation 'androidx.appcompat:appcompat:1.4.1'implementation 'com.google.android.material:material:1.5.0'implementation 'androidx.constraintlayout:constraintlayout:2.1.3'testImplementation 'junit:junit:4.13.2'androidTestImplementation 'androidx.test.ext:junit:1.1.3'androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'/**沉浸式**/implementation 'com.yanzhenjie:sofia:1.0.5'annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:$dbflow_version"// gradle 3.0.0 可以使用 implementation,否則用 compileimplementation "com.github.Raizlabs.DBFlow:dbflow-core:$dbflow_version"implementation "com.github.Raizlabs.DBFlow:dbflow:$dbflow_version"/**黃刀油**/implementation 'com.jakewharton:butterknife:10.2.1'annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'/**消息發(fā)送**/implementation 'org.greenrobot:eventbus:3.0.0'/**權限檢測**/implementation 'com.yanzhenjie:permission:2.0.0-rc12'/**萬能RecyclerView的數據適配器**/implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46'/**數據庫**/implementation 'org.litepal.android:core:2.0.0'/**二維碼**/implementation 'cn.bingoogolapple:bga-qrcode-zbar:1.3.4'/**按鈕切換**/implementation 'com.github.zcweng:switch-button:0.0.3@aar'/**選擇圖片(照片)第三方框架,(照片)框架,解決7.0打開相機報錯問題**/implementation 'com.hx.multi-image-selector:multi-image-selector:1.2.2'/**圖片縮放的第三方框架**/implementation 'me.relex:photodraweeview:1.1.0'/**圖片查看器**/implementation 'com.github.chrisbanes:PhotoView:1.3.0'/**萬能布局**/implementation 'androidx.recyclerview:recyclerview:1.2.1'/**輪播**/implementation 'com.youth.banner:banner:1.4.10'/**彈出對話框**/implementation 'com.yanzhenjie.alertdialog:alertdialog:1.0.1'/**萬能pop**/implementation 'com.github.zyyoona7:EasyPopup:1.1.2'/**京東地址選擇器**/implementation 'com.github.chihane:JDAddressSelector:1.1.4'/**下拉刷新**/implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.5.1'/**沒有使用特殊Header,可以不加這行**/implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.5.1'/**MultiDex使用**/implementation 'com.android.support:multidex:1.0.3'/**圖片緩存**/implementation 'com.github.bumptech.glide:glide:4.12.0'/**標簽切換**/implementation 'com.androidkun:XTabLayout:1.1.3'/**簡易時間選擇器**/implementation 'com.contrarywind:Android-PickerView:4.1.9'/**加載gif動畫**/implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'/**android常用工具類依賴**/implementation 'com.blankj:utilcodex:1.30.6'/**主頁tab**/implementation 'com.github.Vincent7Wong:EasyNavigation:2.0.5'/**配合主頁yoyo動畫1**/implementation 'com.nineoldandroids:library:2.4.0'/**配合主頁yoyo動畫2**/implementation 'com.daimajia.easing:library:2.0@aar'/**配合主頁yoyo動畫3**/implementation 'com.daimajia.androidanimations:library:2.2@aar'/**loading組件**/implementation 'com.wang.avi:library:2.1.3'/**標題欄**/implementation 'com.wuhenzhizao:titlebar:1.2.0'/**顯示文本組件**/implementation 'com.github.linger1216:labelview:v1.1.2'/** 我的水波紋 */implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-alpha-1'/**x5webView**///noinspection GradleDependencyimplementation 'com.tencent.tbs:tbssdk:44226'/**視頻播放**/implementation 'cn.jzvd:jiaozivideoplayer:6.4.1'
項目好不好,還得大家自己看看代碼能不能讀懂,適不適合自己。
良好的代碼風格
@Override public void initView() {fragments.add(new OneFragment());fragments.add(new TwoFragment());fragments.add(new ThreeFragment());fragments.add(new FourFragment());fragments.add(new FiveFragment());easy_navigation_bar.titleItems(tabText)//必傳 Tab未選中圖標集合.normalIconItems(normalIcon)//必傳 Tab選中圖標集合.selectIconItems(selectIcon)//必傳 fragment集合.fragmentList(fragments)//必傳.fragmentManager(getSupportFragmentManager())//分割線高度(默認是1,傳0就不展示).lineHeight(0)//Tab圖標大小.iconSize(44)//Tab文字大小,0會讓文字不顯示.tabTextSize(10)//Tab文字距Tab圖標的距離.tabTextTop(0)//Tab未選中時字體顏色.normalTextColor(Color.parseColor("#7F7F7F"))//Tab選中時字體顏色.selectTextColor(Color.parseColor("#F0605F"))//同 ImageView的ScaleType.scaleType(ImageView.ScaleType.CENTER_INSIDE)//點擊Tab Viewpager切換是否有動畫.smoothScroll(true)//Viewpager能否左右滑動.canScroll(false)//導航欄高度.navigationHeight(58)//true ViewPager 布局在導航欄之上 false 有重疊.hasPadding(true).navigationBackground(Color.parseColor("#252732")).build(); }
有需要的可以私信我, 有償。
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?