From 24e0eeef27db4b303d0ba2697fe7f94ede168aed Mon Sep 17 00:00:00 2001 From: Petru Trimbitas Date: Thu, 13 Jun 2013 17:04:27 +0300 Subject: [PATCH] Add event work in progress --- res/layout/add_event_basic_tab.xml | 7 +++++++ src/ro/ieval/unical/TrivialFragment.java | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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); } } -- 2.39.2