Преглед изворни кода

Merge remote-tracking branch 'origin/master'

jinochoi пре 8 година
родитељ
комит
a8b1f27481

+ 2 - 0
onecable/build.gradle

@@ -112,5 +112,7 @@ dependencies {
 //    compile 'com.koushikdutta.async:androidasync:2.+'
     compile 'com.mcxiaoke.volley:library:1.0.+'
     compile "org.java-websocket:Java-WebSocket:1.3.0"
+    compile 'com.jakewharton:butterknife:8.5.1'
+    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
     compile project(':color_picker')
 }

+ 2 - 0
onecable/src/main/java/com/ntels/onecable/common/Constants.java

@@ -989,6 +989,7 @@ public interface Constants {
   public static final int WEBSOCKET_SEND_AUTH = 1001;
   public static final int WEBSOCKET_SEND_AUTH_AUTO = 1002;
   public static final int WEBSOCKET_SEND_CONNECT_AUTH = 1003;
+  public static final int WEBSOCKET_SEND_AUTH_OUT = 1004;
 
   public static final int WEBSOCKET_SEND_DEVICE_REGISTER = 2001;
   public static final int WEBSOCKET_SEND_DEVICE_DELETE = 2002;
@@ -1012,6 +1013,7 @@ public interface Constants {
    */
   public static final String WEBSOCKET_TYPE_AUTH = "auth";
   public static final String WEBSOCKET_TYPE_AUTH_AUTO = "auth.auto";
+  public static final String WEBSOCKET_TYPE_AUTH_OUT = "auth.out";
   public static final String WEBSOCKET_TYPE_ONLINE = "online";
   public static final String WEBSOCKET_TYPE_CONN = "conn";
 

+ 9 - 0
onecable/src/main/java/com/ntels/onecable/common/websocket/WebSocketSender.java

@@ -203,6 +203,15 @@ public class WebSocketSender {
         send(util.MapToJson(hmParams));
     }
 
+    /**
+     * 로그아웃.
+     *
+     * @param hmParams Request parameter
+     */
+    public void sendAuthOut(HashMap<String, Object> hmParams) {
+        send(util.MapToJson(hmParams));
+    }
+
     /**
      * Websocket request send.
      *

+ 88 - 2
onecable/src/main/java/com/ntels/onecable/view/homemember/HomeMemberAdd.java

@@ -12,6 +12,7 @@ import com.ntels.onecable.common.http.Response;
 import com.ntels.onecable.common.util.Dlog;
 import com.ntels.onecable.common.util.Util;
 import com.ntels.onecable.common.widget.CustomActivity;
+import com.ntels.onecable.common.widget.CustomScrollView;
 import com.ntels.onecable.view.dialog.CustomDialog;
 import com.ntels.onecable.view.dialog.DialogDate;
 
@@ -23,16 +24,29 @@ import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.Toolbar;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
 import android.view.inputmethod.EditorInfo;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.ScrollView;
 import android.widget.TextView;
 import android.widget.Toast;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
 
 /**
  * <pre>
@@ -49,6 +63,7 @@ public class HomeMemberAdd extends CustomActivity implements View.OnClickListene
 
     private static final int MSG_COM_P_HOMEGRP_MEMBERS = 1;
     private static final int MSG_COM_P_HOMEGRP_MEMBERS_VALIDATION = 2;
+
     Handler comHandler = new Handler(new IncomingHandlerCallBack());
     private Util util = new Util();
     private CustomDialog customDialog = new CustomDialog();
@@ -58,6 +73,14 @@ public class HomeMemberAdd extends CustomActivity implements View.OnClickListene
     private ArrayList<HashMap<String, Object>> totalList = new ArrayList<>();
     private String authorizationQuestion = "";
     private String authorizationReply = "";
+    @BindView(R.id.tvQuestion) TextView mQuestion;
+    @BindView(R.id.llSlidingMenu) LinearLayout mSlidingMenu;
+    @BindView(R.id.rcvList) RecyclerView mQuizList;
+    LinearLayoutManager mLinearLayoutManager;
+    HomeMemberAddMenuAdapter mHomeMemberAddMenuAdapter;
+    @BindView(R.id.llQuiz) LinearLayout mQuizLayout;
+    @BindView(R.id.edtQuiz) EditText mQuizEditText;
+    @BindView(R.id.svBody) CustomScrollView mCustomScrollView;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -70,6 +93,9 @@ public class HomeMemberAdd extends CustomActivity implements View.OnClickListene
         View viewToLoad = LayoutInflater.from(act).inflate(R.layout.homemember_add, null);
         this.setContentView(viewToLoad);
 
+        // annotation 사용을 위해 bind.
+        ButterKnife.bind(this);
+
         setToolbar();
         displayListView();
     }
@@ -121,12 +147,71 @@ public class HomeMemberAdd extends CustomActivity implements View.OnClickListene
                         return false;
                     }
                 });
+
+        // TODO: 2017-04-05 하드코딩 변경 필요
+        List<String> quizList = Arrays.asList(
+                "초대한 사람의 생일은?",
+                "초대받은 사람의 생일은?",
+                "우리 집 막내 생일은?",
+                "우리 아버지 생일은?",
+                "우리 결혼기념일은?",
+                "퀴즈 직접 입력하기"
+        );
+        mLinearLayoutManager = new LinearLayoutManager(this);
+        mQuizList.setLayoutManager(mLinearLayoutManager);
+        mHomeMemberAddMenuAdapter = new HomeMemberAddMenuAdapter(this, quizList, mQuizOnClickListener);
+        mQuizList.setAdapter(mHomeMemberAddMenuAdapter);
+    }
+
+    private View.OnClickListener mQuizOnClickListener = new View.OnClickListener() {
+
+        @Override
+        public void onClick(View view) {
+            mQuestion.setText(((TextView) view).getText());
+            // TODO: 2017-04-05 하드코딩 변경 필요
+            if (((TextView) view).getText().equals("퀴즈 직접 입력하기")) {
+                mQuizLayout.setVisibility(View.VISIBLE);
+                mCustomScrollView.post(new Runnable() {
+                    @Override
+                    public void run() {
+                        mCustomScrollView.fullScroll(ScrollView.FOCUS_DOWN);
+                    }
+                });
+
+            } else {
+                mQuizLayout.setVisibility(View.GONE);
+            }
+            showSlidingMenu();
+        }
+    };
+
+    private void showSlidingMenu() {
+        if (mSlidingMenu.getVisibility() == View.GONE) {
+
+            Animation bottomUp = AnimationUtils.loadAnimation(this,
+                    R.anim.bottom_up);
+
+            mSlidingMenu.startAnimation(bottomUp);
+            mSlidingMenu.setVisibility(View.VISIBLE);
+        } else {
+
+            Animation bottomDown = AnimationUtils.loadAnimation(this,
+                    R.anim.bottom_down);
+
+            mSlidingMenu.startAnimation(bottomDown);
+            mSlidingMenu.setVisibility(View.GONE);
+        }
+    }
+
+    @OnClick({R.id.btnClose, R.id.llSlidingMenu})
+    public void clickClose() {
+        showSlidingMenu();
     }
 
     @Override
     public void onClick(View view) {
 
-        util.getView(act, R.id.rlQuestion).clearFocus();
+//        util.getView(act, R.id.rlQuestion).clearFocus();
         switch (view.getId()) {
             case R.id.llBtn1:
                 view.setEnabled(false);
@@ -171,7 +256,8 @@ public class HomeMemberAdd extends CustomActivity implements View.OnClickListene
 
                 break;
             case R.id.rlQuestion:
-                util.getView(act, R.id.rlQuestion).requestFocus();
+                showSlidingMenu();
+//                util.getView(act, R.id.rlQuestion).requestFocus();
                 break;
             case R.id.tvValueDate:
                 DialogDate dp1 = new DialogDate(act);

+ 130 - 0
onecable/src/main/java/com/ntels/onecable/view/homemember/HomeMemberAddMenuAdapter.java

@@ -0,0 +1,130 @@
+package com.ntels.onecable.view.homemember;
+
+import com.ntels.onecable.R;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+/**
+ * <pre>
+ * 1. ClassName :   HomeMemberAddMenuAdapter
+ * 2. FileName  :   HomeMemberAddMenuAdapter.java
+ * 3. Package   :   com.ntels.onecable.view.homemember
+ * 4. Date      :   2017-04-05
+ * 5. Author    :   aaron
+ * 6. Comment   :   Initialize
+ * </pre>
+ */
+
+public class HomeMemberAddMenuAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+
+    private Context mContext;
+    private List<String> mQuizList;
+    private View.OnClickListener mQuizOnClickListener;
+
+    HomeMemberAddMenuAdapter(Context context, List<String> quizList, View.OnClickListener quizOnClickListener) {
+        this.mContext = context;
+        this.mQuizList = quizList;
+        this.mQuizOnClickListener = quizOnClickListener;
+    }
+
+    /**
+     * Called when RecyclerView needs a new {@link ViewHolder} of the given type to represent
+     * an item.
+     * <p>
+     * This new ViewHolder should be constructed with a new View that can represent the items
+     * of the given type. You can either create a new View manually or inflate it from an XML
+     * layout file.
+     * <p>
+     * The new ViewHolder will be used to display items of the adapter using
+     * {@link #onBindViewHolder(ViewHolder, int, List)}. Since it will be re-used to display
+     * different items in the data set, it is a good idea to cache references to sub views of
+     * the View to avoid unnecessary {@link View#findViewById(int)} calls.
+     *
+     * @param parent   The ViewGroup into which the new View will be added after it is bound to
+     *                 an adapter position.
+     * @param viewType The view type of the new View.
+     * @return A new ViewHolder that holds a View of the given view type.
+     * @see #getItemViewType(int)
+     * @see #onBindViewHolder(ViewHolder, int)
+     */
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_homemember_add_menu, parent, false);
+        TextView tvQuiz = ButterKnife.findById(view, R.id.tvQuiz);
+        tvQuiz.setOnClickListener(mQuizOnClickListener);
+        return new ItemViewHolder(view);
+    }
+
+    /**
+     * Called by RecyclerView to display the data at the specified position. This method should
+     * update the contents of the {@link ViewHolder#itemView} to reflect the item at the given
+     * position.
+     * <p>
+     * Note that unlike {@link ListView}, RecyclerView will not call this method
+     * again if the position of the item changes in the data set unless the item itself is
+     * invalidated or the new position cannot be determined. For this reason, you should only
+     * use the <code>position</code> parameter while acquiring the related data item inside
+     * this method and should not keep a copy of it. If you need the position of an item later
+     * on (e.g. in a click listener), use {@link ViewHolder#getAdapterPosition()} which will
+     * have the updated adapter position.
+     *
+     * Override {@link #onBindViewHolder(ViewHolder, int, List)} instead if Adapter can
+     * handle efficient partial bind.
+     *
+     * @param holder   The ViewHolder which should be updated to represent the contents of the
+     *                 item at the given position in the data set.
+     * @param position The position of the item within the adapter's data set.
+     */
+    @Override
+    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
+        if (holder instanceof ItemViewHolder) {
+            ItemViewHolder itemViewHolder = (ItemViewHolder) holder;
+            itemViewHolder.tvQuiz.setText(mQuizList.get(position));
+        }
+    }
+
+    /**
+     * Returns the total number of items in the data set held by the adapter.
+     *
+     * @return The total number of items in this adapter.
+     */
+    @Override
+    public int getItemCount() {
+        return mQuizList.size();
+    }
+
+    /**
+     * 1. ClassName :   ItemViewHolder
+     * 2. FileName  :   HomeMemberAddMenuAdapter.java
+     * 3. Package   :   com.ntels.onecable.view.homemember
+     * 4. Date      :   2017-04-05
+     * 5. Author    :   aaron
+     * 6. Comment   :   Initialize
+     */
+    public static class ItemViewHolder extends RecyclerView.ViewHolder {
+
+        @BindView(R.id.tvQuiz) public TextView tvQuiz;
+
+        /**
+         * 생성자.
+         *
+         * @param itemView Item view holder에 사용 할 view.
+         */
+        public ItemViewHolder(View itemView) {
+
+            super(itemView);
+            ButterKnife.bind(this, itemView);
+        }
+    }
+}

+ 9 - 0
onecable/src/main/res/anim/bottom_down.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+  <translate
+          android:fromYDelta="0%p"
+          android:toYDelta="100%p"
+          android:fillAfter="true"
+          android:interpolator="@android:anim/linear_interpolator"
+          android:duration="500" />
+</set>

+ 8 - 0
onecable/src/main/res/anim/bottom_up.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+  <translate
+          android:fromYDelta="75%p"
+          android:toYDelta="0%p"
+          android:fillAfter="true"
+          android:duration="500" />
+</set>

BIN
onecable/src/main/res/drawable-xhdpi/common_bg_list_01.9.png


BIN
onecable/src/main/res/drawable-xhdpi/common_button_bg_press.9.png


BIN
onecable/src/main/res/drawable-xhdpi/img_popup_bg_dv.9.png


BIN
onecable/src/main/res/drawable-xhdpi/img_popup_bg_dv.png


BIN
onecable/src/main/res/drawable-xhdpi/img_popup_btn_dv.9.png


BIN
onecable/src/main/res/drawable-xhdpi/img_popup_btn_dv.png


+ 12 - 0
onecable/src/main/res/drawable/d_common_btn_bg.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (c) 2015. Ncomz. All Rights Reserved
+  -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+  <item android:drawable="@drawable/common_button_bg_press" android:state_pressed="true"/>
+  <item android:drawable="@drawable/common_button_bg_press" android:state_focused="true"/>
+  <item android:drawable="@drawable/common_button_bg"/>
+
+</selector>

+ 320 - 212
onecable/src/main/res/layout/homemember_add.xml

@@ -3,297 +3,405 @@
   ~ Copyright (c) 2015. Ncomz. All Rights Reserved
   -->
 
-<LinearLayout
+<RelativeLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@drawable/color_body_01"
-        android:fitsSystemWindows="true"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:orientation="vertical">
-
-    <include layout="@layout/app_toolbar"/>
+        android:layout_height="match_parent">
 
     <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"
-            android:orientation="vertical"
-    >
+            android:layout_height="match_parent"
+            android:background="@drawable/color_body_01"
+            android:fitsSystemWindows="true"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:orientation="vertical">
+
+        <include layout="@layout/app_toolbar"/>
 
-        <com.ntels.onecable.common.widget.CustomScrollView
-                android:id="@+id/svBody"
+        <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="0dp"
                 android:layout_weight="1"
-                android:fadingEdge="none">
+                android:orientation="vertical"
+        >
 
-            <LinearLayout
-                    android:id="@+id/llSvbody"
+            <com.ntels.onecable.common.widget.CustomScrollView
+                    android:id="@+id/svBody"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingBottom="18dp"
-                    android:orientation="vertical">
-
-                <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="18dp"
-                        android:paddingLeft="15dp"
-                        android:orientation="vertical">
-
-                    <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:includeFontPadding="false"
-                            android:textColor="@color/color_text_04"
-                            android:textSize="@dimen/size_font_03"
-                            android:text="@string/layout_homemember_add_09"/>
-                    <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_marginTop="18dp"
-                            android:includeFontPadding="false"
-                            android:text="@string/layout_homemember_add_08"
-                            android:textColor="@color/color_text_01"
-                            android:textSize="@dimen/size_font_02"
-                            android:textStyle="bold"
-                    />
-                </LinearLayout>
-
-                <LinearLayout
-                        android:id="@+id/llAdd"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:gravity="center_vertical"
-                        android:orientation="horizontal"
-                        android:layout_marginTop="18dp"
-                        android:paddingLeft="15dp"
-                        android:paddingRight="15dp">
-
-                    <EditText
-                            android:id="@+id/edtEmail"
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:layout_gravity="center_vertical"
-                            android:layout_weight="1"
-                            android:background="@drawable/d_img_input_round_bg"
-                            android:gravity="left|center_vertical"
-                            android:hint="@string/layout_homemember_add_02"
-                            android:imeOptions="actionDone"
-                            android:includeFontPadding="false"
-                            android:inputType="numberDecimal"
-                            android:maxLength="11"
-                            android:minHeight="40dp"
-                            android:paddingLeft="10dp"
-                            android:paddingRight="10dp"
-                            android:singleLine="true"
-                            android:textColor="@color/color_text_01"
-                            android:textColorHint="@color/color_text_03"
-                            android:textSize="@dimen/size_font_04">
-
-                    </EditText>
-
-                    <Button
-                            android:id="@+id/btnAdd"
-                            android:layout_width="40dp"
-                            android:layout_height="40dp"
-                            android:layout_marginLeft="7dp"
-                            android:background="@drawable/d_common_list_btn_add"/>
-
-                </LinearLayout>
-
-                <LinearLayout
-                        android:id="@+id/llContents"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:gravity="center_vertical"
-                        android:orientation="vertical">
-                </LinearLayout>
-
-
-                <View
-                        android:layout_marginTop="25dp"
-                        android:layout_marginBottom="23dp"
-                        style="@style/width_Divider_01"/>
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+                    android:fadingEdge="none">
 
                 <LinearLayout
+                        android:id="@+id/llSvbody"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
+                        android:paddingBottom="18dp"
                         android:orientation="vertical">
 
                     <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:gravity="center_vertical">
+                            android:layout_marginTop="18dp"
+                            android:paddingLeft="15dp"
+                            android:orientation="vertical">
 
                         <TextView
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:layout_marginLeft="15dp"
                                 android:includeFontPadding="false"
-                                android:text="@string/layout_homemember_add_03"
+                                android:textColor="@color/color_text_04"
+                                android:textSize="@dimen/size_font_03"
+                                android:text="@string/layout_homemember_add_09"/>
+                        <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="18dp"
+                                android:includeFontPadding="false"
+                                android:text="@string/layout_homemember_add_08"
                                 android:textColor="@color/color_text_01"
                                 android:textSize="@dimen/size_font_02"
                                 android:textStyle="bold"
                         />
                     </LinearLayout>
 
-
                     <LinearLayout
+                            android:id="@+id/llAdd"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginTop="23dp"
                             android:gravity="center_vertical"
-                            android:paddingLeft="10dp"
+                            android:orientation="horizontal"
+                            android:layout_marginTop="18dp"
+                            android:paddingLeft="15dp"
                             android:paddingRight="15dp">
 
-                        <ImageView
-                                android:layout_width="40dp"
-                                android:layout_height="33dp"
-                                android:background="@drawable/img_icon_calendar"/>
-
-                        <TextView
-                                android:layout_width="wrap_content"
+                        <EditText
+                                android:id="@+id/edtEmail"
+                                android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_marginLeft="10dp"
+                                android:layout_gravity="center_vertical"
+                                android:layout_weight="1"
+                                android:background="@drawable/d_img_input_round_bg"
+                                android:gravity="left|center_vertical"
+                                android:hint="@string/layout_homemember_add_02"
+                                android:imeOptions="actionDone"
                                 android:includeFontPadding="false"
-                                android:text="@string/layout_homemember_add_04"
+                                android:inputType="numberDecimal"
+                                android:maxLength="11"
+                                android:minHeight="40dp"
+                                android:paddingLeft="10dp"
+                                android:paddingRight="10dp"
+                                android:singleLine="true"
                                 android:textColor="@color/color_text_01"
-                                android:textSize="@dimen/size_font_04"
-                        />
+                                android:textColorHint="@color/color_text_03"
+                                android:textSize="@dimen/size_font_04">
+                        </EditText>
+
+                        <Button
+                                android:id="@+id/btnAdd"
+                                android:layout_width="40dp"
+                                android:layout_height="40dp"
+                                android:layout_marginLeft="7dp"
+                                android:background="@drawable/d_common_list_btn_add"/>
+
                     </LinearLayout>
 
                     <LinearLayout
+                            android:id="@+id/llContents"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:gravity="center_vertical"
-                            android:orientation="vertical"
-                            android:paddingLeft="15dp"
-                            android:paddingRight="15dp"
-                            android:layout_marginTop="20dp">
+                            android:orientation="vertical">
+                    </LinearLayout>
+
+
+                    <View
+                            android:layout_marginTop="25dp"
+                            android:layout_marginBottom="23dp"
+                            style="@style/width_Divider_01"/>
+
+                    <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="vertical">
+
+                        <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:gravity="center_vertical">
 
-                        <RelativeLayout
-                                android:id="@+id/rlQuestion"
+                            <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="15dp"
+                                    android:includeFontPadding="false"
+                                    android:text="@string/layout_homemember_add_03"
+                                    android:textColor="@color/color_text_01"
+                                    android:textSize="@dimen/size_font_02"
+                                    android:textStyle="bold"
+                            />
+                        </LinearLayout>
+
+
+                        <LinearLayout
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:focusableInTouchMode="true">
+                                android:layout_marginTop="23dp"
+                                android:gravity="center_vertical"
+                                android:paddingLeft="10dp"
+                                android:paddingRight="15dp">
+
+                            <ImageView
+                                    android:layout_width="40dp"
+                                    android:layout_height="33dp"
+                                    android:background="@drawable/img_icon_calendar"/>
 
                             <TextView
-                                    android:id="@+id/tvQuestion"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginLeft="10dp"
+                                    android:includeFontPadding="false"
+                                    android:text="@string/layout_homemember_add_04"
+                                    android:textColor="@color/color_text_01"
+                                    android:textSize="@dimen/size_font_04"
+                            />
+                        </LinearLayout>
+
+                        <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:gravity="center_vertical"
+                                android:orientation="vertical"
+                                android:paddingLeft="15dp"
+                                android:paddingRight="15dp"
+                                android:layout_marginTop="20dp">
+
+                            <RelativeLayout
+                                    android:id="@+id/rlQuestion"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:clickable="true">
+
+                                <TextView
+                                        android:id="@+id/tvQuestion"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:layout_gravity="center_vertical"
+                                        android:layout_weight="1"
+                                        android:background="@drawable/d_img_input_round_bg"
+                                        android:gravity="left|center_vertical"
+                                        android:hint="@string/layout_homemember_add_05"
+                                        android:includeFontPadding="false"
+                                        android:maxLength="60"
+                                        android:minHeight="40dp"
+                                        android:paddingLeft="10dp"
+                                        android:paddingRight="10dp"
+                                        android:duplicateParentState="true"
+                                        android:textColor="@color/color_text_01"
+                                        android:textColorHint="@drawable/d_font_color_font_03_color_font_02"
+                                        android:textSize="@dimen/size_font_04">
+                                </TextView>
+                                <ImageView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_alignParentRight="true"
+                                        android:layout_centerVertical="true"
+                                        android:layout_marginRight="10dp"
+                                        android:duplicateParentState="true"
+                                        android:src="@drawable/d_common_select_btn_icon"/>
+                            </RelativeLayout>
+                            <TextView
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginTop="13dp"
+                                    android:gravity="left"
+                                    android:includeFontPadding="false"
+                                    android:textColor="@color/color_text_01"
+                                    android:textSize="@dimen/size_font_04"
+                                    android:text="@string/layout_homemember_add_10"/>
+                            <LinearLayout
+                                    android:id="@+id/llQuiz"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:orientation="vertical"
+                                    android:visibility="gone">
+                                <EditText
+                                        android:id="@+id/edtQuiz"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginTop="18dp"
+                                        android:background="@drawable/d_img_input_round_bg"
+                                        android:gravity="left|center_vertical"
+                                        android:hint="@string/layout_homemember_add_13"
+                                        android:imeOptions="actionDone"
+                                        android:includeFontPadding="false"
+                                        android:inputType="text"
+                                        android:maxLength="20"
+                                        android:paddingLeft="15dp"
+                                        android:paddingRight="15dp"
+                                        android:singleLine="true"
+                                        android:textColor="@color/color_text_01"
+                                        android:textColorHint="@color/color_text_03"
+                                        android:textSize="@dimen/size_font_04">
+                                </EditText>
+                                <TextView
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginTop="13dp"
+                                        android:gravity="left"
+                                        android:includeFontPadding="false"
+                                        android:textColor="@color/color_text_04"
+                                        android:textSize="@dimen/size_font_04"
+                                        android:text="@string/layout_homemember_add_11"/>
+                                <TextView
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:layout_marginTop="12dp"
+                                        android:gravity="left"
+                                        android:includeFontPadding="false"
+                                        android:textColor="@color/color_text_01"
+                                        android:textSize="@dimen/size_font_04"
+                                        android:text="@string/layout_homemember_add_12"/>
+                            </LinearLayout>
+                            <TextView
+                                    android:id="@+id/tvValueDate"
                                     android:layout_width="match_parent"
                                     android:layout_height="wrap_content"
                                     android:layout_gravity="center_vertical"
+                                    android:layout_marginTop="18dp"
                                     android:layout_weight="1"
                                     android:background="@drawable/d_img_input_round_bg"
                                     android:gravity="left|center_vertical"
-                                    android:hint="@string/layout_homemember_add_05"
+                                    android:hint="@string/layout_homemember_add_06"
                                     android:includeFontPadding="false"
-                                    android:maxLength="60"
+                                    android:inputType="date"
                                     android:minHeight="40dp"
                                     android:paddingLeft="10dp"
                                     android:paddingRight="10dp"
-                                    android:duplicateParentState="true"
+                                    android:singleLine="true"
                                     android:textColor="@color/color_text_01"
-                                    android:textColorHint="@drawable/d_font_color_font_03_color_font_02"
-                                    android:textSize="@dimen/size_font_04">
-                            </TextView>
-                            <ImageView
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"
-                                    android:layout_alignParentRight="true"
-                                    android:layout_centerVertical="true"
-                                    android:layout_marginRight="10dp"
-                                    android:duplicateParentState="true"
-                                    android:src="@drawable/d_common_select_btn_icon"/>
-                        </RelativeLayout>
-                        <TextView
-                                android:id="@+id/tvValueDate"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_gravity="center_vertical"
-                                android:layout_marginTop="20dp"
-                                android:layout_weight="1"
-                                android:background="@drawable/d_img_input_round_bg"
-                                android:gravity="left|center_vertical"
-                                android:hint="@string/layout_homemember_add_06"
-                                android:includeFontPadding="false"
-                                android:inputType="date"
-                                android:minHeight="40dp"
-                                android:paddingLeft="10dp"
-                                android:paddingRight="10dp"
-                                android:singleLine="true"
-                                android:textColor="@color/color_text_01"
-                                android:textColorHint="@color/color_text_03"
-                                android:textSize="@dimen/size_font_04">
-
-                        </TextView>
+                                    android:textColorHint="@color/color_text_03"
+                                    android:textSize="@dimen/size_font_04"/>
+                        </LinearLayout>
                     </LinearLayout>
-                </LinearLayout>
 
-            </LinearLayout>
-        </com.ntels.onecable.common.widget.CustomScrollView>
-
-    </LinearLayout>
-
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
+                </LinearLayout>
+            </com.ntels.onecable.common.widget.CustomScrollView>
 
-        <View
-                style="@style/width_Divider_01"/>
+        </LinearLayout>
 
         <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="60dp"
-                android:layout_gravity="center_horizontal"
-                android:background="@drawable/color_bg_01"
-                android:gravity="center">
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
 
+            <View
+                    style="@style/width_Divider_01"/>
 
             <LinearLayout
-                    android:id="@+id/llBtn2"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:background="@drawable/common_button_bg"
-                    android:layout_weight="1"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:layout_gravity="center_horizontal"
+                    android:background="@drawable/color_bg_01"
                     android:gravity="center">
 
-                <TextView
-                        android:id="@+id/tvBtn2"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:background="@null"
-                        android:includeFontPadding="false"
-                        android:text="@string/layout_cancel"
-                        android:textColor="@drawable/d_font_color_font_01_color_font_02"
-                        android:textSize="@dimen/size_font_09"
-                        android:textStyle="bold"/>
+
+                <LinearLayout
+                        android:id="@+id/llBtn2"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:background="@drawable/d_common_btn_bg"
+                        android:layout_weight="1"
+                        android:gravity="center">
+
+                    <TextView
+                            android:id="@+id/tvBtn2"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:background="@null"
+                            android:includeFontPadding="false"
+                            android:text="@string/layout_cancel"
+                            android:textColor="@drawable/d_font_color_font_01_color_font_02"
+                            android:textSize="@dimen/size_font_09"
+                            android:textStyle="bold"/>
+                </LinearLayout>
+
+                <View
+                        style="@style/height_Divider_01"/>
+                <LinearLayout
+                        android:id="@+id/llBtn1"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:background="@drawable/d_common_btn_bg"
+                        android:layout_weight="1"
+                        android:gravity="center">
+
+                    <TextView
+                            android:id="@+id/tvBtn1"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:includeFontPadding="false"
+                            android:background="@null"
+                            android:text="@string/layout_ok"
+                            android:textColor="@color/color_text_04"
+                            android:textSize="@dimen/size_font_09"
+                            android:textStyle="bold"/>
+                </LinearLayout>
             </LinearLayout>
+        </LinearLayout>
+    </LinearLayout>
+    <LinearLayout
+            android:id="@+id/llSlidingMenu"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_alignParentBottom="true"
+            android:background="@color/transparent"
+            android:clickable="true"
+            android:visibility="gone">
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="324dp"
+                android:background="@drawable/color_popup_bg_body"
+                android:orientation="vertical"
+                android:layout_gravity="bottom">
 
-            <View
-                    style="@style/height_Divider_01"/>
             <LinearLayout
-                    android:id="@+id/llBtn1"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:background="@drawable/common_button_bg"
-                    android:layout_weight="1"
-                    android:gravity="center">
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"
+                    android:orientation="horizontal"
+                    android:gravity="center_vertical"
+                    android:background="@drawable/color_popup_bg_body">
 
                 <TextView
-                        android:id="@+id/tvBtn1"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
                         android:includeFontPadding="false"
-                        android:background="@null"
-                        android:text="@string/layout_ok"
-                        android:textColor="@color/color_text_04"
-                        android:textSize="@dimen/size_font_09"
-                        android:textStyle="bold"/>
+                        android:textSize="@dimen/size_font_02"
+                        android:textColor="@color/color_text_01"
+                        android:textStyle="bold"
+                        android:gravity="left|center_vertical"
+                        android:paddingLeft="25dp"
+                        android:text="@string/layout_homemember_add_14"/>
+
+                <Button
+                        android:id="@+id/btnClose"
+                        android:layout_width="50dp"
+                        android:layout_height="50dp"
+                        android:background="@drawable/d_common_head_btn_close"/>
+
             </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rcvList"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:paddingTop="4dp"
+                    android:background="@drawable/color_popup_bg_body"
+                    android:clipToPadding="false"/>
         </LinearLayout>
     </LinearLayout>
-</LinearLayout>
+
+</RelativeLayout>

+ 23 - 0
onecable/src/main/res/layout/row_homemember_add_menu.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (c) 2015. Ncomz. All Rights Reserved
+  -->
+
+<RelativeLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/color_popup_bg_body">
+
+    <TextView
+            android:id="@+id/tvQuiz"
+            android:layout_width="match_parent"
+            android:layout_height="45dp"
+            android:paddingLeft="25dp"
+            android:paddingRight="25dp"
+            android:gravity="left|center_vertical"
+            android:singleLine="true"
+            android:textColor="@color/color_text_01"
+            android:textSize="@dimen/size_font_03"/>
+
+</RelativeLayout>

+ 1 - 1
onecable/src/main/res/layout/things_device_add.xml

@@ -552,7 +552,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="50dp"
                 android:layout_gravity="center_horizontal"
-                android:background="@drawable/common_button_bg"
+                android:background="@drawable/d_common_btn_bg"
                 android:gravity="center">
 
             <LinearLayout

+ 5 - 0
onecable/src/main/res/values-en/strings_layout.xml

@@ -69,6 +69,11 @@
   <string name="layout_homemember_add_07"><![CDATA["Invite"]]></string>
   <string name="layout_homemember_add_08"><![CDATA["초대할 멤버의 휴대폰 번호"]]></string>
   <string name="layout_homemember_add_09"><![CDATA["멤버 초대는 초대한 시점부터 익일 오전 6시까지만 유효합니다."]]></string>
+  <string name="layout_homemember_add_10"><![CDATA["한번 설정된 퀴즈는 변경할수 없습니다."]]></string>
+  <string name="layout_homemember_add_11"><![CDATA["마스터에 의해 직접 입력된 인증 퀴즈는 비밀번호 찾기시에는 보안을 위해 문제를 보여드리지 않으니 참고하세요."]]></string>
+  <string name="layout_homemember_add_12"><![CDATA["*초대받은 멤버가 회원가입을 할때는 확인 가능\n*본인의 인증퀴즈는 나의 계정정보에서 확인 가능"]]></string>
+  <string name="layout_homemember_add_13"><![CDATA["퀴즈 질문을 직접 만들어 보세요."]]></string>
+  <string name="layout_homemember_add_14"><![CDATA["나의 인증 퀴즈를 선택하세요."]]></string>
 
   <string name="layout_message_center_01"><![CDATA["Message box"]]></string>
   <string name="layout_message_center_02"><![CDATA["View"]]></string>

+ 5 - 0
onecable/src/main/res/values/strings_layout.xml

@@ -70,6 +70,11 @@
   <string name="layout_homemember_add_07"><![CDATA["초대"]]></string>
   <string name="layout_homemember_add_08"><![CDATA["초대할 멤버의 휴대폰 번호"]]></string>
   <string name="layout_homemember_add_09"><![CDATA["멤버 초대는 초대한 시점부터 익일 오전 6시까지만 유효합니다."]]></string>
+  <string name="layout_homemember_add_10"><![CDATA["한번 설정된 퀴즈는 변경할수 없습니다."]]></string>
+  <string name="layout_homemember_add_11"><![CDATA["마스터에 의해 직접 입력된 인증 퀴즈는 비밀번호 찾기시에는 보안을 위해 문제를 보여드리지 않으니 참고하세요."]]></string>
+  <string name="layout_homemember_add_12"><![CDATA["*초대받은 멤버가 회원가입을 할때는 확인 가능\n*본인의 인증퀴즈는 나의 계정정보에서 확인 가능"]]></string>
+  <string name="layout_homemember_add_13"><![CDATA["퀴즈 질문을 직접 만들어 보세요."]]></string>
+  <string name="layout_homemember_add_14"><![CDATA["나의 인증 퀴즈를 선택하세요."]]></string>
 
   <string name="layout_message_center_01"><![CDATA["메시지 박스"]]></string>
   <string name="layout_message_center_02"><![CDATA["확인하기"]]></string>