Skip to content

Commit

Permalink
Merge pull request #118 from ChoSooMin/develop
Browse files Browse the repository at this point in the history
set MyArchiveList when add my new archive in CollectArchiveDialogFragment
  • Loading branch information
ChoSooMin authored Aug 12, 2019
2 parents be498e4 + 360e477 commit cae9bdc
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
Empty file added Icon
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ class CollectArchiveDialogFragment : BottomSheetDialogFragment() {

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.dialog_put_archive, container)

}


// @수민) 새 아카이브를 만들고 돌아오면 서버에서 데이터를 다시 받아와서 RecyclerView를 설정해준다.
override fun onResume() {
super.onResume()

repository.getMyPageMe()
.subscribe(
{
if(it.isNotEmpty()) {
collectArchiveListAdapter.dataList = it
collectArchiveListAdapter.notifyDataSetChanged()

linear_dialog_put_archive_make_new_archive.visibility=View.GONE
}
else{ // 내 아카이브가 없을 때
linear_dialog_put_archive_make_new_archive.visibility=View.VISIBLE
}
},
{
toast(R.string.network_error)
}
).apply { compositeDisposable.add(this) }
}

override fun onActivityCreated(savedInstanceState: Bundle?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class MyPageMeAdapter(val ctx: Context, var data:List<Archive>): RecyclerView.Ad
.load(cur.title_img_url)
.apply(defaultHolderOptions)
.into(it)

}

directory_name?.text=cur.title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@ class SignupPrivateActivity : BaseActivity() {
})

et_act_signup_private_birth.addTextChangedListener(object : TextWatcher {

var prevL = 0

override fun afterTextChanged(p0: Editable?) {

if ((prevL < p0?.length!!) && (p0?.length == 4 || p0?.length == 7)) {
p0.append('-')
}

}

override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {

prevL = et_act_signup_private_birth.text.toString().length

}

override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_make_new_archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
android:paddingRight="20dp"
android:paddingTop="15dp"
android:paddingBottom="300dp"
android:hint="브랜드 디자인"
android:hint="이름을 입력하세요"
android:textSize="14sp"
android:textColor="@color/black"
android:fontFamily="@font/nanum_barungothic_regular"
Expand Down

0 comments on commit cae9bdc

Please sign in to comment.