]> iEval git - unical.git/commitdiff
Clean up
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 10:37:26 +0000 (13:37 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 10:37:26 +0000 (13:37 +0300)
AndroidManifest.xml
res/drawable-hdpi/ic_launcher.png [deleted file]
res/drawable-mdpi/ic_launcher.png [deleted file]
res/drawable-xhdpi/ic_launcher.png [deleted file]
res/drawable-xxhdpi/ic_launcher.png [deleted file]
res/layout/add_event.xml [deleted file]
src/ro/ieval/unical/AddEventActivity.java
src/ro/ieval/unical/AddEventTabListener.java

index 0e0fe9493a561a5feba6bc79b7a775c1d85e3d8c..25a418b153bb97f93b0fbae7f97ad1987bdfeab3 100644 (file)
@@ -13,7 +13,6 @@
     <application
                android:name="ro.ieval.unical.Application"
         android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@android:style/Theme.DeviceDefault.Light" >
         <activity android:name=".EventListActivity">
diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644 (file)
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 (file)
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 (file)
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 (file)
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 (file)
index 885c616..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<LinearLayout
-xmlns:android="http://schemas.android.com/apk/res/android"
-android:orientation="vertical"
-android:layout_width="fill_parent"
-android:layout_height="fill_parent" android:layout_gravity="center">
-       <LinearLayout
-           android:orientation="vertical"
-           android:id="@+id/fragment_container"
-           android:layout_width="match_parent"
-           android:layout_height="match_parent" >
-
-</LinearLayout>
-</LinearLayout>
\ No newline at end of file
index 325909376b0a14c47bf5948be5fb9ef383962a9f..bf4a8bb1f0c13a408c91867fd12d1c32bc58e1b0 100644 (file)
@@ -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);
index aa9c763a1ec370dd30a942255572fbef2de705c0..2a89db7be39f276105a7522b33d93b67d78c3ddf 100644 (file)
@@ -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
        }
 }
This page took 0.033654 seconds and 4 git commands to generate.