Splash Screen

Put your problem here if it does not fit any of the other categories.

Splash Screen

Postby zahidalinaqvi » Tue Aug 12, 2008 2:13 pm

Hi all,
I am creating a application into that i want to show a splash screen with progress bar and after that i want to show login form.
how it is possbile.

its working fine but my problem is only that i want to show two images and a progress bar on splash screen..
Please have a look on attachment image.

My approch is

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. private static final int STOPSPLASH = 0;
  2.  
  3.     private static final long SPLASHTIME = 3000;
  4.  
  5.    
  6.  
  7.        
  8.  
  9.         private Handler splashHandler = new Handler() {
  10.  
  11.         @Override
  12.  
  13.         public void handleMessage(Message msg) {
  14.  
  15.              switch (msg.what) {
  16.  
  17.              case STOPSPLASH:
  18.  
  19.                   //remove SplashScreen from view
  20.  
  21.                   splash.setVisibility(View.GONE);
  22.  
  23.                   break;
  24.  
  25.              }
  26.  
  27.              super.handleMessage(msg);
  28.  
  29.         }
  30.  
  31.    };
  32.  
  33.        
  34.  
  35.         public void onCreate(Bundle icicle) {
  36.  
  37.                 super.onCreate(icicle);
  38.  
  39.                 setContentView(R.layout.main);
  40.  
  41.  
  42.  
  43.                 splash = (ImageView) findViewById(R.id.splashscreen);
  44.  
  45.         Message msg = new Message();
  46.  
  47.         msg.what = STOPSPLASH;
  48.  
  49.         splashHandler.sendMessageDelayed(msg, SPLASHTIME);
Parsed in 0.035 seconds, using GeSHi 1.0.8.4




Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.  
  3.                 android:layout_height="fill_parent"
  4.  
  5.                 android:layout_width="fill_parent"
  6.  
  7.                 android:background="#ffffff"
  8.  
  9.                 android:orientation="vertical">
  10.  
  11.  
  12.  
  13.      <ImageView android:id="@+id/splashscreen"
  14.  
  15.         android:layout_width="wrap_content"
  16.  
  17.        android:layout_height="fill_parent"
  18.  
  19.        android:src="@drawable/logo"
  20.  
  21.        android:layout_gravity="center"/>
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  <TextView android:id="@+id/username"
  28.  
  29.              android:layout_width="wrap_content"
  30.  
  31.              android:layout_height="wrap_content"
  32.  
  33.              android:text="Email / Phone Number"
  34.  
  35.              android:textColor="#666"
  36.  
  37.              android:textStyle="bold"
  38.  
  39.              android:padding="10sp"
  40.  
  41.              android:textSize="16sp"/>
  42.  
  43.  
  44.  
  45.  
  46.  
  47. <EditText android:id="@+id/entry"
  48.  
  49.              android:layout_width="fill_parent"
  50.  
  51.              android:layout_height="wrap_content"
  52.  
  53.              android:lines="1"
  54.  
  55.              android:background="@android:drawable/editbox_background"
  56.  
  57.              android:text=""
  58.  
  59.              android:padding="5sp"
  60.  
  61.              android:singleLine="true"
  62.  
  63.              android:textSize="16sp"/>
  64.  
  65.  
Parsed in 0.005 seconds, using GeSHi 1.0.8.4



I want add some text on splash screen with two images and a progress bar which completes in 3 seconds.

currently i m getting a a only with a image.
....

Attachments
splashScreen.JPG
splashScreen.JPG (8.86 KiB) Viewed 1389 times
User avatar
zahidalinaqvi
Developer
Developer
 
Posts: 35
Joined: Mon Aug 11, 2008 8:54 am
Location: Jaipur India

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 23 guests