mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-23 00:33:09 +02:00
set the user default birthday to minus 20 years from the current year.
This commit is contained in:
@@ -21,9 +21,7 @@ import android.app.DatePickerDialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.DatePicker;
|
import android.widget.DatePicker;
|
||||||
@@ -90,6 +88,11 @@ public class UserSettingsActivity extends Activity {
|
|||||||
btnCancel.setOnClickListener(new onClickListenerCancel());
|
btnCancel.setOnClickListener(new onClickListenerCancel());
|
||||||
btnDelete.setOnClickListener(new onClickListenerDelete());
|
btnDelete.setOnClickListener(new onClickListenerDelete());
|
||||||
|
|
||||||
|
Calendar birthdayCal = Calendar.getInstance();
|
||||||
|
birthdayCal.setTime(birthday);
|
||||||
|
birthdayCal.add(Calendar.YEAR, -20);
|
||||||
|
birthday = birthdayCal.getTime();
|
||||||
|
|
||||||
txtBirthday.setText(dateFormat.format(birthday));
|
txtBirthday.setText(dateFormat.format(birthday));
|
||||||
txtGoalDate.setText(dateFormat.format(goal_date));
|
txtGoalDate.setText(dateFormat.format(goal_date));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user