Skip to content

검색 시작 년도 및 마지막 년도 설정 기능 추가#12

Open
ho8278 wants to merge 1 commit into
boostcampth:masterfrom
ho8278:pullrequest
Open

검색 시작 년도 및 마지막 년도 설정 기능 추가#12
ho8278 wants to merge 1 commit into
boostcampth:masterfrom
ho8278:pullrequest

Conversation

@ho8278

@ho8278 ho8278 commented Jan 18, 2019

Copy link
Copy Markdown

개요

  • 영화 검색 시 년도 필터 생성

구현 방법

  • NumberPicker 위젯을 포함한 Custom Dialog생성

  • 데이터 바인딩을 이용해 년도 설정
    screenshot_1547819123
    screenshot_1547819130
    screenshot_1547819140

@ho8278 ho8278 changed the title 검색 시작년도 및 마지막년도 설정 기능 추가 검색 시작 년도 및 마지막 년도 설정 기능 추가 Jan 18, 2019
binding.yearFrom.setValue(2019);
binding.yearTo.setMinValue(1990);
binding.yearTo.setMaxValue(2019);
binding.yearTo.setValue(2019);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    binding.yearFrom.setMinValue(1990);
    binding.yearFrom.setMaxValue(2019);
    binding.yearFrom.setValue(2019);
    binding.yearTo.setMinValue(1990);
    binding.yearTo.setMaxValue(2019);
    binding.yearTo.setValue(2019);

최소값이 1990이 최대인가요??
나중에 수정이 용이하게 다른 파일에 값들을 지정하는것도 좋을 것같습니다.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 조언 감사합니다

import com.example.yeseul.movieapp.utils.BindingUtil;

public class NumberPickerDialog extends DialogFragment {
private MainContract.Presenter listener;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그냥 Dialog 대신 DialogFragment 를 이용할 때 얻을 수 있는 장점은 무엇인가요 ?

@ro0opf

ro0opf commented Jan 20, 2019

Copy link
Copy Markdown

'종료년도 >= 시작년도' 옵션이 추가되면 좋을 것 같습니다.

android:gravity="center"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="시작년도" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

시작년도종료년도 문자열을 strings.xml 에서 관리해도 좋을 것 같습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants