From: Marius Gavrilescu Date: Tue, 13 Aug 2013 10:37:26 +0000 (+0300) Subject: Clean up X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=c6a1325646c2ad7537db1cb8f53d6a464ebf0861;p=unical.git Clean up --- diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0e0fe94..25a418b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -13,7 +13,6 @@ diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index d72c84b..0000000 Binary files a/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 42219b6..0000000 Binary files a/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 129453f..0000000 Binary files a/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_launcher.png b/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 361d984..0000000 Binary files a/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/res/layout/add_event.xml b/res/layout/add_event.xml deleted file mode 100644 index 885c616..0000000 --- a/res/layout/add_event.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/ro/ieval/unical/AddEventActivity.java b/src/ro/ieval/unical/AddEventActivity.java index 3259093..bf4a8bb 100644 --- a/src/ro/ieval/unical/AddEventActivity.java +++ b/src/ro/ieval/unical/AddEventActivity.java @@ -33,7 +33,6 @@ public final class AddEventActivity extends Activity implements OnDateSetListene @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.add_event); setTitle(R.string.add_event_title); final ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); diff --git a/src/ro/ieval/unical/AddEventTabListener.java b/src/ro/ieval/unical/AddEventTabListener.java index aa9c763..2a89db7 100644 --- a/src/ro/ieval/unical/AddEventTabListener.java +++ b/src/ro/ieval/unical/AddEventTabListener.java @@ -12,9 +12,10 @@ import java.text.SimpleDateFormat; import java.util.Date; public class AddEventTabListener implements ActionBar.TabListener { - public Fragment fragment; + private Fragment fragment; private Event ev; - int tabId; + private boolean isAdded = false; + private int tabId; public AddEventTabListener(final Fragment fragment,Event e,int tabId) { this.fragment = fragment; @@ -24,12 +25,17 @@ public class AddEventTabListener implements ActionBar.TabListener { @Override public void onTabSelected(final Tab tab, final FragmentTransaction ft) { - ft.replace(R.id.fragment_container, fragment); + if(isAdded) + ft.attach(fragment); + else { + isAdded = true; + ft.add(android.R.id.content, fragment); + } + switch (tabId) { case 0: - if(fragment.getView()==null) System.err.println("MuieLaComisie"); //EditText title =(EditText) fragment.getView().findViewById(R.id.eventtitle); - // title.setText(ev.title, TextView.BufferType.EDITABLE); + //title.setText(ev.title, TextView.BufferType.EDITABLE); break; } } @@ -49,7 +55,7 @@ public class AddEventTabListener implements ActionBar.TabListener { ev.dtstart=s.getTime(); ev.dtend=s.getTime(); } catch (ParseException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. + e.printStackTrace(); } break; @@ -59,12 +65,11 @@ public class AddEventTabListener implements ActionBar.TabListener { case 2: break; } - ft.remove(fragment); + ft.detach(fragment); } @Override public void onTabReselected(final Tab tab, final FragmentTransaction ft) { - // TODO Auto-generated method stub - + // do nothing } }