Browse Source

Merge branch 'develop' of https://github.com/swict/LifeplusAndroid into develop

hyodong.min 6 years ago
parent
commit
22dc537442

+ 73 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/event/EventCombinedTwoLineSelectView.java

@@ -0,0 +1,73 @@
+package kr.co.zumo.app.lifeplus.view.custom.event;
+
+import android.content.Context;
+import android.support.constraint.ConstraintLayout;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.Checkable;
+import android.widget.TextView;
+
+import kr.co.zumo.app.R;
+
+/**
+ * EventCombinedTwoLineSelectView
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2019-02-14]   [최초 작성]
+ * @since 2019-02-14
+ */
+public class EventCombinedTwoLineSelectView extends ConstraintLayout implements Checkable {
+
+  private ConstraintLayout layoutBackground;
+  private TextView textViewTitle;
+  private TextView textViewSubTitle;
+  private OnClickListener listener;
+
+  public EventCombinedTwoLineSelectView(Context context) {
+    super(context);
+  }
+
+  public EventCombinedTwoLineSelectView(Context context, AttributeSet attrs) {
+    super(context, attrs);
+  }
+
+  public EventCombinedTwoLineSelectView(Context context, AttributeSet attrs, int defStyleAttr) {
+    super(context, attrs, defStyleAttr);
+  }
+
+
+  public void init(Context context, String title, String subTitle) {
+    if (null != context) {
+      LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+      inflater.inflate(R.layout.event_combined_two_line_select_view, this);
+      layoutBackground = findViewById(R.id.layout_background);
+      textViewTitle = findViewById(R.id.text_view_sub_title);
+      textViewSubTitle = findViewById(R.id.check_box);
+
+
+      layoutBackground.setOnClickListener(view -> {
+        if (null != listener) {
+          listener.onClick(this);
+        }
+      });
+    }
+  }
+
+  @Override
+  public void setChecked(boolean b) {
+
+  }
+
+  @Override
+  public boolean isChecked() {
+    return false;
+  }
+
+  @Override
+  public void toggle() {
+
+  }
+}

+ 5 - 0
app/src/main/res/drawable/event_select_view_two_line_selector.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:drawable="@drawable/rectangle_cffffff_radius_27" android:state_checked="true"/>
+  <item android:drawable="@drawable/rectangle_transparent_radius_27" android:state_checked="false"/>
+</selector>

+ 7 - 0
app/src/main/res/drawable/rectangle_cffffff_radius_27.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
+
+  <solid android:color="@color/CFFFFFF"/>
+  <corners
+    android:radius="27dp"/>
+</shape>

+ 9 - 0
app/src/main/res/drawable/rectangle_transparent_radius_27.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+
+  <solid android:color="@android:color/transparent"/>
+  <stroke android:color="@color/CFFFFFF" android:width="1dp"/>
+  <corners
+    android:radius="27dp"/>
+</shape>

+ 55 - 0
app/src/main/res/layout/event_combined_two_line_select_view.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+  android:id="@+id/layout_background"
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  xmlns:app="http://schemas.android.com/apk/res-auto"
+  xmlns:tools="http://schemas.android.com/tools"
+  android:layout_width="212dp"
+  android:layout_height="54dp"
+  tools:background="@drawable/rectangle_transparent_radius_27"
+  android:background="@drawable/rectangle_transparent_radius_27">
+
+  <TextView
+    android:id="@+id/text_view_title"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="10dp"
+    android:layout_marginTop="12dp"
+    android:layout_marginEnd="10dp"
+    android:layout_marginBottom="1dp"
+    android:ellipsize="end"
+    android:lineSpacingExtra="4sp"
+    android:singleLine="true"
+    android:textAlignment="center"
+    android:textColor="@color/C000000"
+    android:textSize="12sp"
+    app:layout_constrainedWidth="true"
+    app:layout_constraintBottom_toTopOf="@+id/text_view_sub_title"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"
+    tools:text="#매콤매콤한 소스의 닭요리#매콤매콤한 소스의 닭요리#매콤매콤한 소스의 닭요리#매콤매콤한 소스의 닭요리#매콤매콤한 소스의 닭요리#매콤매콤한 소스의 닭요리"
+    />
+
+  <TextView
+    android:id="@+id/text_view_sub_title"
+    android:layout_width="0dp"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="5dp"
+    android:layout_marginTop="1dp"
+    android:layout_marginEnd="5dp"
+    android:layout_marginBottom="11dp"
+    android:ellipsize="end"
+    android:lineSpacingExtra="4sp"
+    android:singleLine="true"
+    android:textAlignment="center"
+    android:textColor="@color/C999999"
+    android:textSize="11sp"
+    app:layout_constrainedWidth="true"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toBottomOf="@+id/text_view_title"
+    tools:text="특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!특별한 소스와 건강을 책임지는 요리!"
+    />
+</android.support.constraint.ConstraintLayout>

+ 1 - 1
app/src/main/res/layout/tutorial_listicle_cover.xml

@@ -64,7 +64,7 @@
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_marginStart="21dp"
-      android:layout_marginTop="8dp"
+      android:layout_marginTop="7dp"
       android:layout_marginEnd="27dp"
       android:lineSpacingExtra="4sp"
       android:text="@string/tutorial_listicle_cover_2"