When we move from one page to another, we need to pass some of the set values of the page to the next page. When there are a lot of values to pass, we can pass an object.
Page 1:
Intent Intent = new Intent (pageoneactivity.this, Pagetwoactivity.class); Softwareproleminfo info = softwareproleminfos.get (position); Bundle bundle = new bundle (); Bundle.putserializable ("SoftPro", info); Intent.putextras (bundle); StartActivity (Intent) ;
Page 2:
Softwareproleminfo Softwareproleminfo; @Override protected void onCreate (Bundle savedinstancestate) { super.oncreate (savedinstancestate); Setcontentview (r.layout.activity_pagetwo); Intent Intent = This.getintent (); Softwareproleminfo = (softwareproleminfo) Intent.getserializableextra ("SoftPro"); ....}
Where: Softwareproleminfo is a serializable class.
How Android makes page-passing objects