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

Commit db3699e

Browse files
committed
Change Title in LoginActivity if started from add realm
1 parent c0d8d3d commit db3699e

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
@@ -14,7 +14,11 @@
1414
import android.util.Log;
1515
import android.util.Patterns;
1616
import android.view.View;
17+
import android.widget.Button;
18+
import android.widget.CheckBox;
19+
import android.widget.CompoundButton;
1720
import android.widget.EditText;
21+
import android.widget.TextView;
1822
import android.widget.Toast;
1923

2024
import com.google.android.gms.auth.api.Auth;
@@ -103,6 +107,11 @@ private void showLoginFields() {
103107
AnimationHelper.showView(findViewById(R.id.serverInput), 201);
104108
AnimationHelper.hideView(findViewById(R.id.serverFieldLayout), 100);
105109
realmNameET = (EditText) findViewById(R.id.realmName);
110+
if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) {
111+
startedFromAddRealm = true;
112+
((TextView) findViewById(R.id.textView1)).setText(R.string.add_realm);
113+
((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login);
114+
}
106115
}
107116

108117
@Override

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,6 @@
8888
<string name="realm_add">Add Realm</string>
8989
<string name="realm_name">Name of a realm (Optional)</string>
9090
<string name="realm_exists">Realm Name already exists, please change.</string>
91-
91+
<string name="add_realm">Add new Realm</string>
92+
<string name="add_realm_login">Add</string>
9293
</resources>

0 commit comments

Comments
 (0)