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

Commit 2013dfa

Browse files
committed
Change Title in LoginActivity if started from add realm
1 parent 0902f2b commit 2013dfa

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-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
@@ -12,7 +12,11 @@
1212
import android.util.Log;
1313
import android.util.Patterns;
1414
import android.view.View;
15+
import android.widget.Button;
16+
import android.widget.CheckBox;
17+
import android.widget.CompoundButton;
1518
import android.widget.EditText;
19+
import android.widget.TextView;
1620
import android.widget.Toast;
1721

1822
import com.google.android.gms.auth.api.Auth;
@@ -139,6 +143,11 @@ private void showLoginFields() {
139143
AnimationHelper.showView(findViewById(R.id.serverInput), 201);
140144
AnimationHelper.hideView(findViewById(R.id.serverFieldLayout), 100);
141145
realmNameET = (EditText) findViewById(R.id.realmName);
146+
if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) {
147+
startedFromAddRealm = true;
148+
((TextView) findViewById(R.id.textView1)).setText(R.string.add_realm);
149+
((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login);
150+
}
142151
}
143152

144153
@Override

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

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

0 commit comments

Comments
 (0)