From: Petru Trimbitas Date: Thu, 13 Jun 2013 14:04:27 +0000 (+0300) Subject: Add event work in progress X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=24e0eeef27db4b303d0ba2697fe7f94ede168aed;p=unical.git Add event work in progress --- diff --git a/res/layout/add_event_basic_tab.xml b/res/layout/add_event_basic_tab.xml index f05f666..00d07c2 100644 --- a/res/layout/add_event_basic_tab.xml +++ b/res/layout/add_event_basic_tab.xml @@ -151,6 +151,13 @@ android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" /> + diff --git a/src/ro/ieval/unical/TrivialFragment.java b/src/ro/ieval/unical/TrivialFragment.java index 1dc538f..55e5da1 100644 --- a/src/ro/ieval/unical/TrivialFragment.java +++ b/src/ro/ieval/unical/TrivialFragment.java @@ -34,9 +34,7 @@ public final class TrivialFragment extends Fragment { 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() { @@ -46,10 +44,12 @@ public final class TrivialFragment extends Fragment { 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); } }