Android multi-level lists with sqlite -
structure of application is:
data stored in sqlite db. see 2 2 ways accomplish it:
1) create 3 separate activities each tab , set them fragments
question: how force parameter filtering next activity, illustration tab 1 received "category 2", got info sqlite , showed it, user swiped tab 2 ?
2) set tabs info 1 activity , display filtered info in different views within each tab
question: possible?
it possible both ways, first suggestion implementation can see: enter link description here , sec suggestion, can implement it...
your question general,
i recommand larn fragmentactivity start
edit after comment: can pass parameters fragment bundle, in illustration (let's assume our fragment called locationfragment):
public static locationsfragment newinstance(string param1, string param2) { locationsfragment fragment = new locationsfragment(); bundle args = new bundle(); args.putstring("prm1", param1); args.putstring("prm2", param2); fragment.setarguments(args); homecoming fragment; } and read parameters (locationfragment.java):
@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); if (getarguments() != null) { mparam1 = getarguments().getstring("prm1"); mparam2 = getarguments().getstring("prm2"); } } this explaind in first link, can pass category , whatever need within oncreate of fragment.
android list sqlite
No comments:
Post a Comment