Ian Wu 's Library tagged → View Popular, Search in Google
Jun
22
2011
-
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:VIDEO_ID")); startActivity(i);
Jun
21
2011
開啟 app to sd 的功能
-
android:installLocation="auto"
-
ndroid:installLocation="a
intent 去無線網路設定
-
startActivity(new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS));
偵測 android device 有沒有網路連線
-
private boolean isNetworkAvailable() {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null;
} -
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Jun
8
2011
-
- mWebView.setWebViewClient(new WebViewClient(){
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- view.loadUrl(url);
- return true;
- }
- });
要分享某個項目時,用 intent 去通知 android 開啟 分享的 dialog
-
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Some text"); shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Some other text"); startActivity(Intent.createChooser(shareIntent, "Title for chooser"));
Jun
6
2011
改變 listview 分隔線的樣式
Jun
4
2011
intent 同一個 activity 時要用 onNewIntent 去改變不同的參數
同時也要設定 android:launchMode
-
The thing here is, that your re-use an instance of your activity 'A'.
In this case, the activity's 'onCreate' is not called. Instead, its
'onNewIntent' is called.
Selected Tags
Related Tags
Top Contributors
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
