android - How to save result? -
I am a rookie in Android programming
I have a little problem when I have a visual image , I make that image invisible and set one button in visible. My problem is how can you save it?
For example, I click on ImageView, the button shows and ImageView disappears. And I get out of the app and come back in the same activity and I want the button to be there.
How do I do this?
import android.app.activity; Import android.content.Intent; Importroid.os.Bundle; Import android.view.View; Import android.view.Window; Import android.view Windows Manager; Import android.widget.Button; Import android.widget.ImageView; Public class Udhanplan activity (button A, B ImageView; private boolean qualified; public Crete to zero (the bundle saved Instansstet) saved {Suprknkret (Instensstet); requestWindowFeature (Window.FEATURE_NO_TITLE); GetWindow (). Setflag ( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView (R.layout.flightplan); B = (ImageView) findViewById (R.id.plus); see v1 = findViewById (R.id.test); v1. setVisibility (View.GONE); B.setOnClickListener (see new. OnClickListener () {@Override on public void (see V) {// TODO auto-generated Following method See stub v2 = findViewById (R.id.test); v2.setVisibility (see. Visual); see v3 = findViewById (R.id.plus); v3.setVisibility (see. GONE);}});} } Thank you!
Save state to a shared priority , And then in onCreate , the answer to the preference is very clear about using shared priorities, but instead of a long, you can.
Comments
Post a Comment