فهرست منبع

#2019-05-17 09:32
- 이벤트 참여 완료후 목록갱신 추가
- 이벤트 목록 1개 이하일때 인디케이터 숨김

yeongyun 6 سال پیش
والد
کامیت
46ac185052

+ 3 - 4
app/build.gradle

@@ -44,7 +44,7 @@ android {
         minSdkVersion 19    // 4.4
         targetSdkVersion 27
         versionCode 177
-        versionName "4.0.7.001"
+        versionName "4.0.7.002"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         vectorDrawables.useSupportLibrary = true
@@ -95,10 +95,9 @@ android {
 //            buildConfigField "String", "PRODUCT_USER_2", "\"" + developProperties['PRODUCT_USER_2'] + "\""
 //        }
         dev {
-//            manifestPlaceholders = [appLabel: "@string/app_name_debug"]
+            manifestPlaceholders = [icon: "@mipmap/ic_launcher_dev"]
             applicationIdSuffix ".dev"
             versionNameSuffix "-dev"
-//            manifestPlaceholders = [appLabel: "@string/app_name_dev"]
 
             // defining the test properties
             buildConfigField "String", "DEV_USER_1", "\"" + developProperties['DEV_USER_1'] + "\""
@@ -108,7 +107,7 @@ android {
         }
         product {
             versionNameSuffix ""
-//            manifestPlaceholders = [appLabel: "@string/app_name"]
+            manifestPlaceholders = [icon: "@mipmap/ic_launcher"]
 
             // defining the test properties
             buildConfigField "String", "DEV_USER_1", "\"\""

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -17,7 +17,7 @@
         android:name=".lifeplus.application.App"
         android:allowBackup="false"
         android:hardwareAccelerated="true"
-        android:icon="@mipmap/ic_launcher"
+        android:icon="${icon}"
         android:label="${appLabel}"
         android:largeHeap="true"
         android:roundIcon="@mipmap/ic_launcher_round"

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventFragment.java

@@ -131,6 +131,7 @@ public class EventFragment extends FragmentBase<EventPresenter> implements IEven
 
     @Override
     public void update(List<Integer> indexList) {
+        adapter.update(indexList);
     }
 
 }

+ 1 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventListFragment.java

@@ -9,6 +9,7 @@ import android.support.v4.view.ViewPager;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.LinearLayout;
 
 import java.util.List;
 
@@ -34,7 +35,6 @@ public class EventListFragment extends FragmentBase<EventListPresenter> implemen
     private TabLayout eventTabIndicator;
 //    private ConstraintLayout layoutMyEvent;
     private EventListViewPagerAdapter adapter;
-    private ConstraintLayout layoutListNone;
 
     @Override
     protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -45,7 +45,6 @@ public class EventListFragment extends FragmentBase<EventListPresenter> implemen
     protected void onAfterActivityCreated(Bundle savedInstanceState) {
         recyclerViewEvent = findViewById(R.id.recycler_view_event);
         eventTabIndicator = findViewById(R.id.tab_layout_event);
-        layoutListNone = findViewById(R.id.layout_list_none);
 //        layoutMyEvent = findViewById(R.id.layout_my_event);
 
 //        layoutMyEvent.setOnClickListener(view -> {
@@ -129,10 +128,8 @@ public class EventListFragment extends FragmentBase<EventListPresenter> implemen
     public void setVisibleNothing(boolean isVisible) {
         if (isVisible) {
             recyclerViewEvent.setVisibility(View.GONE);
-            layoutListNone.setVisibility(View.VISIBLE);
         } else {
             recyclerViewEvent.setVisibility(View.VISIBLE);
-            layoutListNone.setVisibility(View.GONE);
         }
     }
 

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventListView.java

@@ -84,6 +84,7 @@ public class EventListView extends BaseEventView {
         adapter = new EventListViewPagerAdapter(context, eventBeans, listener);
         recyclerViewEvent.setAdapter(adapter);
         setVisibleNothing(eventBeans == null || eventBeans.size() == 0);
+        setVisibleIndicator(eventBeans != null && eventBeans.size() > 1);
     }
 
     public void setVisibleNothing(boolean isVisible) {

+ 9 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventPagerAdapter.java

@@ -21,8 +21,8 @@ public class EventPagerAdapter extends PagerAdapter {
 
     private Context context;
 
-    private BaseEventView eventListView;
-    private BaseEventView myEventView;
+    private EventListView eventListView;
+    private MyEventView myEventView;
 
     private IEventListener listener;
 
@@ -88,6 +88,7 @@ public class EventPagerAdapter extends PagerAdapter {
         if(eventListView != null) {
             eventListView.draw(data);
         }
+        notifyDataSetChanged();
     }
 
     public void setMyEventData(List<EventBean> data) {
@@ -96,4 +97,10 @@ public class EventPagerAdapter extends PagerAdapter {
         }
         notifyDataSetChanged();
     }
+
+    public void update(List<Integer> indexList) {
+        if(eventListView != null) {
+            eventListView.update(indexList);
+        }
+    }
 }

+ 1 - 32
app/src/main/res/layout/fragment_event.xml

@@ -6,12 +6,11 @@
     android:layout_height="match_parent"
     android:paddingBottom="55dp">
 
-
     <android.support.v4.view.ViewPager
         android:id="@+id/recycler_view_event"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="14dp"
+        android:layout_marginTop="24dp"
         android:layout_marginBottom="35dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -34,36 +33,7 @@
         app:tabPaddingStart="6dp"
         tools:background="@color/C000000" />
 
-    <android.support.constraint.ConstraintLayout
-        android:id="@+id/layout_my_event"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="25dp"
-        android:layout_marginEnd="25dp"
-        android:layout_marginBottom="25dp"
-        android:background="@drawable/rectangle_black_radius_2"
-        android:visibility="gone"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        tools:visibility="gone">
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="10dp"
-            android:layout_marginBottom="10dp"
-            android:gravity="center_horizontal"
-            android:lineSpacingExtra="6sp"
-            android:text="@string/my_event"
-            android:textColor="@color/CFFFFFF"
-            android:textSize="16sp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-    </android.support.constraint.ConstraintLayout>
 
     <android.support.constraint.ConstraintLayout
         android:id="@+id/layout_list_none"
@@ -71,7 +41,6 @@
         android:layout_height="match_parent"
         android:layout_marginBottom="61dp"
         android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/layout_my_event"
         app:layout_constraintVertical_bias=".35"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"

+ 0 - 2
app/src/main/res/layout/fragment_my_event.xml

@@ -48,14 +48,12 @@
         android:layout_height="match_parent"
         android:layout_marginBottom="61dp"
         android:visibility="gone"
-        app:layout_constraintBottom_toTopOf="@+id/layout_my_event"
         app:layout_constraintVertical_bias=".35"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent"
         tools:visibility="visible">
 
-
         <ImageView
             android:id="@+id/image_view_search_none"
             android:layout_width="wrap_content"

BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_dev.png