mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Show a spinner while Guice is initialising.
This commit is contained in:
@@ -25,13 +25,17 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
<activity
|
<activity
|
||||||
android:name=".android.HomeScreenActivity"
|
android:name=".android.SplashScreenActivity"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".android.HomeScreenActivity"
|
||||||
|
android:label="@string/app_name" >
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".android.contact.ContactListActivity"
|
android:name=".android.contact.ContactListActivity"
|
||||||
android:label="@string/contact_list_title" >
|
android:label="@string/contact_list_title" >
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package net.sf.briar.android;
|
||||||
|
|
||||||
|
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
||||||
|
import static android.content.Intent.FLAG_ACTIVITY_TASK_ON_HOME;
|
||||||
|
import static android.view.Gravity.CENTER;
|
||||||
|
import net.sf.briar.android.widgets.CommonLayoutParams;
|
||||||
|
import roboguice.activity.RoboSplashActivity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
public class SplashScreenActivity extends RoboSplashActivity {
|
||||||
|
|
||||||
|
public SplashScreenActivity() {
|
||||||
|
super();
|
||||||
|
minDisplayMs = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle state) {
|
||||||
|
super.onCreate(null);
|
||||||
|
LinearLayout layout = new LinearLayout(this);
|
||||||
|
layout.setLayoutParams(CommonLayoutParams.MATCH_MATCH);
|
||||||
|
layout.setGravity(CENTER);
|
||||||
|
ProgressBar spinner = new ProgressBar(this);
|
||||||
|
spinner.setIndeterminate(true);
|
||||||
|
layout.addView(spinner);
|
||||||
|
setContentView(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void startNextActivity() {
|
||||||
|
Intent i = new Intent(this, HomeScreenActivity.class);
|
||||||
|
i.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME);
|
||||||
|
startActivity(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user