From a6e108704c030ae941ab246b3a3a8a996fa16e8c Mon Sep 17 00:00:00 2001 From: GowoonJ Date: Mon, 16 Mar 2020 00:51:01 +0900 Subject: [PATCH 01/20] =?UTF-8?q?=EC=97=85=EB=AC=B4=20=EC=84=A4=EB=AA=85?= =?UTF-8?q?=20textView=20id=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Covey-android-app.iml | 235 ------------------ app/app.iml | 190 -------------- .../yapp/covey/activity/DetailActivity.java | 17 +- .../main/res/layout/layout_post_detail.xml | 7 +- 4 files changed, 6 insertions(+), 443 deletions(-) delete mode 100644 app/Covey-android-app.iml delete mode 100644 app/app.iml diff --git a/app/Covey-android-app.iml b/app/Covey-android-app.iml deleted file mode 100644 index c04da74..0000000 --- a/app/Covey-android-app.iml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/app.iml b/app/app.iml deleted file mode 100644 index c8eef6d..0000000 --- a/app/app.iml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - -======= ->>>>>>> test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - - - -======= - ->>>>>>> profile fragment -======= ->>>>>>> pull test -======= - ->>>>>>> profile - - \ No newline at end of file diff --git a/app/src/main/java/org/yapp/covey/activity/DetailActivity.java b/app/src/main/java/org/yapp/covey/activity/DetailActivity.java index ac3b1c0..d026d61 100644 --- a/app/src/main/java/org/yapp/covey/activity/DetailActivity.java +++ b/app/src/main/java/org/yapp/covey/activity/DetailActivity.java @@ -45,12 +45,7 @@ protected void onCreate(Bundle savedInstanceState) { binding.recyclerImage.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)); binding.recyclerImage.addItemDecoration(new ItemDecorationLinear(this,8f,3)); - binding.btnApply.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - clickApply(postId); - } - }); + binding.btnApply.setOnClickListener(view -> clickApply(postId)); } public void setButtonText(int activityCategory){ switch (activityCategory){ @@ -82,7 +77,6 @@ public void onResponse(Call call, Response respons imageUriList.add(itemPostData.getImg3()); setImageRecycler(imageUriList); setPostData(itemPostData); -// setButtonText(activityCategory); } else if (response.code() ==404){ Log.d(TAG, "code 404"); @@ -102,7 +96,7 @@ private void setPostData(ItemDataModel itemPostData){ binding.tvPay.setText("시급\t\t"+itemPostData.getPay()+"원"); binding.tvStartToEndDate.setText("일시\t\t"+itemPostData.getStartDate().substring(0,10)+" ~ "+itemPostData.getEndDate().substring(0,10)); binding.tvTime.setText("시간\t\t"+itemPostData.getWorkingTime()); - binding.tvContent.setText(itemPostData.getDescription()); + binding.tvDiscription.setText(itemPostData.getDescription()); binding.tvTitle.setText(itemPostData.getTitle()); } @@ -115,12 +109,7 @@ private void setImageRecycler(ArrayList imageList){ private void setCustomAppBar(){ CustomAppBar customAppBar = new CustomAppBar(this, getSupportActionBar()); customAppBar.setCustomAppBar("상세 정보"); - customAppBar.setBackClickListener(new CustomAppBar.backClickListener() { - @Override - public void onBackClick(View v) { - finish(); - } - }); + customAppBar.setBackClickListener(v -> finish()); } @SuppressLint("ResourceAsColor") public void clickApply(String postId){ diff --git a/app/src/main/res/layout/layout_post_detail.xml b/app/src/main/res/layout/layout_post_detail.xml index 035dc61..26df767 100644 --- a/app/src/main/res/layout/layout_post_detail.xml +++ b/app/src/main/res/layout/layout_post_detail.xml @@ -139,7 +139,7 @@ app:layout_constraintTop_toBottomOf="@+id/divider4" /> @@ -176,7 +175,7 @@ android:visibility="invisible" android:layout_marginTop="8dp" android:layout_marginBottom="37dp" - app:layout_constraintTop_toBottomOf="@id/tv_content" + app:layout_constraintTop_toBottomOf="@id/tv_discription" app:layout_constraintStart_toStartOf="@id/guideline_left" app:layout_constraintEnd_toEndOf="@id/guideline_right"/> From f2d0d424c08fa1e3a4a912fb2eb06f280917c29b Mon Sep 17 00:00:00 2001 From: GowoonJ Date: Mon, 16 Mar 2020 00:51:26 +0900 Subject: [PATCH 02/20] =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EC=97=B0=EA=B2=B0?= =?UTF-8?q?=EB=90=9C=20=EB=A6=AC=EC=82=AC=EC=9D=B4=ED=81=B4=EB=9F=AC?= =?UTF-8?q?=EB=B7=B0=20=EC=96=B4=EB=8C=91=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/yapp/covey/fragment/HomeFragment.java | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/org/yapp/covey/fragment/HomeFragment.java b/app/src/main/java/org/yapp/covey/fragment/HomeFragment.java index f4b57cb..af9f694 100644 --- a/app/src/main/java/org/yapp/covey/fragment/HomeFragment.java +++ b/app/src/main/java/org/yapp/covey/fragment/HomeFragment.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.Objects; import retrofit2.Call; import retrofit2.Callback; @@ -46,7 +47,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener{ private AdapterMoneyList adapterMoneyList = new AdapterMoneyList(); private ArrayList mArrayData = new ArrayList<>(); - Intent intentItemDetail; + private Intent intentItemDetail; private static final String TAG = "HOME"; @@ -77,22 +78,16 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, recyclerViewLocation.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.HORIZONTAL,false)); recyclerViewLocation.addItemDecoration(new ItemDecorationLinear(getContext(),rootView.getWidth()*0.044f, 8)); - adapterLocationPost.setOnItemClickListener(new AdapterLocationList.OnItemClickListener() { - @Override - public void onItemClick(View v, int position) { - intentItemDetail.putExtra("postId",adapterLocationPost.mDataList.get(position).getId()); - startActivity(intentItemDetail); - } + adapterLocationPost.setOnItemClickListener((v, position) -> { + intentItemDetail.putExtra("postId",adapterLocationPost.mDataList.get(position).getId()); + startActivity(intentItemDetail); }); recyclerViewLocation.setAdapter(adapterLocationPost); recyclerViewPay.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false)); - adapterMoneyList.setOnItemClickListener(new AdapterMoneyList.OnItemClickListener() { - @Override - public void onItemClick(View v, int position) { - intentItemDetail.putExtra("postId",adapterLocationPost.mDataList.get(position).getId()); - startActivity(intentItemDetail); - } + adapterMoneyList.setOnItemClickListener((v, position) -> { + intentItemDetail.putExtra("postId",adapterMoneyList.mDataList.get(position).getId()); + startActivity(intentItemDetail); }); recyclerViewPay.setAdapter(adapterMoneyList); @@ -101,14 +96,11 @@ public void onItemClick(View v, int position) { listViewCategory.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.HORIZONTAL,false)); listViewCategory.addItemDecoration(new ItemDecorationLinear(getContext(),4f, 8)); - adapterCategory.setOnItemClickListener(new AdapterCategoryList.OnItemClickListener() { - @Override - public void onItemClick(View v, int position) { - Intent intentMoreItem = new Intent(getContext(), MoreItemActivity.class); - intentMoreItem.putExtra("category",mArrayData.get(position)); - intentMoreItem.putExtra("categoryNum",3); - startActivity(intentMoreItem); - } + adapterCategory.setOnItemClickListener((v, position) -> { + Intent intentMoreItem = new Intent(getContext(), MoreItemActivity.class); + intentMoreItem.putExtra("category",mArrayData.get(position)); + intentMoreItem.putExtra("categoryNum",3); + startActivity(intentMoreItem); }); listViewCategory.setAdapter(adapterCategory); @@ -229,7 +221,7 @@ public void onClick(View view) { case R.id.btn_filter:{ // showBottomSheetFragment(view); FilterDialogFragment filterDialogFragment = new FilterDialogFragment(); - filterDialogFragment.show(getFragmentManager(),"filter"); + filterDialogFragment.show(Objects.requireNonNull(getFragmentManager()),"filter"); break; } case R.id.btn_upload:{ From 838e906f95e70959610f2ad913c46a4769a4deeb Mon Sep 17 00:00:00 2001 From: GowoonJ Date: Tue, 17 Mar 2020 01:15:39 +0900 Subject: [PATCH 03/20] replace lambda --- .../java/org/yapp/covey/fragment/FilterDialogFragment.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java b/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java index 37bc887..c33c9f7 100644 --- a/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java +++ b/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java @@ -22,12 +22,7 @@ public class FilterDialogFragment extends BottomSheetDialogFragment { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.layout_dialog_filter,container,false); - binding.tvCancel.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - dismiss(); - } - }); + binding.tvCancel.setOnClickListener(view -> dismiss()); return binding.getRoot(); } From fb84278bc77e2db5d06a753134e42132fb1d4eca Mon Sep 17 00:00:00 2001 From: GowoonJ Date: Tue, 17 Mar 2020 17:59:39 +0900 Subject: [PATCH 04/20] =?UTF-8?q?=EB=9D=BC=EB=94=94=EC=98=A4=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../covey/activity/ProfileEditActivity.java | 2 +- .../covey/fragment/FilterDialogFragment.java | 2 +- .../main/res/drawable/rectangle_outline.xml | 14 ++++++ .../res/drawable/rounded_rectangle_left.xml | 18 ++++++++ .../res/drawable/rounded_rectangle_right.xml | 18 ++++++++ .../main/res/layout/layout_dialog_filter.xml | 44 +++++++++++++++---- app/src/main/res/values/styles.xml | 9 ++++ 7 files changed, 97 insertions(+), 10 deletions(-) create mode 100644 app/src/main/res/drawable/rectangle_outline.xml create mode 100644 app/src/main/res/drawable/rounded_rectangle_left.xml create mode 100644 app/src/main/res/drawable/rounded_rectangle_right.xml diff --git a/app/src/main/java/org/yapp/covey/activity/ProfileEditActivity.java b/app/src/main/java/org/yapp/covey/activity/ProfileEditActivity.java index 626f8d9..13cc59f 100644 --- a/app/src/main/java/org/yapp/covey/activity/ProfileEditActivity.java +++ b/app/src/main/java/org/yapp/covey/activity/ProfileEditActivity.java @@ -137,7 +137,7 @@ public void onResponse(Call call, Response name.setText(response.body().getUser().getName()); age.setText(response.body().getUser().getAge()); phone.setText(response.body().getUser().getPhoneNum()); - if(response.body().getUser().getGender()) + if(response.body().getUser().isGender()) gender.setText("남"); else gender.setText("여"); diff --git a/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java b/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java index c33c9f7..3f0f9f7 100644 --- a/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java +++ b/app/src/main/java/org/yapp/covey/fragment/FilterDialogFragment.java @@ -21,8 +21,8 @@ public class FilterDialogFragment extends BottomSheetDialogFragment { @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.layout_dialog_filter,container,false); - binding.tvCancel.setOnClickListener(view -> dismiss()); +// binding.tvSetting.setOnClickListener(view -> ); return binding.getRoot(); } diff --git a/app/src/main/res/drawable/rectangle_outline.xml b/app/src/main/res/drawable/rectangle_outline.xml new file mode 100644 index 0000000..8795e71 --- /dev/null +++ b/app/src/main/res/drawable/rectangle_outline.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/rounded_rectangle_left.xml b/app/src/main/res/drawable/rounded_rectangle_left.xml new file mode 100644 index 0000000..969af2f --- /dev/null +++ b/app/src/main/res/drawable/rounded_rectangle_left.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/rounded_rectangle_right.xml b/app/src/main/res/drawable/rounded_rectangle_right.xml new file mode 100644 index 0000000..8f3aea9 --- /dev/null +++ b/app/src/main/res/drawable/rounded_rectangle_right.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/layout_dialog_filter.xml b/app/src/main/res/layout/layout_dialog_filter.xml index 9a5fce8..65e316f 100644 --- a/app/src/main/res/layout/layout_dialog_filter.xml +++ b/app/src/main/res/layout/layout_dialog_filter.xml @@ -2,6 +2,7 @@ - + app:layout_constraintEnd_toEndOf="@id/guideline_right"> + + + + + + + + + 15sp + +