diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ebdd963..04b54e2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,22 +1,26 @@ - - + package="org.hicapacity.techhui" android:versionCode="2" + android:versionName="0.3"> + + - - - - - - - - - - + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/res/drawable-hdpi/splash.png b/res/drawable-hdpi/splash.png new file mode 100644 index 0000000..427448d Binary files /dev/null and b/res/drawable-hdpi/splash.png differ diff --git a/res/drawable-ldpi/splash.png b/res/drawable-ldpi/splash.png new file mode 100644 index 0000000..427448d Binary files /dev/null and b/res/drawable-ldpi/splash.png differ diff --git a/res/drawable-mdpi/splash.png b/res/drawable-mdpi/splash.png new file mode 100644 index 0000000..427448d Binary files /dev/null and b/res/drawable-mdpi/splash.png differ diff --git a/res/layout/splash.xml b/res/layout/splash.xml new file mode 100644 index 0000000..25e2027 --- /dev/null +++ b/res/layout/splash.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/src/org/hicapacity/techhui/NewSplashScreen.java b/src/org/hicapacity/techhui/NewSplashScreen.java new file mode 100644 index 0000000..a45cba1 --- /dev/null +++ b/src/org/hicapacity/techhui/NewSplashScreen.java @@ -0,0 +1,70 @@ +package org.hicapacity.techhui; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.MotionEvent; +import android.widget.ImageView; +import android.widget.ImageView.ScaleType; + +public class NewSplashScreen extends Activity { + + /** + * The thread to process splash screen events + */ + private Thread mSplashThread; + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Splash screen view + setContentView(R.layout.splash); + + ImageView timeView = (ImageView) this.findViewById(R.id.SplashImageView); + timeView.setScaleType(ScaleType.FIT_XY); + + final NewSplashScreen sPlashScreen = this; + +// imgview.setScaleType(ScaleType.FIT_XY); + + // The thread to wait for splash screen events + mSplashThread = new Thread() { + @Override + public void run() { + try { + synchronized (this) { + // Wait given period of time or exit on touch + wait(1000); + } + } + catch (InterruptedException ex) { + } + + finish(); + + // Run next activity + Intent intent = new Intent(); + intent.setClass(sPlashScreen, TechHuiActivity.class); + startActivity(intent); + stop(); + } + }; + + mSplashThread.start(); + } + + /** + * Processes splash screen touch events + */ + @Override + public boolean onTouchEvent(MotionEvent evt) { + if (evt.getAction() == MotionEvent.ACTION_DOWN) { + synchronized (mSplashThread) { + mSplashThread.notifyAll(); + } + } + return true; + } +} \ No newline at end of file