Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/src/main/java/com/ds/avare/RegisterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.text.TextUtils;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
Expand Down Expand Up @@ -47,6 +48,7 @@ public class RegisterActivity extends BaseActivity {
// Register button
private Button mButtonRegister;
private EditText mEmailEditText;
private WebView mPrivacy;

private void setButtonStates() {
if(mPref.isRegistered()) {
Expand Down Expand Up @@ -95,6 +97,11 @@ public void onCreate(Bundle savedInstanceState) {

mEmailEditText = (EditText) findViewById(R.id.edittext_register);
mButtonRegister = (Button) findViewById(R.id.btn_register);
/*
* privacy policy load
*/
mPrivacy = (WebView)findViewById(R.id.privacy_webview);
mPrivacy.loadUrl(com.ds.avare.utils.Helper.getWebViewFile(getApplicationContext(), "privacy"));
// Check if Internet present
if (!Helper.isNetworkAvailable(this)) {

Expand Down Expand Up @@ -263,7 +270,7 @@ protected void onPostExecute(Boolean result) {
DecoratedAlertDialogBuilder alertDialogBuilder = new DecoratedAlertDialogBuilder(RegisterActivity.this);
alertDialogBuilder
.setTitle(getString(R.string.register))
.setMessage(getString(R.string.registered_1800wxbrief))
.setMessage(getString(R.string.registered))
.setPositiveButton(getString(R.string.OK), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
Expand Down
16 changes: 13 additions & 3 deletions app/src/main/res/layout/activity_register.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,39 @@ All rights reserved.
android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
android:id="@+id/privacy_webview"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_weight="6"
android:layout_height="0dp"/>

<LinearLayout
android:layout_margin="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_weight="1"
android:layout_height="0dp">

<EditText
android:id="@+id/edittext_register"
android:layout_below="@+id/privacy_webview"
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/button_bg"
android:layout_margin="1dp"
android:hint="Your email address"
android:inputType="textEmailAddress" />

<Button
android:id="@+id/btn_register"
android:layout_below="@+id/edittext_register"
android:layout_width="0dp"
android:background="@drawable/button_bg"
android:layout_margin="1dp"
android:text="@string/register"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
/>

</LinearLayout>
Expand Down
Loading