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

Commit 6d6e855

Browse files
committed
Change Title in LoginActivity if started from add realm
1 parent 3066059 commit 6d6e855

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
import android.util.Log;
1111
import android.util.Patterns;
1212
import android.view.View;
13+
import android.widget.Button;
1314
import android.widget.CheckBox;
1415
import android.widget.CompoundButton;
1516
import android.widget.EditText;
17+
import android.widget.TextView;
1618
import android.widget.Toast;
1719

1820
import com.google.android.gms.auth.api.Auth;
@@ -70,6 +72,11 @@ protected void onCreate(Bundle savedInstanceState) {
7072
mUserName = (EditText) findViewById(R.id.username);
7173
mPassword = (EditText) findViewById(R.id.password);
7274
realmNameET = (EditText) findViewById(R.id.realmName);
75+
if (getIntent().getBooleanExtra("FROM_ADDREALM", false)) {
76+
startedFromAddRealm = true;
77+
((TextView) findViewById(R.id.textView1)).setText(R.string.add_realm);
78+
((Button) findViewById(R.id.zulip_login)).setText(R.string.add_realm_login);
79+
}
7380
}
7481

7582
@Override

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@
7272
<string name="realm_add">Add Realm</string>
7373
<string name="realm_name">Name of a realm (Optional)</string>
7474
<string name="realm_exists">Realm Name already exists, please change.</string>
75-
75+
<string name="add_realm">Add new Realm</string>
76+
<string name="add_realm_login">Add</string>
7677
</resources>

0 commit comments

Comments
 (0)