Skip to content

Instantly share code, notes, and snippets.

View FrancesTeng's full-sized avatar

Frances FrancesTeng

  • Hangzhou
View GitHub Profile
<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>
} catch (Exception e) {
// TODO Auto-generated catch block
Toast.makeText(LoadImgActivity.this, R.string.ToastImg, 1).show();
e.printStackTrace();
}
@@ -0,0 +1,18 @@
+ if (android.os.Build.VERSION.SDK_INT > 9) {
+ StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
+ StrictMode.setThreadPolicy(policy);
+ }
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");
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);