Commit 29543ef4 authored by Tanmim Hanifa's avatar Tanmim Hanifa
Browse files

Date from string parsed to date

parent 11d09ae8
......@@ -6,6 +6,7 @@ import;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;
import android.text.format.DateFormat;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.Button;
......@@ -21,15 +22,22 @@ import;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.Date;
public class RegisterActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
final EditText etDob = (EditText) findViewById(;
final EditText etName = (EditText) findViewById(;
final EditText etUsername = (EditText) findViewById(;
......@@ -45,6 +53,8 @@ public class RegisterActivity extends AppCompatActivity {
final Button btnRegister = (Button) findViewById(;
TextView tvTerms =(TextView)findViewById(;
......@@ -68,6 +78,9 @@ public class RegisterActivity extends AppCompatActivity {
final String passwordAgain = etPasswordAgain.getText().toString();
Date cDate = new Date();
String fDate = new SimpleDateFormat(dob).format(cDate);
if(name.isEmpty()) {
AlertDialog.Builder builder2 = new AlertDialog.Builder(RegisterActivity.this);
builder2.setMessage("Name field is empty")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment