~dhis2-academy/dhis2-academy/android

« back to all changes in this revision

Viewing changes to dhis-mobile/dhis-androidApp/src/org/hisp/dhis/ShowContent.java

  • Committer: vandac
  • Date: 2010-11-25 16:24:41 UTC
  • Revision ID: vandac-20101125162441-9mieezjxde60edv7
text size in settings changed,preferences in settings screen(language,url) behave normally finally(only default url missing):not saved content doesnt appear after stopping and resuming screen

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import android.os.Bundle;
7
7
import android.util.Log;
8
8
import android.widget.TextView;
 
9
import android.widget.Toast;
9
10
 
10
11
 
11
12
public class ShowContent extends Activity{
13
14
        @Override
14
15
    public void onCreate(Bundle savedInstanceState) {
15
16
                super.onCreate(savedInstanceState);
16
 
                setContentView(R.layout.showcontent);                   
 
17
                setContentView(R.layout.showcontent);           
17
18
                Connection con=new Connection();
18
19
                String str = con.doStuff2();
19
20
                
32
33
                */
33
34
                TextView txt = (TextView) findViewById(R.id.text);
34
35
                txt.setText(str);
35
 
    }   
36
 
        
 
36
    } 
 
37
          
 
38
          @Override
 
39
    protected void onSaveInstanceState(Bundle outState) {
 
40
        super.onSaveInstanceState(outState); // the UI component values are saved here.
 
41
        Toast.makeText(this, "Activity Show Content state saved", Toast.LENGTH_LONG).show();
 
42
    }
 
43
          @Override
 
44
            protected void onRestoreInstanceState(Bundle outState) {
 
45
                super.onRestoreInstanceState(outState); // the UI component values are saved here.
 
46
                Toast.makeText(this, "Activity Show Content state Restored", Toast.LENGTH_LONG).show();
 
47
            }   
37
48
}