Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 6e4d804

Browse files
committed
Change Title in LoginActivity if started from add realm
1 parent 362808e commit 6e4d804

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

app/src/main/java/com/zulip/android/activities/LoginActivity.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
import android.util.Log;
1414
import android.util.Patterns;
1515
import android.view.View;
16+
import android.widget.Button;
17+
import android.widget.CheckBox;
18+
import android.widget.CompoundButton;
1619
import android.widget.EditText;
20+
import android.widget.TextView;
1721
import android.widget.Toast;
1822

1923
import com.google.android.gms.auth.api.Auth;
@@ -107,6 +111,11 @@ private void showLoginFields() {
107111
AnimationHelper.showView(findViewById(R.id.serverInput), 201);
108112
AnimationHelper.hideView(findViewById(R.id.serverFieldLayout), 100);
109113
realmNameET = (EditText) findViewById(R.id.realmName);
114+
if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) {
115+
startedFromAddRealm = true;
116+
((TextView) findViewById(R.id.welcome_zulip)).setText(R.string.add_realm);
117+
((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login);
118+
}
110119
}
111120

112121
@Override

app/src/main/res/layout-v21/login.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
android:layout_marginTop="16dp"
2727
android:gravity="center|center_horizontal"
2828
android:padding="10dp"
29+
android:id="@+id/welcome_zulip"
2930
android:text="@string/login_welcome_blurb"
3031
android:textAppearance="?android:attr/textAppearanceLarge" />
3132

app/src/main/res/layout/login.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
android:layout_marginTop="16dp"
2121
android:gravity="center|center_horizontal"
2222
android:padding="10dp"
23+
android:id="@+id/welcome_zulip"
2324
android:text="@string/login_welcome_blurb"
2425
android:textAppearance="?android:attr/textAppearanceLarge" />
2526

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,6 @@
8282
<string name="realm_add">Add Realm</string>
8383
<string name="realm_name">Name of a realm (Optional)</string>
8484
<string name="realm_exists">Realm Name already exists, please change.</string>
85-
85+
<string name="add_realm">Add new Realm</string>
86+
<string name="add_realm_login">Add</string>
8687
</resources>

0 commit comments

Comments
 (0)