samedi 29 août 2015

call information from database SQLite and show TextView

I'm trying call information from database to show on textview, like profile, calling name,email,...

this is my code:

public class ProfileActivity extends AppCompatActivity {
ImageButton ibt;
Button bt2;
private AlphaAnimation buttonClick = new AlphaAnimation(0.0F, 0.8F);
SQLiteDatabase db;
DatabaseHelper helper = new DatabaseHelper(this);
TextView tvname,tvemail;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_profile);

    ibt = (ImageButton) findViewById(R.id.imageButton3);
    bt2 = (Button) findViewById(R.id.imageButton15);


    tvname=(TextView)findViewById(R.id.TVname);
    tvemail=(TextView)findViewById(R.id.TVemail);


 // NOW HOW I GET INFORMATION FROM DB AND SHOW AT TVname and TVemail ???
}

Aucun commentaire:

Enregistrer un commentaire