I have started an internship and picked up a few books that I have been following to try and put a simple application together for the business. Unfortunately, I am relatively new to java and completely new to application development so I am looking for any kind of help.
The basic idea of the application is to be able to show users closed banks (rss feed), a overview of recent failures (rss feed) and send them to a form on a website.
So I layed out a splash screen, then the menu would have 3 buttons, 2 to rss feeds and one to the form on the website.
Everything was going well until I couldn't figure out how to get from the splash screen to the menu.
I don't know what you need to look at so here is the manifest, splash xml and splash java.
Splash Xml.
Splash Java
Manifest
Anything would be helpful as it is clear I am completely new and lost. I have done tutorials in the book and am frankly desperate. Also signed up for the app generator stuff that just came out but havent heard anything and don't know if there's any real app generator that wouldn't run me 800$ to build something this simple.
Thanks
Siggi
The basic idea of the application is to be able to show users closed banks (rss feed), a overview of recent failures (rss feed) and send them to a form on a website.
So I layed out a splash screen, then the menu would have 3 buttons, 2 to rss feeds and one to the form on the website.
Everything was going well until I couldn't figure out how to get from the splash screen to the menu.
I don't know what you need to look at so here is the manifest, splash xml and splash java.
Splash Xml.
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/RelativeLayout01" xmlns:android="http://schemas.android.com/apk/res/android" android:clipChildren="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/white"><TextView android:id="@+id/TextView01" android:text="@string/txt1" android:textColor="@color/loadtxt" android:layout_width="fill_parent" android:textSize="18pt" android:textStyle="bold" android:layout_height="wrap_content" android:gravity="top|center" android:paddingTop="12px"></TextView><ImageView android:id="@+id/ImageView01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="fitCenter" android:src="@drawable/logoooo"></ImageView><ViewAnimator android:layout_height="wrap_content" android:id="@+id/ViewAnimator01" android:layout_width="wrap_content" android:layout_above="@+id/ImageView01"></ViewAnimator><TextView android:id="@+id/TextView02" android:layout_height="wrap_content" android:text="@string/txt2" android:textColor="@color/loadtxt" android:textSize="12pt" android:layout_width="fill_parent" android:gravity="center" android:layout_above="@+id/TextView03"></TextView><TextView android:id="@+id/TextView03" android:layout_height="wrap_content" android:text="@string/txt3" android:textColor="@android:color/black" android:textSize="5pt" android:gravity="bottom|center" android:layout_alignParentBottom="true" android:layout_width="fill_parent"></TextView>
</RelativeLayout>
Code:
package android.bankclosures;
import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.content.Intent;
public class SplashActivity extends Activity {
protected boolean _active = true;
protected int _splashTime = 5000;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
// thread for displaying the Splash Screen
Thread splashThread = new Thread() {
@Override
public void run(){
try {
int waited = 0;
while(_active && (waited <_splashTime)) {
sleep(100);
if(_active) {
waited +=100;
}
}
} catch(InterruptedException e) {
// do nothing
} finally {
finish();
startActivity(new Intent("android.bankclosures.Menu"));
stop();
}
}
};
splashThread.start();
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
_active = false;
}
return true;
}
}
Manifest
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.bankclosures"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name" android:debuggable="true" android:enabled="true" android:icon="@drawable/logoooo">
<activity android:name=".SplashActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity><activity android:name="MenuActivity" android:label="Menu"></activity>
</application>
<uses-sdk android:minSdkVersion="8" />
</manifest>
Anything would be helpful as it is clear I am completely new and lost. I have done tutorials in the book and am frankly desperate. Also signed up for the app generator stuff that just came out but havent heard anything and don't know if there's any real app generator that wouldn't run me 800$ to build something this simple.
Thanks
Siggi