BirthdaySignUpFragment.java
3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package com.bitstrips.imoji.ui.fragments;
import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.DatePicker.OnDateChangedListener;
import android.widget.EditText;
import java.text.DateFormat;
import java.util.Calendar;
public class BirthdaySignUpFragment
extends Fragment
implements DatePicker.OnDateChangedListener
{
OnBirthdaySelectedListener a;
Calendar b;
private EditText c;
private DatePicker d;
private Button e;
public void onAttach(Activity paramActivity)
{
super.onAttach(paramActivity);
try
{
this.a = ((OnBirthdaySelectedListener)paramActivity);
paramActivity.setTitle(2131230861);
return;
}
catch (ClassCastException localClassCastException)
{
throw new ClassCastException(paramActivity.toString() + " must implement OnBirthdaySelectedListener");
}
}
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
paramLayoutInflater = paramLayoutInflater.inflate(2130903109, paramViewGroup, false);
this.c = ((EditText)paramLayoutInflater.findViewById(2131689722));
this.d = ((DatePicker)paramLayoutInflater.findViewById(2131689719));
this.e = ((Button)paramLayoutInflater.findViewById(2131689720));
this.c.addTextChangedListener(new TextWatcher()
{
public final void afterTextChanged(Editable paramAnonymousEditable)
{
Button localButton = BirthdaySignUpFragment.a(BirthdaySignUpFragment.this);
if (!TextUtils.isEmpty(paramAnonymousEditable.toString())) {}
for (boolean bool = true;; bool = false)
{
localButton.setEnabled(bool);
return;
}
}
public final void beforeTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3) {}
public final void onTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3) {}
});
this.e.setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
BirthdaySignUpFragment.this.a.onBirthdaySelected(BirthdaySignUpFragment.this.b);
}
});
paramViewGroup = Calendar.getInstance();
this.d.init(paramViewGroup.get(1) - 1, paramViewGroup.get(2), paramViewGroup.get(5), this);
return paramLayoutInflater;
}
public void onDateChanged(DatePicker paramDatePicker, int paramInt1, int paramInt2, int paramInt3)
{
if (this.c != null)
{
paramDatePicker = Calendar.getInstance();
DateFormat localDateFormat = DateFormat.getDateInstance(1);
paramDatePicker.set(paramInt1, paramInt2, paramInt3);
this.b = paramDatePicker;
this.c.setText(localDateFormat.format(paramDatePicker.getTime()));
}
}
public static abstract interface OnBirthdaySelectedListener
{
public abstract void onBirthdaySelected(Calendar paramCalendar);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ui/fragments/BirthdaySignUpFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/