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 class Singleton { | |
private static Object obj = new Object(); | |
private static Singleton instance = null; | |
private Singleton(){ | |
} | |
public static Singleton getInstance() { | |
// if already inited, no need to get lock everytime |
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
getListView().setDivider(getResources().getDrawable(R.color.list_background)); //must be called first | |
getListView().setDividerHeight(FuncInt.dp(10)); |
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
<resources> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<item name="android:scrollbarSize">10.0dip</item><!--very important, in order to show scrollbar properly in android 2.3 and before--> | |
<item name="android:scrollbarThumbVertical">@drawable/scrollbar</item> | |
<item name="android:scrollbarThumbHorizontal">@drawable/scrollbar</item> | |
<item name="android:scrollbarTrackVertical">@null</item> | |
<item name="android:scrollbarTrackHorizontal">@null</item> | |
</style> | |
</resources> |
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
Intent[] targetedShareIntents = new Intent[infos.size()]; | |
for (int i = 0; i < infos.size(); i++) { | |
String packageName = infos.get(i).activityInfo.packageName; | |
Intent targetedShareIntent = new Intent(Intent.ACTION_VIEW, uri); | |
targetedShareIntent.setPackage(packageName); | |
targetedShareIntents[i] = targetedShareIntent; | |
} | |
Intent chooserIntent = Intent.createChooser(new Intent(), "打开网页"); | |
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, targetedShareIntents); |
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
.gradle | |
.idea | |
*.iml | |
build | |
gradle* | |
local.properties |
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
#Start from here | |
LOCAL+PATH:= $(call my-dir) | |
#Module1 definition start | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := modulename1 | |
LOCAL_SRC_FILES := modulesource1.c | |
include $(BUILD_STATIC_LIBRARY) |
NewerOlder