View Widget.txt
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
<a href="http://www.oneapm.com/index.html?from=Widget" rel="nofollow"><img src="https://dn-oneapm.qbox.me/badge2x.png" alt="OneAPM Performance Monitoring" style="width:115px;" /></a> |
View gist:6edf3d7d1021d1c939d8
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
} catch (Exception e) { | |
// TODO Auto-generated catch block | |
Toast.makeText(LoadImgActivity.this, R.string.ToastImg, 1).show(); | |
e.printStackTrace(); | |
} |
View json
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
@@ -0,0 +1,18 @@ | |
+ if (android.os.Build.VERSION.SDK_INT > 9) { | |
+ StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); | |
+ StrictMode.setThreadPolicy(policy); | |
+ } |
View gist:2b5cae74dc25f7775351
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
if (android.os.Build.VERSION.SDK_INT > 9) { | |
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); | |
StrictMode.setThreadPolicy(policy); | |
} | |
setContentView(R.layout.show_content_layout); | |
TextView tvTitle = (TextView) findViewById(R.id.title); | |
TextView tvContent = (TextView) findViewById(R.id.content); | |
tvTitle.setText(R.string.title_Loadjson); | |
try { | |
String ret = NetWorkOperaction.requestByHttpGet("http://tongdianer.com/out.json"); |
View gist:fb6d8927d2346a580425
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
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
if (android.os.Build.VERSION.SDK_INT > 9) { | |
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); | |
StrictMode.setThreadPolicy(policy); | |
} | |
setContentView(R.layout.show_content_layout); | |
TextView tvTitle = (TextView) findViewById(R.id.title); | |
TextView tvContent = (TextView) findViewById(R.id.content); | |
tvTitle.setText(R.string.title_Loadjson); |