Renamed home screen to dashboard.

This commit is contained in:
akwizgran
2014-02-05 22:19:29 +00:00
parent 4fdcbca357
commit bd40c65916
6 changed files with 19 additions and 19 deletions

View File

@@ -27,7 +27,7 @@
</intent-filter>
</service>
<activity
android:name=".android.HomeScreenActivity"
android:name=".android.DashboardActivity"
android:logo="@drawable/logo"
android:label="@string/app_name" >
</activity>
@@ -59,10 +59,10 @@
android:name=".android.contact.ContactListActivity"
android:logo="@drawable/logo"
android:label="@string/contact_list_title"
android:parentActivityName=".android.HomeScreenActivity" >
android:parentActivityName=".android.DashboardActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".android.HomeScreenActivity"
android:value=".android.DashboardActivity"
/>
</activity>
<activity
@@ -99,10 +99,10 @@
android:name=".android.groups.GroupListActivity"
android:logo="@drawable/logo"
android:label="@string/forums_title"
android:parentActivityName=".android.HomeScreenActivity" >
android:parentActivityName=".android.DashboardActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".android.HomeScreenActivity"
android:value=".android.DashboardActivity"
/>
</activity>
<activity

View File

@@ -2,7 +2,7 @@
<resources>
<string name="app_name">Briar</string>
<string name="ongoing_notification_title">Briar is running</string>
<string name="ongoing_notification_text">Touch to show the home screen.</string>
<string name="ongoing_notification_text">Touch to show the dashboard.</string>
<string name="setup_title">Briar Setup</string>
<string name="choose_nickname">Choose your nickname:</string>
<string name="choose_password">Choose your password:</string>

View File

@@ -83,7 +83,7 @@ public class BriarService extends RoboService implements EventListener {
b.setContentText(getText(R.string.ongoing_notification_text));
b.setWhen(0); // Don't show the time
b.setOngoing(true);
Intent i = new Intent(this, HomeScreenActivity.class);
Intent i = new Intent(this, DashboardActivity.class);
i.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP |
FLAG_ACTIVITY_SINGLE_TOP);
b.setContentIntent(PendingIntent.getActivity(this, 0, i, 0));
@@ -109,14 +109,14 @@ public class BriarService extends RoboService implements EventListener {
b.setSmallIcon(android.R.drawable.stat_notify_error);
b.setContentTitle(getText(R.string.startup_failed_notification_title));
b.setContentText(getText(R.string.startup_failed_notification_text));
Intent i = new Intent(this, HomeScreenActivity.class);
Intent i = new Intent(this, DashboardActivity.class);
i.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
b.setContentIntent(PendingIntent.getActivity(this, 0, i, 0));
Object o = getSystemService(NOTIFICATION_SERVICE);
NotificationManager nm = (NotificationManager) o;
nm.notify(FAILURE_NOTIFICATION_ID, b.build());
// Bring HomeScreenActivity to the front to clear all other activities
i = new Intent(this, HomeScreenActivity.class);
// Bring the dashboard to the front to clear all other activities
i = new Intent(this, DashboardActivity.class);
i.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP);
i.putExtra("briar.STARTUP_FAILED", true);
startActivity(i);

View File

@@ -38,10 +38,10 @@ import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.Toast;
public class HomeScreenActivity extends BriarActivity {
public class DashboardActivity extends BriarActivity {
private static final Logger LOG =
Logger.getLogger(HomeScreenActivity.class.getName());
Logger.getLogger(DashboardActivity.class.getName());
@Inject private ReferenceManager referenceManager;
@Inject @DatabaseUiExecutor private Executor dbUiExecutor;
@@ -91,7 +91,7 @@ public class HomeScreenActivity extends BriarActivity {
contactsButton.setText(R.string.contact_list_button);
contactsButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
startActivity(new Intent(HomeScreenActivity.this,
startActivity(new Intent(DashboardActivity.this,
ContactListActivity.class));
}
});
@@ -105,7 +105,7 @@ public class HomeScreenActivity extends BriarActivity {
forumsButton.setText(R.string.forums_button);
forumsButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
startActivity(new Intent(HomeScreenActivity.this,
startActivity(new Intent(DashboardActivity.this,
GroupListActivity.class));
}
});
@@ -120,7 +120,7 @@ public class HomeScreenActivity extends BriarActivity {
syncButton.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
// FIXME: Hook this button up to an activity
Toast.makeText(HomeScreenActivity.this,
Toast.makeText(DashboardActivity.this,
R.string.not_implemented_toast, LENGTH_SHORT).show();
}
});

View File

@@ -228,7 +228,7 @@ public class SetupActivity extends RoboActivity implements OnClickListener {
for(int i = 0; i < password.length; i++) password[i] = 0;
storeEncryptedDatabaseKey(encrypted);
LocalAuthor localAuthor = createLocalAuthor(nickname);
showHomeScreen(referenceManager.putReference(localAuthor,
showDashboard(referenceManager.putReference(localAuthor,
LocalAuthor.class));
}
});
@@ -271,11 +271,11 @@ public class SetupActivity extends RoboActivity implements OnClickListener {
return localAuthor;
}
private void showHomeScreen(final long handle) {
private void showDashboard(final long handle) {
runOnUiThread(new Runnable() {
public void run() {
Intent i = new Intent(SetupActivity.this,
HomeScreenActivity.class);
DashboardActivity.class);
i.putExtra("briar.LOCAL_AUTHOR_HANDLE", handle);
i.setFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(i);

View File

@@ -58,7 +58,7 @@ public class SplashScreenActivity extends RoboSplashActivity {
LOG.info("Guice startup took " + duration + " ms");
Injector guice = RoboGuice.getBaseApplicationInjector(getApplication());
if(guice.getInstance(DatabaseConfig.class).databaseExists()) {
Intent i = new Intent(this, HomeScreenActivity.class);
Intent i = new Intent(this, DashboardActivity.class);
i.setFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
} else {