Skip to content

Instantly share code, notes, and snippets.

Avatar

Frances FrancesTeng

  • Hangzhou
View GitHub Profile
View Widget.txt
<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
} catch (Exception e) {
// TODO Auto-generated catch block
Toast.makeText(LoadImgActivity.this, R.string.ToastImg, 1).show();
e.printStackTrace();
}
View json
@@ -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
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
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);