android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1" />
+ <EditText
+ android:id="@+id/repeat_count"
+ android:inputType="number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ />
</LinearLayout>
</LinearLayout>
if(isChecked) {
Utils.setEnabledRecursively(ll, true);
Spinner repeatType = (Spinner) view.findViewById(R.id.repeat_type);
- final EditText repeatCount = new EditText(getActivity());
- repeatCount.setInputType(InputType.TYPE_CLASS_NUMBER);
- final LinearLayout repeatLayout = (LinearLayout) view.findViewById(R.id.repeat_count_layout);
+ final EditText repeatCount = (EditText) view.findViewById(R.id.repeat_count);
repeatType.setOnItemSelectedListener(new OnItemSelectedListener() {
if(arg2==1) {
//TODO adauga un date picker
//TODO sterge repeatCount
+ repeatCount.setVisibility(EditText.GONE);
}else if(arg2==2) {
- repeatLayout.addView(repeatCount);
+ repeatCount.setVisibility(EditText.VISIBLE);
}else {
//TODO sterge repeatCount
+ repeatCount.setVisibility(EditText.GONE);
}
}