-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
794 additions
and
5 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
FizzerBaseLib/src/main/java/com/fizzer/base/lib/android/act/BaseActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.fizzer.base.lib.android.act | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
|
||
/** | ||
* @Author: Fizzer | ||
* @Email: fizzer503@sina.com | ||
* @Date: 2023/12/23 | ||
* @Descriptor: 基类Activity | ||
*/ | ||
open class BaseActivity : AppCompatActivity() { | ||
} |
24 changes: 24 additions & 0 deletions
24
FizzerBaseLib/src/main/java/com/fizzer/base/lib/android/application/App.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.fizzer.base.lib.android.application | ||
|
||
import android.app.Application | ||
|
||
/** | ||
* @Author: Fizzer | ||
* @Email: fizzer503@sina.com | ||
* @Date: 2023/12/23 | ||
* @Descriptor: 基类的Application | ||
*/ | ||
open class App : Application() { | ||
|
||
companion object { | ||
private lateinit var mApplication: App | ||
fun getApplication(): App { | ||
return mApplication | ||
} | ||
} | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
mApplication = this | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...zzer/base/lib/android/BaseBottomDialog.kt → ...se/lib/android/dialog/BaseBottomDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...com/fizzer/base/lib/android/BaseDialog.kt → ...zer/base/lib/android/dialog/BaseDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
FizzerBaseLib/src/main/java/com/fizzer/base/lib/android/fragment/BaseFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.fizzer.base.lib.android.fragment | ||
|
||
import androidx.fragment.app.Fragment | ||
|
||
/** | ||
* @Author: Fizzer | ||
* @Email: fizzer503@sina.com | ||
* @Date: 2023/12/23 | ||
* @Descriptor: 基类Fragment | ||
*/ | ||
open class BaseFragment : Fragment() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
FizzerBaseLib/src/main/java/com/fizzer/base/lib/utils/DeviceInfoUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,74 @@ | ||
package com.fizzer.base.lib.utils | ||
|
||
import android.content.Context | ||
import android.nfc.NfcManager | ||
import android.os.Build | ||
|
||
/** | ||
* @Author:Fizzer | ||
* @Email: fizzer503@gmail.com | ||
* @Date: 2022/9/7 | ||
* @Descriptor: 获取当前设备信息的工具类 | ||
*/ | ||
object DeviceInfoUtils { | ||
|
||
/** | ||
* 获取厂商名字 | ||
*/ | ||
fun getDeviceManufacturer(): String { | ||
return Build.MANUFACTURER | ||
} | ||
|
||
/** | ||
* 获取产品名 | ||
*/ | ||
fun getDeviceProduct(): String { | ||
return Build.PRODUCT | ||
} | ||
|
||
/** | ||
* 获取设备品牌 | ||
*/ | ||
fun getDevicesBrandName(): String { | ||
return Build.BRAND | ||
} | ||
|
||
/** | ||
* 获取设备型号 | ||
*/ | ||
fun getDeviceModel(): String { | ||
return Build.MODEL | ||
} | ||
|
||
/** | ||
* 获取设备的主板名 | ||
*/ | ||
fun getDeviceBoard(): String { | ||
return Build.BOARD | ||
} | ||
|
||
/** | ||
* 获取设备名称 | ||
*/ | ||
fun getDeviceName(): String { | ||
return Build.DEVICE | ||
} | ||
|
||
/** | ||
* 获取设备指纹信息 | ||
*/ | ||
fun getDeviceFingerprint(): String { | ||
return Build.FINGERPRINT | ||
} | ||
|
||
/** | ||
* 设备是否支持NFC功能 | ||
* true - 支持 | ||
* false - 不支持 | ||
*/ | ||
fun hasNfcSupport(context: Context?): Boolean { | ||
val nfcManager = context?.getSystemService(Context.NFC_SERVICE) as NfcManager | ||
val nfcAdapter = nfcManager.defaultAdapter | ||
return nfcAdapter != null | ||
} | ||
} |
Oops, something went wrong.