Skip to content

Extensions to the Android standard library and support libraries and some basic tools

Notifications You must be signed in to change notification settings

liujingg/androidx

 
 

Repository files navigation

ANDROIDX

Platform Platform API License

Extensions to the Android standard library and support libraries and some basic tools

Child module

Passed Test Device

  • Google Nexus 4;API 25/7.1.2;LineageOS/14.1-20180427-NIGHTLY-make
  • Lenovo K860;API 17/4.2.1

Getting Started

Add the following to your build.gradle file

implementation "me.panpf:androidx:$lastVersion"

Please replace $lastVersion with the latest version: Download

Dependencies:

Kotlin Expansion:

Add the following to your build.gradle file

implementation "me.panpf:androidx-kt:$lastVersion"

Please replace $lastVersion with the latest version: Download

Dependencies:

androidx-kt is a androidx extension on the Kotlin platform that allows you to use androidx more comfortably on Kotlin

Index

android

  • Android: Androidx.java (Test) | Androidx.kt (Test)
    • getMainHandler, runInUI, waitRunInUI, waitRunInUIResult, waitRunInUINullableResult, isRooted, isMainThread,
    • getInProcessName, getInProcessNameSuffix, isMainProcess, isAtLeast*, getVersionName, getVersionCodeName

app

  • Activity: Activityx.java (Test) | Activityx.kt (Test)
    • isDestroyedCompat, convertToTranslucentCompat, convertFromTranslucentCompat, getImplFromParent
    • appContext, canStart, start, startByClass, safeStart, safeStartByClass
  • Args: Argsx.java (Test) | Argsx.kt (Test)
    • read*Arg, read*ArgOr, read*UriArg, read*UriArgOr, read*IntentUriArg, read*IntentUriArgOr,
    • read*UriIntentArg, read*UriIntentArgOr
  • ArgsBinder: ArgsBinder.kt (Test)
    • bind*Arg, bind*ArgOr, bind*UriArg, bind*UriArgOr, bind*IntentUriArg, bind*IntentUriArgOr,
    • bind*UriIntentArg, bind*UriIntentArgOr
  • Dialog: Dialogx.java (Test) | Dialogx.kt (Test)
    • setClickButtonClosable, showProgressDialog
  • Fragment: Fragmentx.java (Test) | Fragmentx.kt (Test)
    • getApplication, requireApplication, isDestroyedCompat, getImplFromParent, instantiate,
    • findUserVisibleChildFragment, findFragmentByViewPagerCurrentItem
  • Permission: Permissionx.java (Test) | Permissionx.kt (Test)
    • isGrantPermissions, filterDeniedPermissions
  • Service: Servicex.java (Test) | Servicex.kt (Test)
    • isRunning, start, stop, isAccessibilityServiceEnabled

content

  • PackageInfo: PackageInfox.java (Test) | PackageInfox.kt (Test)
    • findActivityInfo, findActivityInfoByName, findServiceInfo, findServiceInfoByName
    • findReceiverInfo, findReceiverInfoByName, findProviderInfo, findProviderInfoByName
    • findPermissionInfo, findPermissionInfoByName, findRequestedPermission, findRequestedPermissionByName
    • findMetaDataWithName, findMetaDataByName, findMetaDataWithValue, findMetaDataByValue
  • Package: Packagex.java (Test) | Packagex.kt (Test)
    • requestInstall, requestUninstallisInstalled, getVersionCode, getVersionCodeOr, getVersionName, getVersionNameOr,
    • getVersionNameOrNull, get, getOrNull, isSystemApp, isSystemAppOr, listPackageVersionCodePair,
    • getPackageVersionCodeMap, listPackageName, list, getOne, count, getPackageApkFile,
    • getPackageApkFileOrNull, getAppSignatureBytes, getAppSignatureBytesOrNull,
    • getAppIconDrawable, getAppIconBitmap, getApkIconDrawable, getApkIconBitmap
  • Clipboard: Clipboardx.java (Test) | Clipboardx.kt (Test)
    • copy, copyText, copyHtmlText, copyIntent, copyUri, copyRawUri, copyMimeTypeUri, copyContents,
    • get, getLabel, getContents, getText, getHtmlText, getIntent, getUri, addPrimaryClipChangedListener,
    • removePrimaryClipChangedListener, clear
  • Context: Contextx.java (Test) | Contextx.kt (Test)
    • requireContext, requireAppContext, appContext, systemService, systemServiceOrNull, *Manager
  • Intent: Intentx.java (Test) | Intentx.kt (Test)
    • createRecordingIntent, createLaunchDialingIntent, createCallPhoneIntent, createLaunchSendSmsIntent,
    • createLaunchWebBrowserIntent, createScanFileBroadcastIntent, createInstallAppIntent, createUninstallAppIntent,
    • createLaunchAppIntent, createAppDetailInSystemIntent, createActivityIntentByResolveInfo, createTakePhotoIntent,
    • createPickImageIntent, createCropImageIntent, createSendTextIntent, createSendTextFileIntent,
    • createSendImageFileIntent, createSendFileIntent, getShareFileUri
  • LifecycleBroadcastReceiver: LifecycleBroadcastReceiver.java (Test)
  • Preference: Preferencex.java (Test) | Preferencex.kt (Test)
    • getPreferences, getDefaultPreferences, putIntTo, putInt, putIntsTo, putInts, putLongTo, putLong, putLongsTo, putLongs,
    • putBooleanTo, putBoolean, putBooleansTo, putBooleans, putFloatTo, putFloat, putFloatsTo, putFloats,
    • putStringTo, putString, putStringsTo, putStrings, putStringSetTo, putStringSet, putStringSetsTo, putStringSets,
    • getIntFrom, getInt, getLongFrom, getLong, getBooleanFrom, getBoolean, getFloatFrom, getFloat,
    • getStringFrom, getStringOrNullFrom, getString, getStringOrNull, getStringSetFrom, getStringSetOrNullFrom,
    • getStringSet, getStringSetOrNull, getAllFrom, getAll, removeFrom, remove, contains, containsAny, containsAll,
    • containsFrom, containsAnyFrom, containsAllFrom, isEmpty, isEmptyFrom, clear,
    • registerOnChangeListener, registerOnChangeListenerTo, unregisterOnChangeListener, unregisterOnChangeListenerFrom

graphics

hardware

  • Hardware: Hardwarex.java (Test) | Hardwarex.kt (Test)
    • getProduct, getBrand, getModel, getDevice, getHardware, getSupportedAbis, getPhoneNumber, getDeviceId,
    • getAndroidId, getSubscriberId, getSimSerialNumber, getSerial, getIMEI, getIMSI, getMacAddress

net

  • NetworkState: NetworkState.java (Test)
    • isActivated, isWifiActivated, isNoMeteredWifiActivated, isMobileActivated, isBluetoothActivated,
    • getType, isVPNActivated, isMetered, isRoaming, isFailover, getTypeName, getSubtypeName,
    • getExtraInfo, getNetworkInfo, getConnectivity
  • Network: Networkx.java (Test) | Networkx.kt (Test)
    • getState, isActivated, isWifiActivated, isNoMeteredWifiActivated, isMobileActivated,
    • isBluetoothActivated, getType, isVPNActivated, isMetered, isRoaming, isFailover, getTypeName,
    • getSubtypeName, getExtraInfo, getNetworkInfo, getConnectivity, getWifiState,
    • isWifiEnabled, setWifiEnabled, isMobileEnabled, setMobileEnabled, getGateway, getDNS1, getDNS2

os

  • Storage: Storagex.java (Test) | Storagex.kt (Test)
    • getFreeBytesOr, getTotalBytesOr, getAvailableBytesOr, getVolumeState, isVolumeMounted, isPrimaryVolume,
    • isVolumeEmulated, isVolumeRemovable, getVolumePaths, getMountedVolumePaths, getVolumeFiles,
    • getMountedVolumeFiles, getVolumeList, getMountedVolumeList, getVolumes, getMountedVolumes, getVolume,
    • getExternalStorageState, isExternalStorageMounted, isPrimaryExternalStorage, isExternalStorageEmulated,
    • isExternalStorageEmulated, isExternalStorageRemovable, isExternalStorageRemovable,
    • getExternalStorageDirectory, getMountedExternalStorageDirectory, getExternalStorageDirectorys,
    • getMountedExternalStorageDirectorys, getExternalStorageDirectorys, getMountedExternalStorageDirectorys,
    • getExternalStorageDirectorysWithPath, getMountedExternalStorageDirectorysWithPath,
    • getAppExternalCacheDir, getAppExternalCacheDirs, getAppInternalCacheDir, getAppCacheDirs,
    • lengthAppCacheDirs, cleanAppCacheDirs, getAppExternalFilesDir, getAppExternalFilesDirs,
    • getAppInternalFilesDir, getAppFilesDirs, lengthAppFilesDirs, cleanAppFilesDirs,
    • getAppObbDir, getAppObbDirs, lengthAppObbDirs, cleanAppObbDirs, filterByMinBytes, getFileIn
  • StatFs: StatFsx.java (Test) | StatFsx.kt (Test)
    • getCompatAvailableBytes, getCompatFreeBytes, getCompatTotalBytes
  • StorageManagerCompat: StorageManagerCompat.java (Test) | [StorageManagerCompat.kt] ([Test][StorageManagerCompatTest.kt])
    • getVolumeList, getVolumes, getVolumePaths, getVolumeState, getVolume
  • StorageVolumeCompat: StorageVolumeCompat.java (Test) | [StorageVolumeCompat.kt] ([Test][StorageVolumeCompatTest.kt])
    • getPath, getPathFile, isPrimary, isRemovable, isEmulated, getState, allowMassStorage, getMaxFileSize,
  • BundleBuilder: BundleBuilder.java (Test)
  • Rom: Romx.java (Test)
    • getType, isType, isMiuiType, isEmuiType, isFlymeType, isColorType, isFuntouchOSType, isSmartisanOSType,
    • isH2OSType, getTypeName, getVersionName, getVersionCode, getVersionIncremental
  • SystemProperties: SystemPropertiesx.java (Test)
    • get, getOr, getIntOr, getLongOr, getBooleanOr, set, addChangeCallbacks, callChangeCallbacks

provider

  • Settings: Settingsx.java (Test) | Settingsx.kt (Test)
    • isScreenBrightnessModeAutomatic, setScreenBrightnessModeAutomatic, getScreenBrightness,
    • setScreenBrightness, getScreenOffTimeout, setScreenOffTimeout, isAirplaneModeOn, setAirplaneModeOn,
    • isBluetoothOn, setBluetoothOn, getMediaVolume, setMediaVolume, getRingVolume, setRingVolume

util

view

  • InputMethod: InputMethodx.java (Test) | InputMethodx.kt (Test)
    • showSoftInput, delayShowSoftInput, hideSoftInput, moveCursorToEnd, moveCursorToStart, moveCursorTo
  • Display: Displayx.java (Test) | Displayx.kt (Test)
    • getScreenSize, getScreenWidth, getScreenHeight, getActionBarSize, getMetrics, getDensity, getDisplayRotation
    • getDensityDpi, isOrientationPortrait, isOrientationLandscape, isOrientationUndefined, getRotation
    • hasNavigationBar, getStatusBarHeight, getNavigationBarHeight, getNavigationBarWidth
  • ViewAnim: ViewAnimx.java (Test) | ViewAnimx.kt (Test)
    • animAlpha, animTranslate, shake, shock, startAnimFromRes, invisibleByAnimAlpha,
    • goneByAnimAlpha, visibleByAnimAlpha,
  • View: Viewx.java (Test) | Viewx.kt (Test)
    • setLongClickToastHint, setLayoutWidth, setLayoutHeight, setLayoutSize, setLayoutMarginTop,
    • addLayoutHeight, addLayoutWidth, addLayoutSize, addLayoutMarginTop, toBitmap, toBitmapByMaxWidth,
    • toBitmapByMaxHeight, inflateLayout, addPaddingTopByStatusBarHeight
  • Window: Windowx.java (Test) | Windowx.kt (Test)
    • getBrightness, setBrightness, isBrightnessFlowSystem

widget

Change Log

Please view the CHANGELOG.md file

License

Copyright (C) 2018 Peng fei Pan <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Extensions to the Android standard library and support libraries and some basic tools

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 53.9%
  • Kotlin 46.1%