Browse Source

Task #258 [android] HiFive - Task 상세 구조 설계

http://www.junstarok.com/redmine/issues/258
sanghoonkwon 7 years ago
parent
commit
00c722740a

+ 0 - 155
app/src/main/java/kr/co/hanwha/hifive/dialog/HFWeekLoopDialog.java

@@ -1,155 +0,0 @@
-package kr.co.hanwha.hifive.dialog;
-
-import android.app.Dialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.StyleRes;
-import android.text.TextUtils;
-import android.view.View;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import kr.co.hanwha.hifive.R;
-
-/**
- * Created by sanghoonkwon on 2018. 1. 18..
- */
-
-public class HFWeekLoopDialog extends Dialog {
-
-    private TextView mTextViewMon;
-    private TextView mTextViewTue;
-    private TextView mTextViewWed;
-    private TextView mTextViewThu;
-    private TextView mTextViewFri;
-
-    private String mWeekLoop;
-
-    private OnDialogCallback mCallback;
-
-    public HFWeekLoopDialog(@NonNull Context context) {
-        super(context);
-    }
-
-    public HFWeekLoopDialog(@NonNull Context context, @StyleRes int themeResId) {
-        super(context, themeResId);
-    }
-
-    protected HFWeekLoopDialog(@NonNull Context context, boolean cancelable, @Nullable DialogInterface.OnCancelListener cancelListener) {
-        super(context, cancelable, cancelListener);
-    }
-
-    public HFWeekLoopDialog(@NonNull Context context, @Nullable String weekLoop, @Nullable OnDialogCallback callback) {
-        super(context, R.style.DialogFadeAnim);
-        setCancelable(true);
-        this.mWeekLoop = weekLoop;
-        this.mCallback = callback;
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.dialog_hf_week_loop);
-
-        mTextViewMon = (TextView) findViewById(R.id.mon_textView);
-        mTextViewTue = (TextView) findViewById(R.id.tue_textView);
-        mTextViewWed = (TextView) findViewById(R.id.wed_textView);
-        mTextViewThu = (TextView) findViewById(R.id.thu_textView);
-        mTextViewFri = (TextView) findViewById(R.id.fri_textView);
-
-        mTextViewMon.setOnClickListener(onClickListener);
-        mTextViewTue.setOnClickListener(onClickListener);
-        mTextViewWed.setOnClickListener(onClickListener);
-        mTextViewThu.setOnClickListener(onClickListener);
-        mTextViewFri.setOnClickListener(onClickListener);
-
-        findViewById(R.id.close_imageButton).setOnClickListener(onClickListener);
-        findViewById(R.id.confirm_textView).setOnClickListener(onClickListener);
-
-        //TODO - TEST
-        final EditText editText = (EditText)findViewById(R.id.editText);
-        editText.requestFocus();
-        editText.postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                InputMethodManager input = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-                input.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
-            }
-        }, 100);
-        //TODO _ TEST END
-
-        setWeekLoopButton();
-        setWeekLoop();
-    }
-
-    private void setWeekLoop() {
-        mWeekLoop = "0" +
-                (mTextViewMon.isSelected() ? "1" : "0") +
-                (mTextViewTue.isSelected() ? "1" : "0") +
-                (mTextViewWed.isSelected() ? "1" : "0") +
-                (mTextViewThu.isSelected() ? "1" : "0") +
-                (mTextViewFri.isSelected() ? "1" : "0") +
-                "0";
-    }
-
-    private void setWeekLoopButton() {
-        if (TextUtils.isEmpty(mWeekLoop)) return;
-        if (mWeekLoop.length() == 5)
-            mWeekLoop = "0" + mWeekLoop + "0";
-        mTextViewMon.setSelected("1".equals(mWeekLoop.substring(1, 2)));
-        mTextViewTue.setSelected("1".equals(mWeekLoop.substring(2, 3)));
-        mTextViewWed.setSelected("1".equals(mWeekLoop.substring(3, 4)));
-        mTextViewThu.setSelected("1".equals(mWeekLoop.substring(4, 5)));
-        mTextViewFri.setSelected("1".equals(mWeekLoop.substring(5, 6)));
-    }
-
-    /**************************************************
-     * View.OnClickListener
-     **************************************************/
-    View.OnClickListener onClickListener = new View.OnClickListener() {
-        @Override
-        public void onClick(View view) {
-            switch (view.getId()) {
-                case R.id.mon_textView:
-                    mTextViewMon.setSelected(!mTextViewMon.isSelected());
-                    setWeekLoop();
-                    break;
-                case R.id.tue_textView:
-                    mTextViewTue.setSelected(!mTextViewTue.isSelected());
-                    setWeekLoop();
-                    break;
-                case R.id.wed_textView:
-                    mTextViewWed.setSelected(!mTextViewWed.isSelected());
-                    setWeekLoop();
-                    break;
-                case R.id.thu_textView:
-                    mTextViewThu.setSelected(!mTextViewThu.isSelected());
-                    setWeekLoop();
-                    break;
-                case R.id.fri_textView:
-                    mTextViewFri.setSelected(!mTextViewFri.isSelected());
-                    setWeekLoop();
-                    break;
-                case R.id.close_imageButton:
-                    HFWeekLoopDialog.this.dismiss();
-                    break;
-                case R.id.confirm_textView:
-                    if (mCallback != null) mCallback.onConfirm(mWeekLoop);
-                    HFWeekLoopDialog.this.dismiss();
-                    break;
-            }
-        }
-    };
-
-    /**************************************************
-     * Callback
-     **************************************************/
-    public interface OnDialogCallback {
-        void onConfirm(@NonNull String week_loop);
-    }
-}

+ 1 - 1
app/src/main/res/drawable/round_count_background.xml

@@ -4,6 +4,6 @@
 
     <corners android:radius="8dp" />
     <solid android:color="#0c0c0c" />
-    <!--<solid android:color="@color/gw_green_13b3a9" />-->
+
 
 </shape>

+ 1 - 1
app/src/main/res/drawable/rounded_rectangle_tag_selected.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="@color/green_13b3a9" />
+    <solid android:color="@color/hf_blue" />
 
     <corners
         android:bottomLeftRadius="100dp"

+ 0 - 143
app/src/main/res/layout/dialog_hf_week_loop.xml

@@ -1,143 +0,0 @@
-<?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:background="@color/black_7b"
-    android:gravity="center"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="40dp"
-        android:background="@drawable/shape_box_round_white"
-        android:orientation="vertical">
-
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:minHeight="40dp">
-
-            <RelativeLayout
-                android:layout_width="1dp"
-                android:layout_height="1dp"
-                android:layout_marginLeft="50dp"
-                android:layout_marginTop="10dp">
-
-                <EditText
-                    android:id="@+id/editText"
-                    android:layout_width="1dp"
-                    android:layout_height="1dp"
-                    android:textColor="@android:color/transparent" />
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:background="@color/white" />
-            </RelativeLayout>
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                style="@style/font_notosans_r_14sp_000000"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_centerInParent="true"
-                android:layout_centerVertical="true"
-                android:gravity="center"
-                android:minHeight="40dp"
-                android:text="@string/add_task_set_repeat" />
-
-            <ImageButton
-                android:id="@+id/close_imageButton"
-                android:layout_width="40dp"
-                android:layout_height="40dp"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_weight="0"
-                android:background="@null"
-                android:padding="10dp"
-                android:scaleType="fitXY"
-                android:src="@mipmap/temp_gnb_ic_close" />
-        </RelativeLayout>
-
-        <include layout="@layout/view_line_default" />
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center"
-            android:orientation="horizontal"
-            android:paddingBottom="30dp"
-            android:paddingTop="16dp">
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/mon_textView"
-                style="@style/font_notosans_r_11sp_000000_button"
-                android:layout_width="36dp"
-                android:layout_height="36dp"
-                android:layout_marginRight="14dp"
-                android:background="@drawable/button_circle_bg"
-                android:gravity="center"
-                android:text="@string/add_task_week_monday" />
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/tue_textView"
-                style="@style/font_notosans_r_11sp_000000_button"
-                android:layout_width="36dp"
-                android:layout_height="36dp"
-                android:layout_marginRight="14dp"
-                android:background="@drawable/button_circle_bg"
-                android:gravity="center"
-                android:text="@string/add_task_week_tuesday" />
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/wed_textView"
-                style="@style/font_notosans_r_11sp_000000_button"
-                android:layout_width="36dp"
-                android:layout_height="36dp"
-                android:layout_marginRight="14dp"
-                android:background="@drawable/button_circle_bg"
-                android:gravity="center"
-                android:text="@string/add_task_week_wednesday" />
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/thu_textView"
-                style="@style/font_notosans_r_11sp_000000_button"
-                android:layout_width="36dp"
-                android:layout_height="36dp"
-                android:layout_marginRight="14dp"
-                android:background="@drawable/button_circle_bg"
-                android:gravity="center"
-                android:text="@string/add_task_week_thursday" />
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/fri_textView"
-                style="@style/font_notosans_r_11sp_000000_button"
-                android:layout_width="36dp"
-                android:layout_height="36dp"
-                android:background="@drawable/button_circle_bg"
-                android:gravity="center"
-                android:text="@string/add_task_week_friday" />
-
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="48dp"
-            android:layout_weight="0"
-            android:orientation="horizontal">
-
-            <kr.co.hanwha.hifive.view.FontTextView
-                android:id="@+id/confirm_textView"
-                style="@style/font_notosans_b_13sp_ffffff"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:background="@drawable/shape_button_bottom_black"
-                android:gravity="center"
-                android:text="@string/alert_confirm" />
-
-        </LinearLayout>
-
-    </LinearLayout>
-
-</LinearLayout>