]> iEval git - unical.git/commitdiff
Add event work in progress
authorPetru Trimbitas <l3asketballplayer@yahoo.com>
Thu, 13 Jun 2013 14:04:27 +0000 (17:04 +0300)
committerPetru Trimbitas <l3asketballplayer@yahoo.com>
Thu, 13 Jun 2013 14:04:27 +0000 (17:04 +0300)
res/layout/add_event_basic_tab.xml
src/ro/ieval/unical/TrivialFragment.java

index f05f666ee851a5543253dfe753b0665001bdc3c8..00d07c2918e9e61148f24f9594f61d4f0100f0ea 100644 (file)
                    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>
index 1dc538f23e1eda41ae0acb387532debc583376e3..55e5da177b9c56cf58347120738d9d70b5169d13 100644 (file)
@@ -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);
                                                                }
                                                                
                                                        }
This page took 0.032312 seconds and 4 git commands to generate.