-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
786372615
committed
Aug 30, 2019
1 parent
712f4b4
commit 2a46548
Showing
29 changed files
with
508 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
resume/src/main/java/com/oo/resume/activity/EditBasicProfileActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.oo.resume.activity | ||
|
||
import android.os.Bundle | ||
import com.chenenyu.router.annotation.Route | ||
import com.oo.platform.view.BaseActivity | ||
import com.oo.resume.R | ||
import com.oo.resume.activity.router.RouteUrl | ||
import kotlinx.android.synthetic.main.activity_edit_basic_profile.* | ||
import kotlinx.android.synthetic.main.layout_edit_profile.view.* | ||
import kotlinx.android.synthetic.main.layout_normal_title_bar.* | ||
|
||
@Route(RouteUrl.EDIT_RESUME_BASE_INFO) | ||
class EditBasicProfileActivity : BaseActivity() { | ||
|
||
companion object { | ||
const val KEY_BASE_INFO = "KEY_BASE_INFO" | ||
} | ||
|
||
override fun getContentViewResId(): Int { | ||
return R.layout.activity_edit_basic_profile | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
initData() | ||
initViewState() | ||
bindListener() | ||
observeState() | ||
} | ||
|
||
|
||
private fun initData() { | ||
|
||
} | ||
|
||
private fun initViewState() { | ||
ll_name.tv_title.text = "姓名" | ||
ll_sex.tv_title.text = "性别" | ||
ll_phone.tv_title.text = "电话" | ||
ll_age.tv_title.text = "年龄" | ||
ll_email.tv_title.text = "邮箱" | ||
tv_title.text = "编辑个人信息" | ||
} | ||
|
||
private fun bindListener() { | ||
|
||
} | ||
|
||
private fun observeState() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
resume/src/main/java/com/oo/resume/activity/adapter/ResumeDetailAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package com.oo.resume.activity.adapter | ||
|
||
import com.chad.library.adapter.base.BaseViewHolder | ||
import com.chad.library.adapter.base.MultipleItemRvAdapter | ||
import com.chad.library.adapter.base.provider.BaseItemProvider | ||
import com.facebook.drawee.view.SimpleDraweeView | ||
import com.oo.resume.R | ||
import com.oo.resume.data.response.BaseInfoDTO | ||
|
||
|
||
class ResumeDetailAdapter : MultipleItemRvAdapter<Any, BaseViewHolder>(null) { | ||
|
||
|
||
init { | ||
finishInitialize() | ||
} | ||
|
||
override fun registerItemProvider() { | ||
mProviderDelegate.registerProvider(BasicInfoProvider()) | ||
} | ||
|
||
override fun getViewType(t: Any?): Int { | ||
return when (t) { | ||
t is BaseInfoDTO -> TYPE_BASIC_INFO | ||
|
||
else -> TYPE_BASIC_INFO | ||
} | ||
} | ||
|
||
companion object { | ||
const val TYPE_BASIC_INFO = 0X001 | ||
} | ||
|
||
|
||
|
||
fun addBasic(basic: BaseInfoDTO?) { | ||
if (basic != null) { | ||
getData().add(basic) | ||
} | ||
notifyDataSetChanged() | ||
} | ||
|
||
|
||
|
||
inner class BasicInfoProvider : BaseItemProvider<BaseInfoDTO, BaseViewHolder>() { | ||
override fun convert(helper: BaseViewHolder?, data: BaseInfoDTO?, position: Int) { | ||
if (helper == null || data == null) return | ||
helper.setText(R.id.tv_name, data.name ?: "") | ||
helper.getView<SimpleDraweeView>(R.id.sdv_avatar)?.setImageURI(data.avatar) | ||
helper.addOnClickListener(R.id.cl_basic_wrapper) | ||
} | ||
|
||
override fun viewType(): Int { | ||
return TYPE_BASIC_INFO | ||
} | ||
|
||
override fun layout(): Int { | ||
return R.layout.item_resume_detail_basic | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.