|
|
@@ -3,6 +3,8 @@ package kr.co.zumo.app.lifeplus.view.dialog;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
|
+import android.support.constraint.ConstraintLayout;
|
|
|
+import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
@@ -11,6 +13,8 @@ import android.view.WindowManager;
|
|
|
import android.widget.ImageView;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
+import kr.co.zumo.app.lifeplus.view.custom.CustomSquareArrowCheckBox;
|
|
|
|
|
|
/**
|
|
|
* FirstCategoryFilterDialog
|
|
|
@@ -23,31 +27,73 @@ import kr.co.zumo.app.R;
|
|
|
* @since 2018-11-01
|
|
|
*/
|
|
|
|
|
|
-public class FirstCategoryFilterDialog extends DialogBase {
|
|
|
+public class CategoryMainFilterDialog extends DialogBase {
|
|
|
|
|
|
private ImageView imageViewCancel;
|
|
|
+ private ConstraintLayout layoutFilterMain;
|
|
|
+ private ConstraintLayout layoutFilterDetail;
|
|
|
+ private CustomSquareArrowCheckBox checkForeign;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
@Nullable
|
|
|
@Override
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
- return inflater.inflate(R.layout.dialog_first_category_detail_filter, container, false);
|
|
|
+ return inflater.inflate(R.layout.dialog_category_main, container, false);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onActivityCreated(Bundle savedInstanceState) {
|
|
|
super.onActivityCreated(savedInstanceState);
|
|
|
- //CustomSquareRadio customSquareRadio = view.findViewById(R.id.first);
|
|
|
-
|
|
|
//Full Screen dialog
|
|
|
Window window = getDialog().getWindow();
|
|
|
- window.setLayout(WindowManager.LayoutParams.MATCH_PARENT , WindowManager.LayoutParams.MATCH_PARENT);
|
|
|
- imageViewCancel = getView().findViewById(R.id.image_view_cancel);
|
|
|
+ window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
|
|
+
|
|
|
+ checkForeign = getView().findViewById(R.id.check_foreign);
|
|
|
+ layoutFilterMain = getView().findViewById(R.id.layout_filter_main);
|
|
|
+ layoutFilterDetail = getView().findViewById(R.id.layout_filter_detail);
|
|
|
+
|
|
|
+ imageViewCancel = getView().findViewById(R.id.image_view_cancel_main);
|
|
|
imageViewCancel.setOnClickListener(view -> {
|
|
|
if (null != getResultListener()) {
|
|
|
- getResultListener().onDialogCanceled(this);
|
|
|
+ getResultListener().onDialogCanceled(CategoryMainFilterDialog.this);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ checkForeign.setOnClickListener(view -> {
|
|
|
+ doPageSwitch();
|
|
|
+ });
|
|
|
+
|
|
|
+ getView().findViewById(R.id.text_view_contents_show_main).setOnClickListener(view -> {
|
|
|
+ if (null != getResultListener()) {
|
|
|
+ getResultListener().onDialogResult(CategoryMainFilterDialog.this, new Event.Builder(Event.CLOSE).build());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //콘텐츠 필터 상세화면 진입시 버튼 이벤트
|
|
|
+
|
|
|
+ getView().findViewById(R.id.image_view_cancel).setOnClickListener(view -> {
|
|
|
+ if (null != getResultListener()) {
|
|
|
+ getResultListener().onDialogCanceled(CategoryMainFilterDialog.this);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ getView().findViewById(R.id.image_view_back).setOnClickListener(view -> {
|
|
|
+ doPageSwitch();
|
|
|
+ });
|
|
|
+
|
|
|
+ getView().findViewById(R.id.text_view_confirm).setOnClickListener(view -> {
|
|
|
+ if (null != getResultListener()) {
|
|
|
+ getResultListener().onDialogResult(CategoryMainFilterDialog.this, new Event.Builder(Event.CLOSE).build());
|
|
|
}
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
+ private void doPageSwitch() {
|
|
|
+ Log.e("APP# CategoryMainFilterDialog | doPageSwitch", "|" + "들어옴");
|
|
|
+ layoutFilterMain.setVisibility(layoutFilterMain.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
|
|
|
+ layoutFilterDetail.setVisibility(layoutFilterDetail.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
|
|
|
|
|
|
}
|
|
|
|