0

I m making book finder app for the website, i want the logo to be on screen when the user first time launches the app

Here is my code for Main Activity onCreate():

protected void onCreate(Bundle savedInstanceState) {        
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    recyclerView = (RecyclerView)findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));

    ImageView logo = (ImageView) findViewById(R.id.logo_view) ;

}

But it does not work

I want it to look like this:

logo

ERJAN
  • 23,696
  • 23
  • 72
  • 146

2 Answers2

4

You should create a Splash Screen,

1 : Create one new Activity with your home screen design (as you mentioned above)

2: Set this new Activity (Splash Screen) as your home Activity

3: Finally, in your new Activity or Splash Activity close or finish your Splash Activity (after 4-5 seconds using Timer) and start or open next Activity which you want..

Thats it..

Same you can get here How do I make a splash screen?

Community
  • 1
  • 1
1

1.Create seperate .java file for splashscreen Activity.

2.Create splashScreen .xml file seperately.

3.Open your your AndroidManifest.xml file and make your splash screen activity as Launcher activity.

 <activity
        android:name="packagepath.SplashScreen"



        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Try those steps .And if you want more help when doing this inform me. IF you got this inform me also

MeshBoy
  • 662
  • 5
  • 9