Android: How to create tutorial at app start like in Google Analytics app? -
in app want have tutorial when user installs app first time. used google analytics app , way looks perfect me.
i have seen such views in other apps well. standard view or library exist it? or have write scratch using view pager? in advance !!
i think this 3rd party library best these types of tutorials.here 1 screen shot:
you can use this viewpageindicator
also.
to make sure tutorial shown 1st time, can use shared preference. sample code is:
public class mainactivity extends activity { public static final string myprefs = "myprefs"; ... @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); sharedpreferences sp = getsharedpreferences(myprefs, context.mode_private); if (!sp.getboolean("first", false)) { sharedpreferences.editor editor = sp.edit(); editor.putboolean("first", true); editor.commit(); intent intent = new intent(this, samplecirclesdefault.class); //call viewpager class startactivity(intent); } } }
Comments
Post a Comment