Selaa lähdekoodia

][회원가입][Common] 회원가입 구현 중 추천혜택 리스트 추가

Hasemi 7 vuotta sitten
vanhempi
commit
f44425cc14

+ 6 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -2,5 +2,11 @@
   <profile version="1.0">
     <option name="myName" value="Project Default" />
     <inspection_tool class="AndroidLintLongLogTag" enabled="false" level="ERROR" enabled_by_default="false" />
+    <inspection_tool class="BreakStatement" enabled="true" level="ERROR" enabled_by_default="true" />
+    <inspection_tool class="DefaultNotLastCaseInSwitch" enabled="true" level="ERROR" enabled_by_default="true" />
+    <inspection_tool class="FallthruInSwitchStatement" enabled="true" level="ERROR" enabled_by_default="true" />
+    <inspection_tool class="SwitchStatementsWithoutDefault" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="m_ignoreFullyCoveredEnums" value="true" />
+    </inspection_tool>
   </profile>
 </component>

+ 55 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/signup/SignUpBenefitCustomView.java

@@ -0,0 +1,55 @@
+package kr.co.zumo.app.lifeplus.view.fragment.signup;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.support.annotation.Nullable;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import kr.co.zumo.app.R;
+
+public class SignUpBenefitCustomView extends LinearLayout {
+
+  LinearLayout benefit_layout;
+  ImageView benefit_image;
+  TextView benefit_title;
+  TextView benefit_contents;
+  TextView benefit_category;
+
+
+  public SignUpBenefitCustomView(Context context) {
+    super(context);
+    inflateViews();
+
+  }
+
+  public SignUpBenefitCustomView(Context context, @Nullable AttributeSet attrs) {
+    super(context, attrs);
+    inflateViews();
+  }
+
+  public SignUpBenefitCustomView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+    super(context, attrs, defStyleAttr);
+  }
+
+  private void inflateViews(){
+    LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+    View view = inflater.inflate(R.layout.sign_up_benefit_view , this);
+    addView(view);
+
+    /*benefit_layout = (LinearLayout)findViewById(R.id.benefit_layout);
+    benefit_image = (ImageView)findViewById(R.id.benefit_image);
+    benefit_title = (TextView)findViewById(R.id.benefit_title);
+    benefit_contents = (TextView)findViewById(R.id.benefit_contents);
+    benefit_category = (TextView)findViewById(R.id.benefit_category);*/
+  }
+
+  private void getAttrs(AttributeSet attrs){
+    TypedArray typedArray = getContext().obtainStyledAttributes(attrs , R.styleable.BenefitView);
+
+  }
+}

+ 36 - 0
app/src/main/res/layout/sign_up_benefit_list.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent"
+  android:layout_weight="3"
+  android:orientation="horizontal">
+
+  <LinearLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:weightSum="3"
+    >
+    <kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_weight="1"
+      >
+    </kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView>
+
+    <kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_weight="1"
+      >
+    </kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView>
+
+    <kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_weight="1"
+      >
+    </kr.co.zumo.app.lifeplus.view.fragment.signup.SignUpBenefitCustomView>
+  </LinearLayout>
+</LinearLayout>

+ 11 - 88
app/src/main/res/layout/sign_up_benefit_view.xml

@@ -1,96 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>
-<layout
-  xmlns:android="http://schemas.android.com/apk/res/android">
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:weightSum="3">
-
-    <LinearLayout
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_weight="1"
-      android:orientation="vertical">
-
-      <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:src="@mipmap/ic_launcher"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text1"
-        android:textAlignment="center"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text2"
-        android:textAlignment="center"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text3"
-        android:textAlignment="center"/>
-    </LinearLayout>
-
-    <LinearLayout
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_gravity="center"
-      android:layout_weight="1"
-      android:orientation="vertical">
-
-      <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:src="@mipmap/ic_launcher"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text1"
-        android:textAlignment="center"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text2"
-        android:textAlignment="center"/>
-
-      <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:text="text3"
-        android:textAlignment="center"/>
-    </LinearLayout>
-
-    <LinearLayout
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_gravity="center"
-      android:layout_weight="1"
-      android:orientation="vertical">
-
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:id="@+id/benefit_layout"
+  android:layout_width="match_parent"
+  android:orientation="vertical"
+  android:layout_height="match_parent">
       <ImageView
+        android:id="@+id/benefit_image"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
         android:src="@mipmap/ic_launcher"/>
 
       <TextView
+        android:id="@+id/benefit_title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
@@ -98,6 +21,7 @@
         android:textAlignment="center"/>
 
       <TextView
+        android:id="@+id/benefit_contents"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
@@ -105,11 +29,10 @@
         android:textAlignment="center"/>
 
       <TextView
+        android:id="@+id/benefit_category"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center"
         android:text="text3"
         android:textAlignment="center"/>
-    </LinearLayout>
-  </LinearLayout>
-</layout>
+</LinearLayout>

+ 5 - 0
app/src/main/res/values/attrs.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <declare-styleable name="BenefitView">
+  </declare-styleable>
+</resources>