Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariogrip committed Nov 4, 2014
1 parent 834f2c3 commit d4600a3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/src/main/java/com/mariogrip/octodroid/Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
Expand Down Expand Up @@ -66,7 +67,12 @@ public class Activity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
//TODO Rmove StrictMode and add AsyncTask!
super.onCreate(savedInstanceState);
StrictMode.ThreadPolicy policy = new StrictMode.
ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);

setContentView(R.layout.nawdraw);
mTitle = mDrawerTitle = getTitle();
nawTitle = getResources().getStringArray(R.array.nawbars);
Expand Down Expand Up @@ -132,8 +138,12 @@ public void startrunner(){
Runnable runnable = new Runnable() {
@Override
public void run() {
TextView textmaci = (TextView) findViewById(R.id.textView10_maci);
textmaci.setText("Offline");
Activity.this.runOnUiThread(new Runnable() {
public void run() {
TextView textmaci = (TextView) findViewById(R.id.textView10_maci);
textmaci.setText("Offline");
}
});
runner();
logD("Done startrunner()");
}
Expand Down

0 comments on commit d4600a3

Please sign in to comment.