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

Commit dd4ad5d

Browse files
jainkuniyatimabbott
authored andcommitted
Added register link in login page
1 parent 0f6dd02 commit dd4ad5d

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ public void onTaskFailure(String result) {
444444
}
445445
});
446446
asyncDevGetEmails.execute();
447+
break;
448+
case R.id.register:
449+
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(serverIn.getText().toString()+"register"));
450+
startActivity(intent);
451+
break;
447452
default:
448453
break;
449454
}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@
139139
android:layout_height="wrap_content"
140140
android:visibility="gone" />
141141

142+
<TextView
143+
android:id="@+id/register"
144+
android:layout_width="wrap_content"
145+
android:layout_height="wrap_content"
146+
android:padding="8dp"
147+
android:text="@string/register_button"
148+
android:layout_gravity="center_horizontal"
149+
android:layout_marginTop="16dp"
150+
android:onClick="onClick"
151+
android:textColor="#ff0099cc"
152+
/>
153+
142154
<TextView
143155
android:id="@+id/local_server_button"
144156
android:layout_width="wrap_content"

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@
130130
android:layout_height="wrap_content"
131131
android:visibility="gone" />
132132

133+
<TextView
134+
android:id="@+id/register"
135+
android:layout_width="wrap_content"
136+
android:layout_height="wrap_content"
137+
android:padding="8dp"
138+
android:text="@string/register_button"
139+
android:layout_gravity="center_horizontal"
140+
android:layout_marginTop="16dp"
141+
android:onClick="onClick"
142+
android:textColor="#ff0099cc"
143+
/>
144+
133145
<TextView
134146
android:id="@+id/local_server_button"
135147
android:layout_width="wrap_content"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,5 @@
9898
<string name="content_description_search_icon">search icon</string>
9999
<string name="hint_search_people">Search People</string>
100100
<string name="hint_search_stream">Search Stream</string>
101+
<string name="register_button">Register</string>
101102
</resources>

0 commit comments

Comments
 (0)