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
/** | |
* 获取当前进程名 | |
* @param context | |
* @return | |
*/ | |
public static String getCurrProcessName(Context context) { | |
try { | |
final int currProcessId = android.os.Process.myPid(); | |
final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); | |
List<ActivityManager.RunningAppProcessInfo> processInfos = am.getRunningAppProcesses(); |
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
final Properties properties = new Properties() | |
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | |
bintray { | |
user = properties.getProperty("bintray.user") | |
key = properties.getProperty("bintray.apikey") | |
configurations = ["archives"] | |
pkg { | |
repo = "maven" |
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
<activity | |
android:name=".MainActivity" | |
android:label="@string/app_name" | |
android:theme="@style/Launcher"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN"/> | |
<category android:name="android.intent.category.LAUNCHER"/> | |
</intent-filter> | |
</activity> |
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
public static int resolveSizeAndState(int desireSize, int measureSpec) { | |
int result = desireSize; | |
int specMode = MeasureSpec.getMode(measureSpec); | |
int specSize = MeasureSpec.getSize(measureSpec); | |
switch (specMode) { | |
case MeasureSpec.UNSPECIFIED: | |
result = desireSize; | |
break; | |
case MeasureSpec.AT_MOST: | |
if (specSize < desireSize) { |
NewerOlder