Android instructions when open the application at first time? [closed]
Asked Answered
T

3

11

Do you know this enter image description here

Well I want create something like this screen. When I open for the first time the application I want open this screen and display a context.. How is possible? I don't know what search for this type of thing..

Tapia answered 12/11, 2013 at 10:52 Comment(3)
Check this github.com/Espiandev/ShowcaseViewBusinesswoman
Thanks now i try. Hope is easy to use.Tapia
I also want same tutorial screen. Can i know which libs are you using to achieve this this?Haihaida
P
12
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ...
    if (isFirstTime()) {
        // What you do when the Application is Opened First time Goes here
    }
    ...
}


/***
 * Checks that application runs first time and write flag at SharedPreferences 
 * @return true if 1st time
 */
private boolean isFirstTime()
{
    SharedPreferences preferences = getPreferences(MODE_PRIVATE);
    boolean ranBefore = preferences.getBoolean("RanBefore", false);
    if (!ranBefore) {
        // first time
        SharedPreferences.Editor editor = preferences.edit();
        editor.putBoolean("RanBefore", true);
        editor.commit();
    }
    return !ranBefore;
}
Paraphrastic answered 12/11, 2013 at 10:57 Comment(7)
so maybe i could use this library github.com/Espiandev/ShowcaseView and write what i need inside isFirstTime?Tapia
Write the above code as it is in your application You dont have to use any libraryParaphrastic
mmh.. well..it's not what i'm looking for.. but it could be another way..Tapia
Yes this could be one way, I have done with this method, You can also go with this.Paraphrastic
It's not what i was looking for but it goes well.. so i accepted your answereTapia
What was accepted here? I don't understand...Emissivity
Be careful when reading the RanBefore value from one activity and writing it from another. getPreferences is private to each activity.Aran
K
2

I've found a nice library for showing a tutorial to the user about specific items on the screen, called "ShowCase view library" .

but the library quite buggy and sometimes puts its textural items outside the screen (for example when the device is rotated) .

the alternative similar library i've found is "SuperToolTips" .

Kwok answered 12/11, 2013 at 11:9 Comment(0)
U
0

I'm using MaterialShowcaseView https://github.com/deano2390/MaterialShowcaseView . Very easy to use, works well, it's customisable, has support for sequence of instructions. Solved many issued that ShowCase view library has.

Uncommitted answered 29/6, 2017 at 18:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.