70个文件已修改
12个文件已删除
193个文件已添加
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="$PROJECT_DIR$" vcs="Git" /> |
| | | </component> |
| | | </project> |
| | |
| | | android:name=".ui.home.ScannerActivity" |
| | | android:label="扫一扫" /> |
| | | |
| | | <activity android:name=".ui.home.StarActivity" android:label="星座运势"/> |
| | | <activity android:name=".ui.course.ReceiveGiftActivity" android:label="填写地址"/> |
| | | <activity android:name=".ui.discovery.VideoPlayerActivity" |
| | | android:configChanges="orientation|screenSize|keyboardHidden" |
| | |
| | | <activity android:name=".ui.discovery.DynamicActivity" android:label="动态详情"/> |
| | | <activity android:name=".ui.discovery.ReplyActivity" android:label="动态详情"/> |
| | | <activity android:name=".ui.discovery.PublishActivity" android:label="发布动态"/> |
| | | <activity android:name=".ui.discovery.MsgActivity" android:label="消息中心"/> |
| | | <activity android:name=".ui.discovery.MsgActivity" android:label="消息通知"/> |
| | | <activity android:name=".ui.mine.FeedbackActivity" android:label="反馈"/> |
| | | <activity android:name=".ui.mine.UseGuideActivity" android:label="使用指南"/> |
| | | <activity android:name=".ui.mine.SettingActivity" android:label="设置"/> |
| | | <activity android:name=".ui.mine.ChangePhoneActivity" android:label="修改绑定手机"/> |
| | | <activity android:name=".ui.mine.ChangePwdActivity" android:label="修改密码"/> |
| | | <activity android:name=".ui.mine.CollectedCourseActivity" android:label="收藏课程"/> |
| | | <activity android:name=".ui.mine.MyDynamicActivity" android:label="我的动态"/> |
| | | <activity android:name=".ui.mine.WalletActivity" /> |
| | | <activity android:name=".ui.mine.WithdrawRecordActivity" android:label="个人钱包"/> |
| | |
| | | <activity android:name=".ui.guide.Guide2Activity" /> |
| | | <activity android:name=".ui.guide.QAActivity" /> |
| | | <activity android:name=".ui.guide.TagActivity" /> |
| | | <activity android:name=".ui.home.SearchActivity" /> |
| | | <activity android:name=".ui.home.SearchResultActivity" /> |
| | | <activity android:name=".ui.home.TypeVoiceActivity" /> |
| | | <activity android:name=".ui.home.VoiceDetailActivity" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize"/> |
| | | <activity android:name=".ui.course.TypeCourserActivity" /> |
| | | <activity android:name=".ui.course.OfflineCourseActivity" android:configChanges="orientation|screenSize|keyboardHidden" android:label="课程详情"/> |
| | | <activity android:name=".ui.course.BuyCourseActivity" android:label="确认订单"/> |
| | | <activity android:name=".ui.discovery.SearchPlaceActivity" android:label="疗愈馆"/> |
| | | <activity android:name=".ui.discovery.PlaceDetailActivity" /> |
| | | <activity android:name=".ui.mine.WatchHisActivity" /> |
| | | <activity android:name=".ui.mine.VipActivity" /> |
| | | <activity android:name=".ui.mine.ServiceActivity" /> |
| | | <activity android:name=".ui.mine.QaDetailActivity" android:label="问题详情"/> |
| | | <activity android:name=".ui.mine.HasBuyActivity" /> |
| | | </application> |
| | | |
| | | </manifest> |
| | |
| | | override fun setContentView() = R.layout.activity_main |
| | | |
| | | private val fragments = arrayListOf<Fragment>() |
| | | var homeData: UserInfo? = null //个人信息 |
| | | |
| | | override fun initClick() { |
| | | } |
| | |
| | | titleBar.gone() |
| | | useWhiteTitle() |
| | | initTab() |
| | | EventBus.getDefault().register(this) |
| | | getData() |
| | | if (!intent.getStringExtra("code").isNullOrEmpty()){ |
| | | startActivity<ShareActivity>("code" to intent.getStringExtra("code")) |
| | | } |
| | |
| | | UltimateBar.with(this@MainActivity) |
| | | .statusDark(position != 0&&position!=1) |
| | | .create().immersionBar() //沉浸状态栏 |
| | | |
| | | if (position == 4){ |
| | | (fragments[4] as MineFragment).queryUnread() |
| | | } |
| | | } |
| | | |
| | | override fun onTabReselect(position: Int) { |
| | |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | | fun refreshUser(e:EmptyEvent){ |
| | | if (e.code == Const.EventCode.USER_INFO_CHANGED) |
| | | getData() |
| | | } |
| | | |
| | | private fun getData() { |
| | | HttpManager.getUserInfo().request(this){_,data-> |
| | | homeData = data |
| | | homeData?.apply { |
| | | SPUtils.instance().put(Const.User.USER_ID,id).put(Const.User.USER_PHONE,phone).apply() |
| | | //判断数据是否完善 |
| | | val isHint = SPUtils.instance().getBoolean("isHint") //true 已经提示过 |
| | | if (!isHint && (weight.isNullOrEmpty() || birthday.isNullOrEmpty() || height.isNullOrEmpty() || height.toInt() == 0 || waistline.isNullOrEmpty()|| waistline.toInt() == 0)) { |
| | | SPUtils.instance().put("isHint",true).apply() |
| | | TipDialog.show( |
| | | supportFragmentManager, |
| | | "完善身体数据后获得更好推荐", |
| | | object : TipDialog.OnClickCallback { |
| | | override fun onOk() { |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | } |
| | | }, |
| | | "现在就去", |
| | | "以后再去" |
| | | ) |
| | | } |
| | | } |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.REFRESH_USER_INFO)) |
| | | } |
| | | } |
| | | |
| | | override fun onResume() { |
| | | super.onResume() |
| | | if (tab_bar.currentTab == 2) |
| | | (fragments[2] as DiscoveryFragment).getUnread() |
| | | } |
| | | |
| | | |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | EventBus.getDefault().unregister(this) |
| | | if (view_pager.currentItem == 4){ |
| | | (fragments[4] as MineFragment).queryUnread() |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.os.Bundle |
| | | import android.view.Gravity |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.webkit.WebChromeClient |
| | | import androidx.fragment.app.DialogFragment |
| | | import cn.sinata.xldutils.utils.screenWidth |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_buy_rule.* |
| | | import org.jetbrains.anko.wrapContent |
| | | |
| | | class BuyRuleDialog: DialogFragment() { |
| | | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = |
| | | inflater.inflate(R.layout.dialog_buy_rule,container,false) |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | setStyle(STYLE_NO_FRAME, R.style.FadeDialog) |
| | | } |
| | | |
| | | private val rule by lazy { |
| | | arguments?.getString("rule")?:"" |
| | | } |
| | | private val title by lazy { |
| | | arguments?.getString("title")?:"" |
| | | } |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun onActivityCreated(savedInstanceState: Bundle?) { |
| | | super.onActivityCreated(savedInstanceState) |
| | | dialog?.window?.setLayout((screenWidth()*0.85).toInt(), wrapContent) |
| | | dialog?.window?.setGravity(Gravity.CENTER) |
| | | dialog?.setCanceledOnTouchOutside(false) |
| | | } |
| | | |
| | | |
| | | |
| | | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| | | super.onViewCreated(view, savedInstanceState) |
| | | val settings = sc_content.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | sc_content.webChromeClient = object : WebChromeClient() {} |
| | | sc_content.loadData(rule,"text/html; charset=utf-8", "utf-8") |
| | | tv_cancel.setOnClickListener { |
| | | callback?.onResult("refuse") |
| | | dismiss() |
| | | } |
| | | |
| | | tv_ok.setOnClickListener { |
| | | callback?.onResult("ok") |
| | | dismiss() |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import androidx.fragment.app.FragmentManager |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_choose_sex.* |
| | | |
| | | class ChoosSexDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_choose_sex |
| | | |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | override fun initView() { |
| | | tv_cancel.setOnClickListener { dismissAllowingStateLoss() } |
| | | tv_man.setOnClickListener { |
| | | callback?.onResult("1") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | tv_woman.setOnClickListener { |
| | | callback?.onResult("2") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | tv_hide.setOnClickListener { |
| | | callback?.onResult("3") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | } |
| | | |
| | | companion object{ |
| | | fun show(fm:FragmentManager,callback: StringCallback){ |
| | | val choosSexDialog = ChoosSexDialog() |
| | | choosSexDialog.callback = callback |
| | | choosSexDialog.showAllowingStateLoss(fm,"sex") |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.Comment |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.discovery.adapter.CommentAdapter |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_comment.* |
| | | |
| | | class CommentDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_comment |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | private val voiceId by lazy { arguments?.getString("id")?:"" } |
| | | private var page = 1 |
| | | private val list = arrayListOf<Comment>() |
| | | private val adapter = CommentAdapter(list) |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | iv_close.setOnClickListener { dismissAllowingStateLoss() } |
| | | rv_list.layoutManager = LinearLayoutManager(requireContext()) |
| | | rv_list.adapter = adapter |
| | | adapter.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | val commentLongClickDialog = CommentLongClickDialog() |
| | | commentLongClickDialog.callback = object :StringCallback{ |
| | | override fun onResult(_rst: String) { |
| | | report(list[rst.toInt()].id) |
| | | } |
| | | } |
| | | commentLongClickDialog.showAllowingStateLoss((requireContext() as BaseActivity).supportFragmentManager,"long") |
| | | } |
| | | } |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | getData() |
| | | } |
| | | |
| | | |
| | | fun report(id:String){ |
| | | val reportDialog = ReportDialog() |
| | | reportDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | HttpManager.report(id,rst).request(context as BaseActivity){_,_-> |
| | | val successDialog = SuccessDialog() |
| | | successDialog.showAllowingStateLoss((context as BaseActivity).supportFragmentManager,"suc") |
| | | } |
| | | } |
| | | } |
| | | reportDialog.showAllowingStateLoss((context as BaseActivity).supportFragmentManager,"report") |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.getMeditationQuestionPage(voiceId,page).request(requireActivity() as BaseActivity,success = { _, data-> |
| | | tv_title.text = "${data?.total}条提问" |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_comment_long_click.* |
| | | |
| | | class CommentLongClickDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_comment_long_click |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | tv_cancel.setOnClickListener { dismissAllowingStateLoss() } |
| | | tv_report.setOnClickListener { |
| | | callback?.onResult("report") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import androidx.core.os.bundleOf |
| | | import androidx.fragment.app.FragmentManager |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import kotlinx.android.synthetic.main.dialog_qr_code.* |
| | | |
| | | class QrcodeDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_qr_code |
| | | |
| | | override fun setGravity() = Gravity.CENTER |
| | | |
| | | override fun initView() { |
| | | tv_action.setOnClickListener { |
| | | dismissAllowingStateLoss() |
| | | } |
| | | iv_code.setImageURI(arguments?.getString("code")) |
| | | } |
| | | |
| | | companion object{ |
| | | fun show(fm:FragmentManager,code:String){ |
| | | val qrcodeDialog = QrcodeDialog() |
| | | qrcodeDialog.arguments = bundleOf("code" to code) |
| | | qrcodeDialog.showAllowingStateLoss(fm,"code") |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.os.Bundle |
| | | import android.view.Gravity |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import androidx.core.os.bundleOf |
| | | import androidx.fragment.app.DialogFragment |
| | | import android.widget.RadioButton |
| | | import androidx.fragment.app.FragmentManager |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import cn.sinata.xldutils.utils.screenWidth |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_report.* |
| | | import org.jetbrains.anko.wrapContent |
| | | import org.jetbrains.anko.support.v4.find |
| | | |
| | | class ReportDialog: DialogFragment() { |
| | | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = |
| | | inflater.inflate(R.layout.dialog_report,container,false) |
| | | class ReportDialog: BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_report |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | setStyle(STYLE_NO_FRAME, R.style.FadeDialog) |
| | | } |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | override fun onActivityCreated(savedInstanceState: Bundle?) { |
| | | super.onActivityCreated(savedInstanceState) |
| | | dialog?.window?.setLayout((screenWidth()*0.85).toInt(), wrapContent) |
| | | dialog?.window?.setGravity(Gravity.CENTER) |
| | | dialog?.setCanceledOnTouchOutside(false) |
| | | } |
| | | |
| | | |
| | | |
| | | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| | | super.onViewCreated(view, savedInstanceState) |
| | | tv_cancel.setOnClickListener { |
| | | dismiss() |
| | | } |
| | | |
| | | override fun initView() { |
| | | tv_action.setOnClickListener { |
| | | val content = et_content.text.toString() |
| | | if (content.isEmpty()) |
| | | myToast("请输入内容") |
| | | else{ |
| | | callback?.onResult(content) |
| | | dismiss() |
| | | } |
| | | val content = find<RadioButton>(rg_time.checkedRadioButtonId).text.toString() |
| | | callback?.onResult(content) |
| | | dismissAllowingStateLoss() |
| | | } |
| | | } |
| | | |
| | |
| | | const val TYPE_REPORT = 1 |
| | | const val TYPE_COMMENT = 2 |
| | | const val TYPE_REPLY = 3 |
| | | |
| | | fun show(fragmentManager: FragmentManager,callback: StringCallback){ |
| | | val riskDialog = ReportDialog() |
| | | riskDialog.callback = callback |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import androidx.core.os.bundleOf |
| | | import androidx.fragment.app.FragmentManager |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_send_confirm.* |
| | | |
| | | class SendConfirmDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_send_confirm |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | tv_action.setOnClickListener { |
| | | callback?.onResult("ok") |
| | | } |
| | | tv_price.text = arguments?.getString("price") |
| | | } |
| | | |
| | | companion object{ |
| | | fun show(fm:FragmentManager,price:String,callback: StringCallback){ |
| | | val sendConfirmDialog = SendConfirmDialog() |
| | | sendConfirmDialog.callback = callback |
| | | sendConfirmDialog.arguments = bundleOf("price" to price) |
| | | sendConfirmDialog.showAllowingStateLoss(fm,"send") |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_share.* |
| | | |
| | | class ShareDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_share |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | iv_close.setOnClickListener { dismissAllowingStateLoss() } |
| | | tv_cancel.setOnClickListener { dismissAllowingStateLoss() } |
| | | tv_wx.setOnClickListener { |
| | | callback?.onResult("wx") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | tv_wx.setOnClickListener { |
| | | callback?.onResult("circle") |
| | | dismissAllowingStateLoss() |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | val list = arrayListOf<String>() |
| | | val data = arguments?.getStringArrayList("data") |
| | | if (data.isNullOrEmpty()) |
| | | list.addAll(arrayListOf("男","女")) |
| | | list.addAll(arrayListOf("男","女","保密")) |
| | | else |
| | | list.addAll(data) |
| | | wv_1.setItems(list) |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.content.DialogInterface |
| | | import android.os.Bundle |
| | | import android.os.CountDownTimer |
| | | import android.view.Gravity |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import androidx.fragment.app.DialogFragment |
| | | import cn.sinata.xldutils.utils.screenWidth |
| | | import com.sinata.xqmuse.R |
| | | import kotlinx.android.synthetic.main.dialog_success.* |
| | | import org.jetbrains.anko.wrapContent |
| | | |
| | | class SuccessDialog: DialogFragment() { |
| | | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? = |
| | | inflater.inflate(R.layout.dialog_success,container,false) |
| | | |
| | | private val msg by lazy { //提示信息 |
| | | arguments?.getString("msg")?:"举报成功" |
| | | } |
| | | |
| | | private val countDownTimer by lazy { |
| | | object :CountDownTimer(2000,1000){ |
| | | override fun onFinish() { |
| | | dismiss() |
| | | } |
| | | |
| | | override fun onTick(millisUntilFinished: Long) { |
| | | tv_timer.text = "${(millisUntilFinished/1000)+1}s" |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | setStyle(STYLE_NO_FRAME,R.style.FadeDialog) |
| | | } |
| | | |
| | | override fun onActivityCreated(savedInstanceState: Bundle?) { |
| | | super.onActivityCreated(savedInstanceState) |
| | | dialog?.window?.setLayout((screenWidth()*0.85).toInt(), wrapContent) |
| | | dialog?.window?.setGravity(Gravity.CENTER) |
| | | dialog?.setCanceledOnTouchOutside(false) |
| | | } |
| | | |
| | | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| | | super.onViewCreated(view, savedInstanceState) |
| | | tv_title.text = msg |
| | | countDownTimer.start() |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.dialog_time_setting.* |
| | | import org.jetbrains.anko.textColorResource |
| | | import kotlin.math.max |
| | | |
| | | class TimeSettingDialog:BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_time_setting |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | var time = 10 |
| | | |
| | | var callback:StringCallback? = null |
| | | |
| | | override fun initView() { |
| | | rg_time.setOnCheckedChangeListener { group, checkedId -> |
| | | time = when(checkedId){ |
| | | R.id.rb_5->5 |
| | | R.id.rb_10->10 |
| | | R.id.rb_15->15 |
| | | R.id.rb_30->30 |
| | | R.id.rb_60->60 |
| | | R.id.rb_90->90 |
| | | R.id.rb_0->0 |
| | | else->-1 |
| | | } |
| | | if (time!=-1){ |
| | | tv_custom.textColorResource = R.color.textColor66 |
| | | tv_min.textColorResource = R.color.textColor66 |
| | | }else{ |
| | | tv_custom.textColorResource = R.color.colorPrimary |
| | | tv_min.textColorResource = R.color.colorPrimary |
| | | } |
| | | } |
| | | |
| | | tv_jia.setOnClickListener { |
| | | rg_time.check(-1) |
| | | val s = et_time.text.toString() |
| | | time = (if (s.isNullOrEmpty()) 0 else s.toInt())+1 |
| | | et_time.setText(time.toString()) |
| | | } |
| | | |
| | | tv_jian.setOnClickListener { |
| | | rg_time.check(-1) |
| | | val s = et_time.text.toString() |
| | | time = (if (s.isNullOrEmpty()) 0 else s.toInt()) |
| | | time = max(0,time) |
| | | et_time.setText(time.toString()) |
| | | } |
| | | |
| | | tv_action.setOnClickListener { |
| | | if (rg_time.checkedRadioButtonId != -1){ |
| | | callback?.onResult(time.toString()) |
| | | }else{ |
| | | val s = et_time.text.toString() |
| | | time = (if (s.isNullOrEmpty()) 0 else s.toInt()) |
| | | callback?.onResult(time.toString()) |
| | | } |
| | | dismissAllowingStateLoss() |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.dialog |
| | | |
| | | import android.view.Gravity |
| | | import com.sinata.xqmuse.R |
| | | |
| | | class VolumeDialog: BaseDialogFragment() { |
| | | override fun setContentView() = R.layout.dialog_set_volume |
| | | |
| | | override fun setGravity() = Gravity.BOTTOM |
| | | |
| | | override fun initView() { |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | interface ApiService { |
| | | @GET(Apis.H5_URL) |
| | | fun getH5(@Query("key") type: Int): Flowable<ResultData<H5Bean>> |
| | | fun getH5(@Query("key") type: Int,@Query("apipost_id") apipost_id: String = "2478a330b0e0e3"): Flowable<ResultData<H5Bean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryPhysical) |
| | |
| | | @POST(Apis.completeInfo) |
| | | fun completeInfo(@Field("courseId") id: String): Flowable<ResultData<FinishBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCourseList) |
| | | fun queryCourseList( |
| | | @Field("pageNum") page: Int, |
| | | @Field("difficulty1") difficulty1: String?, |
| | | @Field("positionName1") positionName1: String?, |
| | | @Field("time") time: String?, |
| | | @Field("typeIds1") typeIds1: String?, |
| | | @Field("courseName") search: String?, |
| | | @Field("pageSize") pageSize: Int = 10 |
| | | ): Flowable<ResultData<List<Course>>> |
| | | @Query("pageCurr") page: Int, |
| | | @Query("cateId") typeId: String?, |
| | | @Query("courseTitle") search: String?, |
| | | @Query("pageSize") pageSize: Int = 10, |
| | | @Query("apipost_id") apipost_id: String = "2d6f7f04f99813" |
| | | ): Flowable<ResultData<CourseListBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.myCourse) |
| | | fun myCourse( |
| | | @Field("pageNum") page: Int, |
| | | @Field("difficulty1") difficulty1: String?, |
| | | @Field("positionName1") positionName1: String?, |
| | | @Field("time") time: String?, |
| | | @Field("typeIds1") typeIds1: String?, |
| | | @Field("courseName") search: String?, |
| | | @Field("pageSize") pageSize: Int = 10 |
| | | ): Flowable<ResultData<List<Course>>> |
| | | @POST(Apis.getCoursePageList) |
| | | fun getCoursePageList( |
| | | @Query("apipost_id") apipost_id: String = "2d2eb9d23993c2" |
| | | ): Flowable<ResultData<TeacherBean>> |
| | | |
| | | @POST(Apis.getPayCourseInfoById) |
| | | fun getPayCourseInfoById( |
| | | @Query("id") id: String, |
| | | @Query("apipost_id") apipost_id: String = "2d2eb9d23993bd" |
| | | ): Flowable<ResultData<CourseDetail>> |
| | | |
| | | |
| | | |
| | | @FormUrlEncoded |
| | |
| | | @Field("courseId") id: String |
| | | ): Flowable<ResultData<CourseDetail>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.collectCourse) |
| | | fun collectCourse( |
| | | @Field("courseId") id: String |
| | | @Query("id") id: String, |
| | | @Query("apipost_id") apipost_id: String = "365e099b799885" |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.collectedCourse) |
| | | fun collectedCourse( |
| | | @Field("pageNum") page: Int, |
| | | @Field("courseName") search: String?, |
| | | @Field("positionName1") position: String?, |
| | | @Field("pageSize") pageSize: Int = 10 |
| | | ): Flowable<ResultData<List<Course>>> |
| | | |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.buyCourse) |
| | |
| | | fun getBankInfo( |
| | | ): Flowable<ResultData<BankInfo>> |
| | | |
| | | @POST(Apis.peopleList) |
| | | fun peopleList( |
| | | @POST(Apis.getCommissionRule) |
| | | fun shareInfo( |
| | | ): Flowable<ResultData<ShareInfo>> |
| | | |
| | | @POST |
| | | fun lookHistory( |
| | | @Url url: String, |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("state") state: Int, |
| | | @Query("apipost_id") apipost_id: String |
| | | ): Flowable<ResultData<CourseListBean>> |
| | | |
| | | @POST(Apis.getVipPrice) |
| | | fun getVipPrice( |
| | | @Query("apipost_id") apipost_id: String = "2fcbf1db399709" |
| | | ): Flowable<ResultData<VipPriceBean>> |
| | | |
| | | @POST(Apis.getVipContent) |
| | | fun getVipContent( |
| | | @Query("type") type: Int, |
| | | @Query("apipost_id") apipost_id: String = "2fcbf1db399709" |
| | | ): Flowable<ResultData<String>> |
| | | |
| | | @POST(Apis.getQrCode) |
| | | fun getQrCode( |
| | | @Query("apipost_id") apipost_id: String = "2fcbf1daf99704" |
| | | ): Flowable<ResultData<String>> |
| | | |
| | | @POST(Apis.commonQuestion) |
| | | fun commonQuestion( |
| | | @Query("pageCurr") pageNum: Int, |
| | | @Query("pageSize") size: Int, |
| | | @Query("apipost_id") apipost_id: String = "36618045f991c4" |
| | | ): Flowable<ResultData<QABean>> |
| | | |
| | | @POST(Apis.healingLevel) |
| | | fun healingLevel( |
| | | @Query("apipost_id") apipost_id: String = "34d924b4b991f0" |
| | | ): Flowable<ResultData<LevelBean>> |
| | | |
| | | @POST(Apis.queryNotice) |
| | | fun queryNotice( |
| | | @Query("apipost_id") apipost_id: String = "37771d0cf0e312" |
| | | ): Flowable<ResultData<Boolean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.withdrawalRecord) |
| | |
| | | @Field("sex") sex: Int? |
| | | ): Flowable<ResultData<WxLoginBean>> |
| | | |
| | | @POST(Apis.getBanner) |
| | | fun queryBanner(): Flowable<ResultData<ArrayList<Banner>>> |
| | | @GET(Apis.getBanner) |
| | | fun queryBanner(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993ba"): Flowable<ResultData<ArrayList<Banner>>> |
| | | |
| | | @GET(Apis.getCourseCategoryList) |
| | | fun getCourseCategoryList(@Query("apipost_id")apipost_id:String = "2d2eb9d1f993bb"): Flowable<ResultData<ArrayList<CourseType>>> |
| | | |
| | | @POST(Apis.getList) |
| | | fun getList(): Flowable<ResultData<FilterBean>> |
| | |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e157" |
| | | ): Flowable<ResultData<List<HomeListBean>>> |
| | | |
| | | @GET(Apis.getHomeBackgroun) |
| | | fun getHomeBackgroun( |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e155" |
| | | ): Flowable<ResultData<List<BGMBean>>> |
| | | |
| | | @POST(Apis.getMeditationPageByCateId) |
| | | fun getMeditationPageByCateId( |
| | | @Query("cateId") cateId: String, |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15a" |
| | | ): Flowable<ResultData<SearchResult>> |
| | | |
| | | @GET(Apis.getMeditationDetails) |
| | | fun getMeditationDetails( |
| | | @Query("id") id: String, |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e158" |
| | | ): Flowable<ResultData<VoiceDetail>> |
| | | |
| | | @POST(Apis.favorite) |
| | | fun favorite( |
| | | @Query("id") id: String, |
| | | @Query("apipost_id") apipost_id: String = "2aa4e14ab0e159" |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @GET(Apis.getMeditationQuestionPage) |
| | | fun getMeditationQuestionPage( |
| | | @Query("id") id: String, |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15b" |
| | | ): Flowable<ResultData<VoiceCommentBean>> |
| | | |
| | | @GET(Apis.search) |
| | | fun search( |
| | | @Query("condition") condition: String, |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e160" |
| | | ): Flowable<ResultData<SearchResult>> |
| | | |
| | | @GET(Apis.getHotWordList) |
| | | fun getHotWordList( |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e156" |
| | | ): Flowable<ResultData<List<String>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.queryCouponPackage) |
| | | fun queryCouponPackage( |
| | |
| | | @Field("pageSize") pageSize: Int = Const.PAGE_SIZE |
| | | ): Flowable<ResultData<List<Coupon>>> |
| | | |
| | | @POST(Apis.getUserByPhone) |
| | | fun getUserByPhone( |
| | | @Query("phone") phone: String, |
| | | @Query("apipost_id") apipost_id: String = "2e763463799135" |
| | | ): Flowable<ResultData<UserInfo>> |
| | | |
| | | @POST(Apis.confirmOrder) |
| | | fun confirmOrder( |
| | | @Query("courseId") courseId: String, |
| | | @Query("apipost_id") apipost_id: String = "2d2eb9d1f993b9" |
| | | ): Flowable<ResultData<ConfirmOrder>> |
| | | |
| | | @POST(Apis.cancellation) |
| | | fun cancellation(): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.updateInfo) |
| | | fun updateInfo( |
| | | @Field("headImg") headImg: String?, |
| | | @Field("birthday") birthday: String?, |
| | | @Field("gender") gender: Int?, |
| | | @Field("height") height: Int?, |
| | | @Field("weight") weight: Double?, |
| | | @Field("waistline") waistline: Int?, |
| | | @Field("name") name: String? |
| | | @Query("avatar") headImg: String?, |
| | | @Query("birthday") birthday: String?, |
| | | @Query("company") company: String?, |
| | | @Query("education") education: String?, |
| | | @Query("email") email: String?, |
| | | @Query("gender") gender: Int?, |
| | | @Query("hometown") hometown: String?, |
| | | @Query("industry") industry: String?, |
| | | @Query("location") location: String?, |
| | | @Query("nickname") nickname: String?, |
| | | @Query("occupation") occupation: String?, |
| | | @Query("signature") signature: String?, |
| | | @Query("name") name: String?, |
| | | @Query("apipost_id") apipost_id: String = "2fc350e9b99599" |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | |
| | | @Field("pageSize") pageSize: Int = Const.PAGE_SIZE |
| | | ): Flowable<ResultData<List<ReplyComment>>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.report) |
| | | fun report( |
| | | @Field("id") id: String, |
| | | @Field("content") content: String, |
| | | @Field("type") type: Int |
| | | @Query("id") id: String, |
| | | @Query("reason") content: String, |
| | | @Query("apipost_id") apipost_id: String = "25c3e3d0b0e15e" |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | |
| | | @Field("replyUserId") replyUserId: String? |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.doLike) |
| | | fun doLike( |
| | | @Field("id") findId: String, |
| | | @Field("type") type: Int, |
| | | @Field("findCommentId") findCommentId: String? |
| | | @Query("id") findId: String, |
| | | @Query("apipost_id") apipost_id: String = "2aa4e14b30e165" |
| | | ): Flowable<ResultData<Any>> |
| | | |
| | | @FormUrlEncoded |
| | |
| | | @Field("id") id: String |
| | | ): Flowable<ResultData<Dynamic>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.messageList) |
| | | fun messageList( |
| | | @Field("pageNum") page: Int, |
| | | @Field("pageSize") pageSize: Int = Const.PAGE_SIZE): Flowable<ResultData<List<Msg>>> |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("apipost_id") apipost_id: String = "361bdf123992f9"): Flowable<ResultData<MsgListBean>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST(Apis.deleteFind) |
| | | fun deleteFind( |
| | | @Field("findId") findId: String): Flowable<ResultData<Any>> |
| | | |
| | | @POST(Apis.messageCount) |
| | | fun messageCount(): Flowable<ResultData<Int>> |
| | | @GET(Apis.getMeditationPage) |
| | | fun getMeditationPage( |
| | | @Query("name") name: String?, |
| | | @Query("lat") lat: Double?, |
| | | @Query("lon") lon: Double?, |
| | | @Query("pageCurr") pageCurr: Int, |
| | | @Query("pageSize") pageSize: Int, |
| | | @Query("apipost_id") apipost_id: String = "2d2eb5e7f991ab"): Flowable<ResultData<PlaceListBean>> |
| | | |
| | | @GET(Apis.getMeditationInfo) |
| | | fun getMeditationInfo( |
| | | @Query("id") id: String, |
| | | @Query("apipost_id") apipost_id: String = "2d2eb5e7b991aa"): Flowable<ResultData<Place>> |
| | | |
| | | @FormUrlEncoded |
| | | @POST |
| | |
| | | fun changeConstellation(@Field("consName") consName:String): Flowable<ResultData<Any>> |
| | | |
| | | @POST(Apis.getUserInfo) |
| | | fun getUserInfo(): Flowable<ResultData<UserInfo>> |
| | | fun getUserInfo(@Query("apipost_id") apipost_id: String = "300079e039993f"): Flowable<ResultData<MineInfo>> |
| | | |
| | | @POST(Apis.getUserDetail) |
| | | fun getUserDetail(@Query("apipost_id") apipost_id: String = "2fc350e9799588"): Flowable<ResultData<UserInfo>> |
| | | |
| | | @POST(Apis.getNotice) |
| | | fun getNotice(): Flowable<ResultData<Notice>> |
| | |
| | | const val getTodayMeditation = "meditation/client/meditation/home/getTodayMeditation" |
| | | const val getPersonalityPlan = "meditation/client/meditation/home/getPersonalityPlan" |
| | | const val getMeditationAndCateList = "meditation/client/meditation/home/getMeditationAndCateList" |
| | | const val search = "meditation/client/meditation/home/search" |
| | | const val getHotWordList = "meditation/client/meditation/home/getHotWordList" |
| | | const val getNotice = "base/appUser/getNotice" |
| | | const val getUserInfo = "base/appUser/userInfo" |
| | | const val constellation = "base/appUser/constellation" |
| | | const val setWeight = "base/appUser/setWeight" |
| | | const val changeConstellation = "base/appUser/changeConstellation" |
| | | const val getHomeBackgroun = "meditation/client/meditation/home/getHomeBackgroun" |
| | | const val getMeditationPageByCateId = "meditation/client/meditation/home/getMeditationPageByCateId" |
| | | const val getMeditationDetails = "meditation/client/meditation/home/getMeditationDetails" |
| | | const val favorite = "meditation/client/meditation/home/favorite" |
| | | const val getMeditationQuestionPage = "meditation/client/meditation/home/getMeditationQuestionPage" |
| | | const val doLike = "meditation/client/meditation/home/likeQuestion" |
| | | const val report = "meditation/client/meditation/home/report" |
| | | |
| | | |
| | | /** |
| | | * 我的 |
| | | */ |
| | | const val getUserInfo = "user/client/app-user/getUserInfo" |
| | | const val getUserDetail = "user/client/app-user/getUserDetail" |
| | | const val feedBack = "base/appUser/feedBack" |
| | | const val getPhone = "base/appUser/getPhone" |
| | | const val useGuide = "base/appUser/useGuide" |
| | | const val setUnit = "base/appUser/setUnit" |
| | | const val updatePhone = "base/appUser/updatePhone" |
| | | const val updateInfo = "base/appUser/updateUserInfo" |
| | | const val updateInfo = "/user/client/app-user/updateUserDetail" |
| | | const val wallet = "base/appUser/wallet" |
| | | const val cancellation = "base/appUser/deleteAppUser" |
| | | const val myCourse = "base/sports/myCourse" |
| | |
| | | const val getBankInfo = "base/appUser/getBankInfo" |
| | | const val getBindingUserName = "base/appUser/getBindingUserName" |
| | | const val binding = "base/appUser/binding" |
| | | const val peopleList = "base/appUser/peopleList" |
| | | const val getCommissionRule = "system/system/common-question/getCommissionRule" |
| | | const val lookHistory = "user/user/app-user-viewing-history/lookHistory" |
| | | const val myCollect = "course/client/course/course/myCollect" |
| | | const val myOrderCourse = "order/client/order/order/myOrderCourse" |
| | | const val getVipPrice = "system/system/vip-setting/getVipPrice" |
| | | const val getVipContent = "system/system/vip-setting/getVipContent" |
| | | const val getQrCode = "system/system/common-question/getQrCode" |
| | | const val commonQuestion = "system/system/common-question/commonQuestion" |
| | | const val healingLevel = "user/client/app-user/healingLevel" |
| | | const val queryNotice = "user/client/user/notice-record/queryNotice" |
| | | |
| | | |
| | | /** |
| | | * 课程 |
| | | */ |
| | | const val getBanner = "base/sports/getBanner" |
| | | const val getBanner = "course/client/course/course/getBannerList" |
| | | const val getList = "base/sports/getList" |
| | | const val queryCourseList = "base/sports/courseSearch" |
| | | const val getCourseCategoryList = "course/client/course/course/getCourseCategoryList" |
| | | const val queryCourseList = "course/client/course/course/getCoursePageList" |
| | | const val getCoursePageList = "course/client/course/tutor-special-column/getCoursePageList" |
| | | const val getPayCourseInfoById = "course/client/course/course/getPayCourseInfoById" |
| | | const val collectCourse = "course/client/course/course/collectCourse" |
| | | const val queryCourseInfo = "base/sports/courseDetail" |
| | | const val collectCourse = "base/sports/collectCourse" |
| | | const val buyCourse = "base/sports/buyCourse" |
| | | const val pay = "base/sports/pay" |
| | | const val order = "base/sports/order" |
| | |
| | | const val completeInfo = "base/sports/completeInfo" |
| | | const val clockIn = "base/sports/clockIn" |
| | | const val queryCouponPackage = "base/appUser/couponList" |
| | | const val getUserByPhone = "user/client/app-user/getUserByPhone" |
| | | const val confirmOrder = "course/client/course/course/confirmOrder" |
| | | |
| | | |
| | | /** |
| | | * 发现 |
| | | */ |
| | | const val getMeditationPage = "meditation/client/meditation/meditation/getMeditationPage" |
| | | const val getMeditationInfo = "meditation/client/meditation/meditation/getMeditationInfo" |
| | | const val messageCount = "base/find/messageCount" |
| | | const val findList = "base/find/findList" |
| | | const val noticeDetail = "account/base/exploreWP/noticeDetail" |
| | |
| | | const val findDetail = "base/find/findDetail" |
| | | const val findCommentList = "base/find/findCommentList" |
| | | const val findCommentListOne = "base/find/findCommentListOne" |
| | | const val report = "base/find/report" |
| | | const val addComment = "base/find/addComment" |
| | | const val doLike = "base/find/Like" |
| | | const val addFind = "base/find/addFind" |
| | | const val messageList = "base/find/messageList" |
| | | const val messageList = "user/client/user/notice-record/noticeList" |
| | | const val deleteFind = "base/appUser/deleteFind" |
| | | |
| | | } |
| | |
| | | import com.sinata.xqmuse.network.entity.* |
| | | import com.sinata.xqmuse.network.entity.req.ReqAnswer |
| | | import com.sinata.xqmuse.network.entity.req.ReqRegister |
| | | import com.sinata.xqmuse.ui.mine.WatchHisActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.pay.PayInfo |
| | | import io.reactivex.Flowable |
| | | import retrofit2.http.Field |
| | | |
| | | object HttpManager { |
| | | |
| | |
| | | |
| | | /** |
| | | * 获取h5 |
| | | * @param type 1=用户协议,2=隐私协议 |
| | | * @param type 1=用户协议,2=隐私协议 3=关于心泉 4=新手冥想指南 5=课程/冥想音频购买协议 |
| | | */ |
| | | fun getH5(type: Int): Flowable<ResultData<H5Bean>> { |
| | | return request().getH5(type) |
| | |
| | | */ |
| | | fun queryCourseList( |
| | | page: Int, |
| | | diff: String?, |
| | | positions: String?, |
| | | time: String?, |
| | | types: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().queryCourseList(page,diff,positions,time, types,search) |
| | | type: String? = null, |
| | | search: String? = null |
| | | ): Flowable<ResultData<CourseListBean>> { |
| | | return request().queryCourseList(page,type,search) |
| | | } |
| | | |
| | | /** |
| | | * 我的课程列表 |
| | | * 导师 |
| | | */ |
| | | fun myCourse( |
| | | page: Int, |
| | | diff: String?, |
| | | positions: String?, |
| | | time: String?, |
| | | types: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().myCourse(page,diff,positions,time, types,search) |
| | | fun getCoursePageList(): Flowable<ResultData<TeacherBean>> { |
| | | return request().getCoursePageList() |
| | | } |
| | | |
| | | /** |
| | | * 我的收藏课程列表 |
| | | * 课程详情 |
| | | */ |
| | | fun collectedCourse( |
| | | page: Int, |
| | | positionName1: String?, |
| | | search: String? |
| | | ): Flowable<ResultData<List<Course>>> { |
| | | return request().collectedCourse(page,search,positionName1) |
| | | fun getPayCourseInfoById(id: String): Flowable<ResultData<CourseDetail>> { |
| | | return request().getPayCourseInfoById(id) |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 课程详情 |
| | |
| | | /** |
| | | * 推广信息 |
| | | */ |
| | | fun peopleList(): Flowable<ResultData<ShareInfo>> { |
| | | return request().peopleList() |
| | | fun shareInfo(): Flowable<ResultData<ShareInfo>> { |
| | | return request().shareInfo() |
| | | } |
| | | |
| | | /** |
| | | * 我的课程列表 |
| | | */ |
| | | fun lookHistory(type: Int,page: Int,state:Int): Flowable<ResultData<CourseListBean>> { |
| | | val url = if (type == WatchHisActivity.WATCH_HIS) Apis.lookHistory else if (type == WatchHisActivity.COLLECTED) Apis.myCollect else Apis.myOrderCourse |
| | | val id = if (type == WatchHisActivity.WATCH_HIS) "361bdf123992fb" else if (type == WatchHisActivity.COLLECTED) "365e099bb9988b" else "365f4fc1b99030" |
| | | return request().lookHistory(url,page,10,state,id) |
| | | } |
| | | |
| | | fun getVipPrice(): Flowable<ResultData<VipPriceBean>> { |
| | | return request().getVipPrice() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param type 1=会员权益介绍 2=会员用户协议 3=续费管理说明 |
| | | */ |
| | | fun getVipContent(type: Int): Flowable<ResultData<String>> { |
| | | return request().getVipContent(type) |
| | | } |
| | | |
| | | fun getQrCode(): Flowable<ResultData<String>> { |
| | | return request().getQrCode() |
| | | } |
| | | |
| | | fun commonQuestion(page: Int): Flowable<ResultData<QABean>> { |
| | | return request().commonQuestion(page,10) |
| | | } |
| | | |
| | | fun healingLevel(): Flowable<ResultData<LevelBean>> { |
| | | return request().healingLevel() |
| | | } |
| | | |
| | | fun queryNotice(): Flowable<ResultData<Boolean>> { |
| | | return request().queryNotice() |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 轮播 |
| | | */ |
| | | fun getCourseCategoryList(): Flowable<ResultData<ArrayList<CourseType>>> { |
| | | return request().getCourseCategoryList() |
| | | } |
| | | |
| | | /** |
| | | * 筛选项 |
| | | */ |
| | | fun getList(): Flowable<ResultData<FilterBean>> { |
| | |
| | | } |
| | | |
| | | /** |
| | | * bgm |
| | | */ |
| | | fun getHomeBackgroun(): Flowable<ResultData<List<BGMBean>>> { |
| | | return request().getHomeBackgroun() |
| | | } |
| | | |
| | | /** |
| | | * 分类列表 |
| | | */ |
| | | fun getMeditationPageByCateId(typeId:String,page: Int): Flowable<ResultData<SearchResult>> { |
| | | return request().getMeditationPageByCateId(typeId,page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 音频详情 |
| | | */ |
| | | fun getMeditationDetails(id: String): Flowable<ResultData<VoiceDetail>> { |
| | | return request().getMeditationDetails(id) |
| | | } |
| | | |
| | | /** |
| | | * 音频收藏 |
| | | */ |
| | | fun favorite(id: String): Flowable<ResultData<Any>> { |
| | | return request().favorite(id) |
| | | } |
| | | |
| | | /** |
| | | * 评论列表 |
| | | */ |
| | | fun getMeditationQuestionPage(id: String,page: Int): Flowable<ResultData<VoiceCommentBean>> { |
| | | return request().getMeditationQuestionPage(id,page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | | * 搜索 |
| | | */ |
| | | fun search(key:String,page: Int,size: Int): Flowable<ResultData<SearchResult>> { |
| | | return request().search(key,page,size) |
| | | } |
| | | |
| | | /** |
| | | * 热搜列表 |
| | | */ |
| | | fun getHotWordList(): Flowable<ResultData<List<String>>> { |
| | | return request().getHotWordList() |
| | | } |
| | | |
| | | /** |
| | | * 获取String类型通用接口 |
| | | */ |
| | | fun queryString(url: String, map: HashMap<String, Any>): Flowable<ResultData<String>> { |
| | |
| | | */ |
| | | fun queryCouponPackage(type: Int,page: Int): Flowable<ResultData<List<Coupon>>> { |
| | | return request().queryCouponPackage(type, page) |
| | | } |
| | | |
| | | /** |
| | | * 用户查询 |
| | | */ |
| | | fun getUserByPhone(phone: String): Flowable<ResultData<UserInfo>> { |
| | | return request().getUserByPhone(phone) |
| | | } |
| | | |
| | | /** |
| | | * 确认订单 |
| | | */ |
| | | fun confirmOrder(id: String): Flowable<ResultData<ConfirmOrder>> { |
| | | return request().confirmOrder(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 消息列表 |
| | | */ |
| | | fun messageList(page: Int): Flowable<ResultData<List<Msg>>> { |
| | | return request().messageList(page) |
| | | fun messageList(page: Int): Flowable<ResultData<MsgListBean>> { |
| | | return request().messageList(page,Const.PAGE_SIZE) |
| | | } |
| | | |
| | | /** |
| | |
| | | return request().deleteFind(id) |
| | | } |
| | | |
| | | /** |
| | | * 疗愈馆 |
| | | */ |
| | | fun getMeditationPage(page: Int,name: String?,lat:Double?,lon:Double?): Flowable<ResultData<PlaceListBean>> { |
| | | return request().getMeditationPage(name,lat,lon,page,10) |
| | | } |
| | | |
| | | /** |
| | | * 未读数 |
| | | * 疗愈馆 |
| | | */ |
| | | fun messageCount(): Flowable<ResultData<Int>> { |
| | | return request().messageCount() |
| | | fun getMeditationInfo(id: String): Flowable<ResultData<Place>> { |
| | | return request().getMeditationInfo(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 更新用户信息 |
| | | */ |
| | | fun updateInfo(name: String?,gender:Int?,birthday: String?,weight: Double?,waistline: Int?,height: Int?,avatar: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(avatar,birthday, gender, height, weight, waistline,name) |
| | | fun updateInfo(headImg: String?, birthday: String?, company: String?,education: String?,email: String?,gender: Int?,hometown: String?,industry: String?, |
| | | location: String?,nickname: String?,occupation: String?, signature: String?,name: String?): Flowable<ResultData<Any>> { |
| | | return request().updateInfo(headImg, birthday, company, education, email, gender, hometown, industry, location, nickname, occupation, signature, name) |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 举报 |
| | | * @param type 类型 1 = 举报动态 2 = 举报评论 |
| | | */ |
| | | fun report(type: Int,id: String,content: String): Flowable<ResultData<Any>> { |
| | | return request().report(id, content, type) |
| | | fun report(id: String,content: String): Flowable<ResultData<Any>> { |
| | | return request().report(id, content) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 點贊 |
| | | */ |
| | | fun doLike(findId: String,type: Int,id:String?): Flowable<ResultData<Any>> { |
| | | return request().doLike(findId,type,id) |
| | | fun doLike(id:String): Flowable<ResultData<Any>> { |
| | | return request().doLike(id) |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | *用户信息 |
| | | */ |
| | | fun getUserInfo(): Flowable<ResultData<UserInfo>> { |
| | | fun getUserInfo(): Flowable<ResultData<MineInfo>> { |
| | | return request().getUserInfo() |
| | | } |
| | | |
| | | /** |
| | | *资料 |
| | | */ |
| | | fun getUserDetail(): Flowable<ResultData<UserInfo>> { |
| | | return request().getUserDetail() |
| | | } |
| | | |
| | | /** |
| | | *公告消息 |
| | | */ |
| | | fun getNotice(): Flowable<ResultData<Notice>> { |
New file |
| | |
| | | package com.sinata.xqmuse.network |
| | | |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | |
| | | data class TeacherBean( |
| | | val coverUrl: String, |
| | | val createBy: String, |
| | | val createTime: String, |
| | | val delFlag: Int, |
| | | val id: Int, |
| | | val list: List<CourseBean>, |
| | | val tutorIntroduction: String, |
| | | val updateBy: String, |
| | | val updateTime: String, |
| | | val videoUrl: String |
| | | ) |
| | | |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class BGMBean( |
| | | val audioFile: String, |
| | | val audioFileName: String, |
| | | val id: Int, |
| | | val imageUrl: String |
| | | ) |
| | |
| | | val typeId: String = "", |
| | | val content: String = "", |
| | | val title: String = "", |
| | | val courseId: String = "", |
| | | val buttonImage: String = "", |
| | | val pageName: String = "", |
| | | var height: Int = 0, |
| | | var width: Int = 0, |
| | | @SerializedName("img") |
| | | @SerializedName("imageUrl") |
| | | val url: String = "", |
| | | val backgroundImage: String = "" |
| | | ){ |
| | | fun jumpPage(context: Context){ |
| | | when(modelName){ |
| | | "首页"->EventBus.getDefault().post(EmptyEvent(Const.EventCode.SWITCH_HOME)) |
| | | "运动"->{ |
| | | if(pageName == "详情页") |
| | | context.startActivity<CourseDetailActivity>("id" to turnId) |
| | | } |
| | | "发现"->{ |
| | | when(pageName){ |
| | | "详情页"->context.startActivity<DynamicActivity>("id" to turnId) |
| | | "主页"->EventBus.getDefault().post(EmptyEvent(Const.EventCode.SWITCH_DISCOVERY)) |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.os.Parcelable |
| | | import kotlinx.android.parcel.Parcelize |
| | | |
| | | @Parcelize |
| | | data class ConfirmOrder( |
| | | val address: String, |
| | | val addressDetail: String, |
| | | val balance: String, |
| | | val briefIntroduction: String, |
| | | val cateId: Int, |
| | | val chargeType: Int, |
| | | val courseTitle: String, |
| | | val courseType: Int, |
| | | val coverUrl: String, |
| | | val createBy: String, |
| | | val createTime: String, |
| | | val description: String, |
| | | val detailUrl: String, |
| | | val generalPrice: String, |
| | | val id: String, |
| | | val latitude: Double, |
| | | val listingStatus: Int, |
| | | val longitude: Double, |
| | | val recommend: Int, |
| | | val sortNum: Int, |
| | | val tutor: String, |
| | | val wxQrCode: String |
| | | ):Parcelable |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.os.Parcelable |
| | | import kotlinx.android.parcel.Parcelize |
| | | |
| | | data class CourseListBean( |
| | | val list: List<CourseBean>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | | |
| | | @Parcelize |
| | | data class CourseBean( |
| | | val address: String, |
| | | val addressDetail: String, |
| | | val briefIntroduction: String, |
| | | val cateId: Int, |
| | | val chargeType: Int, |
| | | val count: Int, |
| | | val courseTitle: String, |
| | | val courseType: Int, |
| | | val coverUrl: String, |
| | | val description: String, |
| | | val detailUrl: String, |
| | | val generalPrice: Int, |
| | | val headers: ArrayList<String>?, |
| | | val id: String, |
| | | val iosPrice: Int, |
| | | val isBuy: Int, |
| | | val isVip: Int, |
| | | val latitude: Int, |
| | | val listingStatus: Int, |
| | | val longitude: Int, |
| | | val recommend: Int, |
| | | val sortNum: Int, |
| | | val tutor: String, |
| | | val wxQrCode: String |
| | | ): Parcelable |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.content.Context |
| | | import android.os.Parcelable |
| | | import com.sinata.xqmuse.ui.course.CourseDetailActivity |
| | | import com.sinata.xqmuse.ui.course.OfflineCourseActivity |
| | | import kotlinx.android.parcel.Parcelize |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.toast |
| | | |
| | | @Parcelize |
| | | data class CourseDetail( |
| | | val address: String, |
| | | val addressDetail: String, |
| | | val briefIntroduction: String, |
| | | val cateId: Int, |
| | | val chargeType: Int, |
| | | val count: Int, |
| | | val courseTitle: String, |
| | | val courseType: Int, |
| | | val coverUrl: String, |
| | | val description: String, |
| | | val detailUrl: String, |
| | | val generalPrice: String, |
| | | val headers: List<String>, |
| | | val id: String, |
| | | val isBuy: Int, |
| | | val isVip: Int, |
| | | val latitude: Int, |
| | | val list: List<Chapter>, |
| | | val list2: List<CourseBean>, |
| | | val listingStatus: Int, |
| | | val longitude: Int, |
| | | var recommend: Int, |
| | | val sortNum: Int, |
| | | val tutor: String, |
| | | val wxQrCode: String |
| | | ):Parcelable{ |
| | | fun goDetail(context: Context){ |
| | | if (courseType == 2){//线下课 |
| | | context.startActivity<OfflineCourseActivity>("data" to this) |
| | | }else if (chargeType == 2&&isVip != 1){ |
| | | context.toast("去开会员") |
| | | // context.startActivity<CourseDetailActivity>("data" to this) |
| | | }else{ |
| | | context.startActivity<CourseDetailActivity>("data" to this) |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Parcelize |
| | | data class Chapter( |
| | | val chapterTitle: String, |
| | | val courseId: Int, |
| | | val createBy: String, |
| | | val createTime: String, |
| | | val delFlag: Int, |
| | | val duration: Int, |
| | | val id: Int, |
| | | val isOver: Int, |
| | | val minuteLook: Int, |
| | | val realLearnedNum: Int, |
| | | val secondLook: Int, |
| | | val sortNum: Int, |
| | | val updateBy: String, |
| | | val updateTime: String, |
| | | val videoUrl: String, |
| | | val virtualLearnedNum: Int |
| | | ):Parcelable |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.os.Parcelable |
| | | import kotlinx.android.parcel.Parcelize |
| | | |
| | | @Parcelize |
| | | data class CourseType( |
| | | val id: String, |
| | | val imageUrl: String, |
| | | val name: String |
| | | ):Parcelable |
| | |
| | | data class HomeItem( |
| | | val clientMeditationVO: CommonItemBean, |
| | | val endPlayTime: String, |
| | | val id: Int, |
| | | val id: String, |
| | | val imageUrl: String, |
| | | val meditationId: Int, |
| | | val startPlayTime: String |
| | |
| | | |
| | | data class HomeListBean( |
| | | val clientMeditationCategoryVO: ClientMeditationCategoryVO?, |
| | | val clientMeditationVOList: List<CommonItemBean> |
| | | val clientMeditationVOList: ArrayList<CommonItemBean> |
| | | ) |
| | | |
| | | data class ClientMeditationCategoryVO( |
| | | val categoryName: String, |
| | | val description: String, |
| | | val firstIconUrl: String, |
| | | val id: Int, |
| | | val id: String, |
| | | val secondIconUrl: String, |
| | | val showType: Int |
| | | ) |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class LevelBean( |
| | | val content: String, |
| | | val differenceLevel: Int, |
| | | val growthValue: Int, |
| | | val level: Int, |
| | | val levelIcon: String, |
| | | val levelName: String, |
| | | val nextLevel: Int |
| | | ) |
| | |
| | | val categoryName: String, |
| | | val description: String, |
| | | val firstIconUrl: String, |
| | | val id: Int, |
| | | val id: String, |
| | | val secondIconUrl: String, |
| | | val showType: Int |
| | | ) |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class MineInfo( |
| | | val avatar: String, |
| | | val cellPhone: String, |
| | | val continuity: String, |
| | | val cumulative: String, |
| | | val id: Int, |
| | | val isVip: Int, |
| | | val level: Int, |
| | | val levelIcon: Int, |
| | | val levelName: Int, |
| | | val nickname: String, |
| | | val today: Int, |
| | | val vipExpireTime: String |
| | | ) |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class MsgListBean( |
| | | val list: List<Msg>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | | |
| | | data class Msg( |
| | | val appUserId: Int, |
| | | val content: String, |
| | | val findCommentId: String, |
| | | val findId: String, |
| | | val headImg: String, |
| | | val id: String, |
| | | val insertTime: String, |
| | | val isRead: Int, |
| | | val isTurn: Int, |
| | | val replayContent: String, |
| | | val title: String, |
| | | val type: Int, |
| | | val userName: String |
| | | val id: Int, |
| | | val meditationQuestionId: Int, |
| | | val noticeType: Int, |
| | | val readStatus: Int, |
| | | val time: String, |
| | | val title: String |
| | | ) |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | class PlaceListBean( |
| | | val list: List<Place>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | | |
| | | data class Place( |
| | | val address: String, |
| | | val addressDetail: String, |
| | | val briefIntroduction: String, |
| | | val businessHours: String, |
| | | val contactNumber: String, |
| | | val coverUrl: String, |
| | | val createBy: String, |
| | | val createTime: String, |
| | | val detailBannerUrl: String, |
| | | val distance: String, |
| | | val hallName: String, |
| | | val id: String, |
| | | val latitude: Int, |
| | | val listingStatus: Int, |
| | | val longitude: Int, |
| | | val sortNum: Int, |
| | | val updateBy: String, |
| | | val updateTime: String |
| | | ) { |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.os.Parcelable |
| | | import kotlinx.android.parcel.Parcelize |
| | | |
| | | data class QABean( |
| | | val list: List<QA>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | | |
| | | @Parcelize |
| | | data class QA( |
| | | val content: String, |
| | | val customerServiceQrCode: String, |
| | | val id: Int, |
| | | val questionDescription: String, |
| | | val questionName: String, |
| | | val type: Int |
| | | ):Parcelable |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class SearchResult( |
| | | val list: List<CommonItemBean>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class ShareInfo( |
| | | val code: String, |
| | | val content: String, |
| | | val id: String, |
| | | val invite: String?, |
| | | val people: String |
| | | val poster: String, |
| | | val proportion: Int, |
| | | val qrCode: String, |
| | | val rules: String |
| | | ) |
| | | |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | import android.os.Parcelable |
| | | import com.sinata.xqmuse.R |
| | | import kotlinx.android.parcel.Parcelize |
| | | |
| | | @Parcelize |
| | | data class UserInfo( |
| | | val age: String, |
| | | val birthday: String, |
| | | val bMI: String, |
| | | val bMIInfo: String, |
| | | val calorie: String, |
| | | val clockIn: Int, |
| | | val code: String, |
| | | val constellation: String, |
| | | var distanceBMI: String, |
| | | var distanceBefore: String, |
| | | var distanceTarget: String, |
| | | val gender: String, |
| | | val headImg: String, |
| | | var height: String, |
| | | val id: String, |
| | | val index: String, |
| | | var name: String, |
| | | val nowDate: String, |
| | | val percentage: String, |
| | | val recordTime: String, |
| | | val target: String, |
| | | val tips: String, |
| | | val unit: String, |
| | | val phone: String, |
| | | var waistline: String, |
| | | var weight: String, |
| | | val weightTrend: List<WeightTrend> |
| | | ):Parcelable{ |
| | | fun getLevelRes() = when(clockIn){ |
| | | in 0..9-> R.mipmap.xinren |
| | | in 10..29-> R.mipmap.qingtong |
| | | in 30..59-> R.mipmap.baiyin |
| | | in 60..89-> R.mipmap.huangjin |
| | | in 90..119-> R.mipmap.zuanshi |
| | | in 120..239-> R.mipmap.dashi |
| | | else -> R.mipmap.wangzhe |
| | | } |
| | | |
| | | fun getUnitName() = when(unit){ //1公斤 2斤 3磅 |
| | | "1"->"公斤" |
| | | "3"->"磅" |
| | | else->"斤" |
| | | } |
| | | } |
| | | |
| | | @Parcelize |
| | | data class WeightTrend( |
| | | val time: String, |
| | | val weight: Double |
| | | ):Parcelable |
| | | var appleId: String?, |
| | | var avatar: String?, |
| | | var balance: Int, |
| | | var birthday: String?, |
| | | var cellPhone: String?, |
| | | var company: String?, |
| | | var createBy: String?, |
| | | var createTime: String?, |
| | | var education: String?, |
| | | var email: String?, |
| | | var freezingOperator: String?, |
| | | var freezingReason: String?, |
| | | var gender: Int, |
| | | var hometown: String?, |
| | | var id: String, |
| | | var income: Int, |
| | | var industry: String?, |
| | | var inviteUserId: Int, |
| | | var isFirst: Int, |
| | | var levelSettingId: Int, |
| | | var location: String?, |
| | | var logoutTime: String?, |
| | | var nickname: String?, |
| | | var occupation: String?, |
| | | var registerTime: String?, |
| | | var sanskritFlag: Int, |
| | | var signTime: String?, |
| | | var signature: String?, |
| | | var tagId: String?, |
| | | var totalEnergyvarue: Int, |
| | | var updateBy: String?, |
| | | var updateTime: String?, |
| | | var userId: Int, |
| | | var userStatus: Int, |
| | | var vipExpireTime: String?, |
| | | var wxOpenId: String? |
| | | ):Parcelable |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class VipPriceBean( |
| | | val annualVip: Double, |
| | | val clientType: Int, |
| | | val content: String, |
| | | val monthlyVip: Double, |
| | | val quarterlyVip: Double, |
| | | val settingType: Int |
| | | ) |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class VoiceCommentBean( |
| | | val list: List<Comment>, |
| | | val pages: Int, |
| | | val total: Int |
| | | ) |
| | | |
| | | data class Comment( |
| | | val appUserId: Int, |
| | | val avatar: String, |
| | | val content: String, |
| | | val id: String, |
| | | var like: Int, |
| | | val likeCount: Int, |
| | | val nickname: String, |
| | | val publishTime: String, |
| | | val replyContent: String, |
| | | val replyTime: String |
| | | ) |
New file |
| | |
| | | package com.sinata.xqmuse.network.entity |
| | | |
| | | data class VoiceDetail( |
| | | val backgroundUrl: String, |
| | | val cateId: String, |
| | | val chargeType: Int, |
| | | val coverDescription: String, |
| | | val coverUrl: String, |
| | | val detailDescription: String, |
| | | var favorite: Int, |
| | | val favoriteCount: Int, |
| | | val iconUrl: String, |
| | | val id: String, |
| | | val listingStatus: Int, |
| | | val meditationMusicList: List<String>, |
| | | val meditationTitle: String, |
| | | val questionCount: String, |
| | | val realLearnedNum: Int, |
| | | val sanskrit: Int, |
| | | val sortNum: Int, |
| | | val tutorAudioUrl: String, |
| | | val virtualLearnedNum: Int |
| | | ) |
| | |
| | | package com.sinata.xqmuse.ui |
| | | |
| | | class BGMSettingActivity :TransparentStatusBarActivity(){ |
| | | override fun setContentView(): Int { |
| | | TODO("Not yet implemented") |
| | | } |
| | | import android.widget.SeekBar |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.BGMBean |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.home.adapter.BgmBannerAdapter |
| | | import com.sinata.xqmuse.utils.AudioUtils |
| | | import com.sinata.xqmuse.utils.Const |
| | | import kotlinx.android.synthetic.main.activity_bgm.* |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class BGMSettingActivity :TransparentStatusBarActivity(), AudioUtils.OnAudioStatusUpdateListener { |
| | | override fun setContentView() = R.layout.activity_bgm |
| | | |
| | | private val list = arrayListOf<BGMBean>() |
| | | private val cardBannerAdapter by lazy { BgmBannerAdapter(list,this) } |
| | | private val player by lazy { AudioUtils() } |
| | | |
| | | override fun initClick() { |
| | | TODO("Not yet implemented") |
| | | iv_back.setOnClickListener { finish() } |
| | | iv_silent.setOnClickListener { |
| | | sb_voice.progress = 0 |
| | | } |
| | | banner_landscape.setOnBannerListener { data, position -> |
| | | cardBannerAdapter.playPosition = position |
| | | cardBannerAdapter.notifyItemChanged(position) |
| | | player.startPlayMusic(this,list[position].audioFile) |
| | | } |
| | | sb_voice.setOnSeekBarChangeListener(object :SeekBar.OnSeekBarChangeListener{ |
| | | override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { |
| | | player.setVolume(progress.toFloat()/100) |
| | | } |
| | | |
| | | override fun onStartTrackingTouch(seekBar: SeekBar?) { |
| | | } |
| | | |
| | | override fun onStopTrackingTouch(seekBar: SeekBar?) { |
| | | } |
| | | }) |
| | | |
| | | tv_action.setOnClickListener { |
| | | SPUtils.instance().put(Const.User.VOLUME,sb_voice.progress).put(Const.User.BGM,list[banner_landscape.currentItem].audioFile).apply() |
| | | toast("保存成功") |
| | | player.startPlayMusic(this,list[banner_landscape.currentItem].audioFile) |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | TODO("Not yet implemented") |
| | | titleBar.gone() |
| | | banner_landscape.adapter = cardBannerAdapter |
| | | banner_landscape.setBannerGalleryEffect(110,12,0.85f) |
| | | player.setOnAudioStatusUpdateListener(this) |
| | | sb_voice.progress = SPUtils.instance().getInt(Const.User.VOLUME,50) |
| | | getData() |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.getHomeBackgroun().request(this){_,data-> |
| | | list.clear() |
| | | list.addAll(data?: arrayListOf()) |
| | | val bgm = SPUtils.instance().getString(Const.User.BGM) |
| | | val indexOf = list.map { it.audioFile }.indexOf(bgm) |
| | | if (indexOf>=0){ |
| | | banner_landscape.currentItem = indexOf |
| | | } |
| | | cardBannerAdapter.notifyDataSetChanged() |
| | | } |
| | | } |
| | | |
| | | override fun onUpdate(db: Double, time: Long) { |
| | | |
| | | } |
| | | |
| | | override fun onStop(filePath: String?) { |
| | | } |
| | | |
| | | override fun onStartPlay() { |
| | | } |
| | | |
| | | override fun onFinishPlay() { |
| | | val p = cardBannerAdapter.playPosition |
| | | cardBannerAdapter.playPosition = -1 |
| | | cardBannerAdapter.notifyItemChanged(p) |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import androidx.core.os.bundleOf |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.utils.isValidPhone |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.BuyRuleDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.ConfirmOrder |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_buy_course.* |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class BuyCourseActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_buy_course |
| | | |
| | | private val isSend by lazy { intent.getBooleanExtra("isSend",false) } |
| | | private val data by lazy { intent.getParcelableExtra<ConfirmOrder>("data") } |
| | | |
| | | override fun initClick() { |
| | | tv_search.setOnClickListener { |
| | | val phone = et_phone.text.toString() |
| | | if (!phone.isValidPhone()){ |
| | | toast("手机号输入有误") |
| | | }else{ |
| | | HttpManager.getUserByPhone(phone).request(this){_,data-> |
| | | iv_avatar.setImageURI(data?.avatar) |
| | | tv_name.text = data?.nickname |
| | | tv_phone.text = data?.cellPhone |
| | | } |
| | | } |
| | | } |
| | | |
| | | tv_buy_rule.clickDelay { |
| | | HttpManager.getH5(5).request(this){ _, data-> |
| | | val buyRuleDialog = BuyRuleDialog() |
| | | buyRuleDialog.arguments = bundleOf("rule" to data?.content) |
| | | buyRuleDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | cb_rule.isChecked = rst == "ok" |
| | | } |
| | | } |
| | | buyRuleDialog.showAllowingStateLoss(supportFragmentManager,"rule") |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | if (isSend){ |
| | | cl_send.visible() |
| | | } |
| | | data?.apply { |
| | | iv_cover.setImageURI(coverUrl) |
| | | tv_title.text = courseTitle |
| | | tv_teacher.text = "导师 $tutor" |
| | | tv_price.text = SpanBuilder("¥$generalPrice").size(0,1,11).build() |
| | | tv_money.text = SpanBuilder("¥$generalPrice").size(0,1,11).build() |
| | | tv_total.text = generalPrice |
| | | val s = "余额抵扣 当前可用 ¥$balance" |
| | | rb_balance.text = SpanBuilder(s).size(4,s.length,11).color(this@BuyCourseActivity,4,s.length,R.color.textColor99).build() |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import android.annotation.SuppressLint |
| | | import android.os.CountDownTimer |
| | | import android.util.TypedValue |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import androidx.core.widget.NestedScrollView |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.* |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import cn.sinata.xldutils.visible |
| | | import com.github.zackratos.ultimatebar.UltimateBar |
| | | import com.google.android.material.appbar.AppBarLayout |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.RiskDialog |
| | | import com.sinata.xqmuse.dialog.SendConfirmDialog |
| | | import com.sinata.xqmuse.dialog.ShareDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.Course |
| | | import com.sinata.xqmuse.network.entity.Chapter |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import com.sinata.xqmuse.network.entity.CourseDetail |
| | | import com.sinata.xqmuse.network.entity.VideoBean |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.course.adapter.RecommendAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.VideoNameAdapter |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.ui.course.adapter.ChapterAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseGridAdapter |
| | | import com.sinata.xqmuse.utils.AppBarStateChangeListener |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_buy_course.* |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.* |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.iv_cover |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.tv_1 |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.tv_action |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.tv_count |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.tv_name |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.tv_teacher |
| | | import org.jetbrains.anko.imageResource |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.textColorResource |
| | | |
| | | class CourseDetailActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_course_deatil |
| | | |
| | | private val id by lazy { intent.getStringExtra("id")?:"" } |
| | | private val data by lazy { intent.getParcelableExtra<CourseDetail>("data") } |
| | | |
| | | private var course: CourseDetail? = null |
| | | private val chapterList = arrayListOf<Chapter>() |
| | | private val chapterAdapter = ChapterAdapter(chapterList) |
| | | private val courseList = arrayListOf<CourseBean>() |
| | | private val courseAdapter = CourseGridAdapter(courseList) |
| | | |
| | | private val videoList = arrayListOf<VideoBean>() |
| | | private val videoAdapter = VideoNameAdapter(videoList) |
| | | |
| | | private val courseList = arrayListOf<Course>() |
| | | private val courseAdapter = RecommendAdapter(courseList) |
| | | |
| | | var scrollByTab = false //true:点击tab滑动,不触发滑动回调,防止回环 |
| | | private val SCROLL_DURATION = 500 //滑动时长 |
| | | private var timer: CountDownTimer? = null |
| | | |
| | | override fun initClick() { |
| | | iv_back.setOnClickListener { finish() } |
| | | courseAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<CourseDetailActivity>("id" to courseList[position].id) |
| | | |
| | | tv_send.setOnClickListener { |
| | | getData(true) |
| | | } |
| | | |
| | | tv_action.setOnClickListener { |
| | | startActivity<JoinCourseActivity>("id" to id) |
| | | getData(false) |
| | | } |
| | | iv_collected.setOnClickListener { |
| | | iv_collected.isEnabled = false |
| | | HttpManager.collectCourse(id).request(this,success = {_,data-> |
| | | iv_collected.isEnabled = true |
| | | course?.isCollect = if (course?.isCollect == "1") "0" else "1" |
| | | iv_collected.imageResource = if (course?.isCollect == "1") R.mipmap.star_red else R.mipmap.star_empty |
| | | }){_,_-> |
| | | iv_collected.isEnabled = true |
| | | iv_collect.setOnClickListener { |
| | | HttpManager.collectCourse(data?.id?:"").request(this){_,_-> |
| | | data?.recommend = if (data?.recommend == 1) 2 else 1 |
| | | iv_collect.setImageResource(if (data?.recommend == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | } |
| | | } |
| | | tv_start.clickDelay { |
| | | HttpManager.riskInfo().request(this){_,data-> |
| | | if (data?.state == 1){ |
| | | RiskDialog.show(supportFragmentManager,data.riskInfo,object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | startVideo() |
| | | } |
| | | }) |
| | | }else |
| | | startVideo() |
| | | iv_share.setOnClickListener { |
| | | val shareDialog = ShareDialog() |
| | | shareDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | |
| | | } |
| | | } |
| | | shareDialog.showAllowingStateLoss(supportFragmentManager,"share") |
| | | } |
| | | cb_intro.setOnClickListener { |
| | | scroll2Position(0) |
| | | checkTab(0) |
| | | } |
| | | cb_chapter.setOnClickListener { |
| | | scroll2Position(1) |
| | | checkTab(1) |
| | | } |
| | | cb_push.setOnClickListener { |
| | | scroll2Position(2) |
| | | checkTab(2) |
| | | } |
| | | scrollView.setOnScrollChangeListener { v: NestedScrollView?, scrollX: Int, scrollY: Int, oldScrollX: Int, oldScrollY: Int -> |
| | | if (!scrollByTab) |
| | | when { |
| | | scrollY>=tv_2.top -> checkTab(2) |
| | | scrollY>=tv_1.top -> checkTab(1) |
| | | else -> checkTab(0) |
| | | } |
| | | } |
| | | chapterAdapter.setOnItemClickListener { view, position -> |
| | | getData(false) |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | UltimateBar.with(this) |
| | | .statusDark(false) |
| | | .create().immersionBar() //沉浸状态栏 |
| | | titleBar.gone() |
| | | rv_list.layoutManager = LinearLayoutManager(this) |
| | | rv_list.adapter = videoAdapter |
| | | rv_course.layoutManager = LinearLayoutManager(this) |
| | | rv_course.adapter = courseAdapter |
| | | getDetail() |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | rv_chapter.layoutManager = LinearLayoutManager(this) |
| | | rv_chapter.adapter = chapterAdapter |
| | | rv_push.layoutManager = GridLayoutManager(this,2) |
| | | rv_push.adapter = courseAdapter |
| | | |
| | | appbar.addOnOffsetChangedListener(object : AppBarStateChangeListener() { |
| | | override fun onStateChanged(appBarLayout: AppBarLayout?, state: State?, ratio:Double) { |
| | | bg.alpha = if(ratio<0.2) 0f else ((ratio-0.2)/0.8).toFloat() |
| | | when (state) { |
| | | State.EXPANDED -> { |
| | | //展开状态 |
| | | iv_back.imageResource = R.mipmap.icon_back_white |
| | | tvTitle.textColorResource = R.color.white |
| | | } |
| | | State.COLLAPSED -> { |
| | | //折叠状态 |
| | | iv_back.imageResource = R.mipmap.back |
| | | tvTitle.textColorResource = R.color.textColor |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | data?.apply { |
| | | iv_collect.setImageResource(if (data?.recommend == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | iv_cover.setImageURI(detailUrl) |
| | | tv_name.text = courseTitle |
| | | tv_teacher.text = "导师 ${tutor}" |
| | | tv_count.text = "${count}人已加入学习" |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + briefIntroduction, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | chapterList.addAll(list) |
| | | chapterAdapter.notifyDataSetChanged() |
| | | courseList.addAll(list2) |
| | | courseAdapter.notifyDataSetChanged() |
| | | |
| | | if (chargeType == 1||(courseType == 2&&isVip == 1)){ |
| | | tv_action.text = "立即学习" |
| | | }else{ |
| | | val s = "¥ %s 立即购买".format(generalPrice) |
| | | tv_action.text = SpanBuilder(s).size(0,1,12).size(2,generalPrice.length+2,21).build() |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | private fun startVideo(){ |
| | | showDialog() |
| | | HttpManager.startTrain(id).request(this){_,data-> |
| | | startActivity<PreLoadActivity>("course" to data) |
| | | // startActivity<VideoDetailActivity>("course" to data) |
| | | private fun scroll2Position(position:Int){ |
| | | scrollByTab = true |
| | | timer?.cancel() |
| | | when(position){ |
| | | 0->{ |
| | | scrollView.smoothScrollTo(0,0,SCROLL_DURATION) |
| | | } |
| | | 1->{ |
| | | scrollView.smoothScrollTo(0,tv_1.top,SCROLL_DURATION) |
| | | } |
| | | 2->{ |
| | | scrollView.smoothScrollTo(0,tv_2.top,SCROLL_DURATION) |
| | | } |
| | | } |
| | | timer = object :CountDownTimer(SCROLL_DURATION.toLong(),SCROLL_DURATION.toLong()){ |
| | | override fun onTick(p0: Long) { |
| | | } |
| | | |
| | | override fun onFinish() { |
| | | scrollByTab = false |
| | | } |
| | | }.start() |
| | | } |
| | | |
| | | private fun checkTab(i: Int){ |
| | | when (i) { |
| | | 0 -> { |
| | | cb_intro.textColorResource = R.color.textColor |
| | | cb_intro.setTextSize(TypedValue.COMPLEX_UNIT_SP,21f) |
| | | iv_tab_1.visible() |
| | | cb_chapter.textColorResource = R.color.textColor99 |
| | | cb_chapter.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_2.gone() |
| | | cb_push.textColorResource = R.color.textColor99 |
| | | cb_push.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_3.gone() |
| | | } |
| | | 1 -> { |
| | | cb_chapter.textColorResource = R.color.textColor |
| | | cb_chapter.setTextSize(TypedValue.COMPLEX_UNIT_SP,21f) |
| | | iv_tab_2.visible() |
| | | cb_intro.textColorResource = R.color.textColor99 |
| | | cb_intro.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_1.gone() |
| | | cb_push.textColorResource = R.color.textColor99 |
| | | cb_push.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_3.gone() |
| | | } |
| | | else -> { |
| | | cb_push.textColorResource = R.color.textColor |
| | | cb_push.setTextSize(TypedValue.COMPLEX_UNIT_SP,21f) |
| | | iv_tab_3.visible() |
| | | cb_intro.textColorResource = R.color.textColor99 |
| | | cb_intro.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_1.gone() |
| | | cb_chapter.textColorResource = R.color.textColor99 |
| | | cb_chapter.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_2.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | @SuppressLint("SetTextI18n") |
| | | private fun getDetail() { |
| | | HttpManager.queryCourseInfo(id) |
| | | .request(this) { _, data -> |
| | | course = data |
| | | data?.apply { |
| | | banner.setImageURI(coverImg) |
| | | tv_name.text = courseName |
| | | iv_collected.imageResource = if (isCollect == "1") R.mipmap.star_red else R.mipmap.star_empty |
| | | tv_time.text = "${time}|H${difficulty}" |
| | | tv_type.text = typeName |
| | | tv_info.text = introduce |
| | | |
| | | if (isFree == 1||isBuy == 1){ |
| | | tv_start.visible() |
| | | }else{ |
| | | tv_tip.visible() |
| | | tv_tip.text = "购买后“${typeName}”相关课程均可查看;\n长期有效,我们将持续为您更新。" |
| | | ll_bottom_1.visible() |
| | | tv_price.text = SpanBuilder("¥%.2f".format(price.toDouble())).size(0,1,18).build() |
| | | private fun getData(isSend:Boolean) { |
| | | HttpManager.confirmOrder(data?.id?:"").request(this){_,data-> |
| | | if (isSend){ |
| | | SendConfirmDialog.show(supportFragmentManager,data?.generalPrice?:"0.0",object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | startActivity<BuyCourseActivity>("isSend" to isSend,"data" to data) |
| | | } |
| | | videoList.clear() |
| | | videoList.addAll(videos) |
| | | videoAdapter.notifyDataSetChanged() |
| | | |
| | | courseList.clear() |
| | | courseList.addAll(recommendCourse) |
| | | courseAdapter.notifyDataSetChanged() |
| | | if (courseList.isNullOrEmpty()) |
| | | tv_2.gone() |
| | | } |
| | | } |
| | | }) |
| | | }else |
| | | startActivity<BuyCourseActivity>("isSend" to isSend,"data" to data) |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import android.util.TypedValue |
| | | import android.view.ViewGroup |
| | | import androidx.fragment.app.Fragment |
| | | import androidx.fragment.app.FragmentPagerAdapter |
| | | import androidx.viewpager.widget.ViewPager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.* |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.course.adapter.* |
| | | import com.sinata.xqmuse.ui.home.adapter.CourseAdapter |
| | | import com.sinata.xqmuse.ui.home.adapter.HomeBannerAdapter |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.youth.banner.indicator.CircleIndicator |
| | | import kotlinx.android.synthetic.main.fragment_course.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | import org.jetbrains.anko.textColorResource |
| | | |
| | | class CourseFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_course |
| | | |
| | | private val bannerImg = arrayListOf<Banner>() |
| | | // private val bannerAdapter by lazy { |
| | | // HomeBannerAdapter(bannerImg, requireContext()) |
| | | // } |
| | | |
| | | private val filterList = arrayListOf<Filter>() |
| | | private val filterAdapter = FilterAdapter(filterList) |
| | | |
| | | private var page = 1 |
| | | var search: String? = null //搜索 |
| | | |
| | | private val course = arrayListOf<Course>() |
| | | private val courseAdapter = CourseAdapter(course) |
| | | private val frags = arrayListOf<Fragment>() |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | EventBus.getDefault().register(this) |
| | | // banner.adapter = bannerAdapter |
| | | banner.indicator = CircleIndicator(requireContext()) |
| | | rv_filter.layoutManager = LinearLayoutManager(requireContext()) |
| | | rv_filter.adapter = filterAdapter |
| | | frags.add(PushCourseFragment()) |
| | | frags.add(TeacherFragment()) |
| | | view_pager.adapter = object :FragmentPagerAdapter(childFragmentManager){ |
| | | override fun getCount() = 2 |
| | | |
| | | rv_course.layoutManager = LinearLayoutManager(requireContext()) |
| | | rv_course.adapter = courseAdapter |
| | | courseAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<CourseDetailActivity>("id" to course[position].id) |
| | | } |
| | | override fun getItem(position: Int) = frags[position] |
| | | |
| | | tv_my_course.setOnClickListener { |
| | | startActivity<MyCourseActivity>() |
| | | } |
| | | override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { |
| | | |
| | | tv_search.clickDelay { |
| | | val s = et_search.text.toString() |
| | | search = if (s.isNullOrEmpty()) null else s |
| | | (requireActivity() as BaseActivity).hideInputMethod() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | } |
| | | view_pager.offscreenPageLimit = 2 |
| | | cb_pub.setOnClickListener { |
| | | view_pager.currentItem = 0 |
| | | } |
| | | cb_teacher.setOnClickListener { |
| | | view_pager.currentItem = 1 |
| | | } |
| | | view_pager.setOnPageChangeListener(object :ViewPager.OnPageChangeListener{ |
| | | override fun onPageScrolled( |
| | | position: Int, |
| | | positionOffset: Float, |
| | | positionOffsetPixels: Int |
| | | ) { |
| | | |
| | | refreshLayout.setOnRefreshListener { |
| | | val s = et_search.text.toString() |
| | | search = if (s.isNullOrEmpty()) null else s |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | banner.setOnBannerListener { data, position -> |
| | | val banner = data as Banner |
| | | banner.jumpPage(requireContext()) |
| | | } |
| | | getImg() |
| | | getFilter() |
| | | page = 1 |
| | | getData() |
| | | } |
| | | |
| | | override fun onPageSelected(position: Int) { |
| | | checkTab(position) |
| | | } |
| | | |
| | | override fun onPageScrollStateChanged(state: Int) { |
| | | } |
| | | }) |
| | | } |
| | | |
| | | private fun getFilter() { |
| | | HttpManager.getList().requestByF(this){_, data-> |
| | | filterList.clear() |
| | | filterList.add(Filter("类型:",data?.fitnessType?: arrayListOf())) |
| | | filterList.add(Filter("部位:",data?.fitnessPosition?: arrayListOf())) |
| | | val diff = arrayListOf<FilterItem>() |
| | | diff.add(FilterItem(1,"H1")) |
| | | diff.add(FilterItem(2,"H2")) |
| | | diff.add(FilterItem(3,"H3")) |
| | | diff.add(FilterItem(4,"H4")) |
| | | diff.add(FilterItem(5,"H5")) |
| | | filterList.add(Filter("难度:",diff)) |
| | | val times = arrayListOf<FilterItem>() |
| | | times.add(FilterItem(1,"小于10分钟")) |
| | | times.add(FilterItem(2,"10-20分钟")) |
| | | times.add(FilterItem(3,"大于20分钟")) |
| | | filterList.add(Filter("时长:",times)) |
| | | filterAdapter.notifyDataSetChanged() |
| | | private fun checkTab(i: Int){ |
| | | if (i == 0){ |
| | | cb_pub.textColorResource = R.color.textColor |
| | | cb_pub.setTextSize(TypedValue.COMPLEX_UNIT_SP,21f) |
| | | iv_tab_1.visible() |
| | | cb_teacher.textColorResource = R.color.textColor99 |
| | | cb_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_2.gone() |
| | | }else{ |
| | | cb_teacher.textColorResource = R.color.textColor |
| | | cb_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP,21f) |
| | | iv_tab_2.visible() |
| | | cb_pub.textColorResource = R.color.textColor99 |
| | | cb_pub.setTextSize(TypedValue.COMPLEX_UNIT_SP,16f) |
| | | iv_tab_1.gone() |
| | | } |
| | | } |
| | | |
| | | |
| | | private fun getData() { |
| | | val diff = filterList.filter { it.name == "难度:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.id.toString() } |
| | | val position = filterList.filter { it.name == "部位:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.name } |
| | | val times = filterList.filter { it.name == "时长:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.id.toString() } |
| | | val types = filterList.filter { it.name == "类型:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.id.toString() } |
| | | HttpManager.queryCourseList(page,if (diff.isNullOrEmpty()) null else diff, |
| | | if (position.isNullOrEmpty()) null else position,if (times.isNullOrEmpty()) null else times, |
| | | if (types.isNullOrEmpty()) null else types,search).requestByF(this,success = {_,data-> |
| | | if (page == 1) |
| | | course.clear() |
| | | course.addAll(data?: arrayListOf()) |
| | | courseAdapter.notifyDataSetChanged() |
| | | if (course.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | |
| | | private fun getImg(){ |
| | | HttpManager.queryBanner().requestByF(this){ _, data-> |
| | | bannerImg.clear() |
| | | bannerImg.addAll(data?: arrayListOf()) |
| | | // bannerAdapter.notifyDataSetChanged() |
| | | banner.currentItem = 1 |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | | fun refresh(e:EmptyEvent){ |
| | | if (e.code == Const.EventCode.REFRESH_COURSE){ |
| | | refreshLayout.resetNoMoreData() |
| | | page = 1 |
| | | getData() |
| | | } |
| | | } |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | EventBus.getDefault().unregister(this) |
| | | } |
| | | |
| | | } |
| | |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.course.adapter.FilterAdapter |
| | | import com.sinata.xqmuse.ui.home.adapter.CourseAdapter |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import kotlinx.android.synthetic.main.activity_my_course.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class MyCourseActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_my_course |
| | |
| | | private val filterList = arrayListOf<Filter>() |
| | | private val filterAdapter = FilterAdapter(filterList,true) |
| | | |
| | | private val course = arrayListOf<Course>() |
| | | private val courseAdapter = CourseAdapter(course) |
| | | |
| | | override fun initClick() { |
| | | tv_search.clickDelay { |
| | |
| | | getData() |
| | | } |
| | | |
| | | courseAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<CourseDetailActivity>("id" to course[position].id) |
| | | } |
| | | |
| | | } |
| | | |
| | | override fun initView() { |
| | |
| | | rv_filter.layoutManager = LinearLayoutManager(this) |
| | | rv_filter.adapter = filterAdapter |
| | | rv_course.layoutManager = LinearLayoutManager(this) |
| | | rv_course.adapter = courseAdapter |
| | | |
| | | refreshLayout.setOnRefreshListener { |
| | | val s = et_search.text.toString() |
| | |
| | | val position = filterList.filter { it.name == "部位:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.name } |
| | | val times = filterList.filter { it.name == "时长:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.id.toString() } |
| | | val types = filterList.filter { it.name == "类型:" }.firstOrNull()?.list?.filter { it.checked }?.joinToString (","){ it.id.toString() } |
| | | HttpManager.myCourse(page,if (diff.isNullOrEmpty()) null else diff, |
| | | if (position.isNullOrEmpty()) null else position,if (times.isNullOrEmpty()) null else times, |
| | | if (types.isNullOrEmpty()) null else types,search).request(this,success = {_,data-> |
| | | if (page == 1) |
| | | course.clear() |
| | | course.addAll(data?: arrayListOf()) |
| | | courseAdapter.notifyDataSetChanged() |
| | | if (course.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | |
| | | } |
| | | |
| | | @Subscribe |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.isVideo |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.QrcodeDialog |
| | | import com.sinata.xqmuse.dialog.ShareDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CourseDetail |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.utils.glide.GlideUtil |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_offline_course.* |
| | | import xyz.doikki.videocontroller.StandardVideoController |
| | | import xyz.doikki.videoplayer.player.BaseVideoView.* |
| | | |
| | | |
| | | class OfflineCourseActivity:TransparentStatusBarActivity(), OnStateChangeListener { |
| | | override fun setContentView() = R.layout.activity_offline_course |
| | | |
| | | private val data by lazy { intent.getParcelableExtra<CourseDetail>("data") } |
| | | |
| | | override fun initClick() { |
| | | iv_back.setOnClickListener { finish() } |
| | | iv_share.setOnClickListener { |
| | | val shareDialog = ShareDialog() |
| | | shareDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | |
| | | } |
| | | } |
| | | shareDialog.showAllowingStateLoss(supportFragmentManager,"share") |
| | | } |
| | | iv_collect.setOnClickListener { |
| | | HttpManager.collectCourse(data?.id?:"").request(this){_,_-> |
| | | data?.recommend = if (data?.recommend == 1) 2 else 1 |
| | | iv_collect.setImageResource(if (data?.recommend == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | } |
| | | } |
| | | ivPlay.setOnClickListener { |
| | | ivPlay.gone() |
| | | mVideoView.start() |
| | | } |
| | | iv_contact.setOnClickListener { |
| | | QrcodeDialog.show(supportFragmentManager,data?.wxQrCode?:"") |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | mVideoView.setOnStateChangeListener(this@OfflineCourseActivity) |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | data?.apply { |
| | | iv_collect.setImageResource(if (data?.recommend == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | if (detailUrl.isVideo()){ |
| | | titleBar.gone() |
| | | val controller = StandardVideoController(this@OfflineCourseActivity) |
| | | controller.addDefaultControlComponent(courseTitle, false) |
| | | mVideoView.setVideoController(controller) //设置控制器 |
| | | mVideoView.setUrl(detailUrl) //设置视频地址 |
| | | GlideUtil.load(this@OfflineCourseActivity, detailUrl, iv_cover, 0) |
| | | }else{ |
| | | cl_title.gone() |
| | | iv_cover.gone() |
| | | ivPlay.gone() |
| | | mVideoView.gone() |
| | | } |
| | | tv_name.text = courseTitle |
| | | tv_teacher.text = "导师 ${tutor}" |
| | | tv_address.text = address |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + briefIntroduction, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | iv_code.setImageURI(wxQrCode) |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | override fun onPlayerStateChanged(playerState: Int) { |
| | | |
| | | } |
| | | |
| | | override fun onPlayStateChanged(playState: Int) { |
| | | when(playState){ |
| | | STATE_PLAYING->{ |
| | | iv_cover.gone() |
| | | } |
| | | STATE_PLAYBACK_COMPLETED->{ |
| | | iv_cover.visible() |
| | | ivPlay.visible() |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onPause() { |
| | | super.onPause() |
| | | mVideoView.pause() |
| | | } |
| | | |
| | | override fun onResume() { |
| | | super.onResume() |
| | | mVideoView.resume() |
| | | } |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | mVideoView.release() |
| | | } |
| | | |
| | | |
| | | override fun onBackPressed() { |
| | | if (!mVideoView.onBackPressed()) { |
| | | super.onBackPressed() |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import com.sinata.xqmuse.network.entity.CourseType |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseBannerAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseGridAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseTypeAdapter |
| | | import com.youth.banner.indicator.CircleIndicator |
| | | import kotlinx.android.synthetic.main.fragment_push.* |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | |
| | | class PushCourseFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_push |
| | | |
| | | private val bannerImg = arrayListOf<Banner>() |
| | | private val bannerAdapter by lazy { |
| | | CourseBannerAdapter(bannerImg, requireContext()) |
| | | } |
| | | private val topMenu = arrayListOf<CourseType>() |
| | | private val topMenuAdapter = CourseTypeAdapter(topMenu) |
| | | |
| | | private val list = arrayListOf<CourseBean>() |
| | | private val adapter = CourseGridAdapter(list) |
| | | |
| | | private var page = 1 |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | banner.adapter = bannerAdapter |
| | | banner.indicator = CircleIndicator(requireContext()) |
| | | rv_menu.layoutManager = GridLayoutManager(requireContext(),4) |
| | | rv_menu.adapter = topMenuAdapter |
| | | rv_course.layoutManager = GridLayoutManager(requireContext(),2) |
| | | rv_course.adapter = adapter |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | getBanner() |
| | | getType() |
| | | getData() |
| | | |
| | | topMenuAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<TypeCourserActivity>("types" to topMenu,"index" to position) |
| | | } |
| | | } |
| | | |
| | | private fun getBanner(){ |
| | | HttpManager.queryBanner().requestByF(this){_,data-> |
| | | bannerImg.addAll(data?: arrayListOf()) |
| | | bannerAdapter.notifyDataSetChanged() |
| | | banner.currentItem = 1 |
| | | } |
| | | } |
| | | |
| | | private fun getType(){ |
| | | HttpManager.getCourseCategoryList().requestByF(this){_,data-> |
| | | topMenu.clear() |
| | | topMenu.addAll(data?: arrayListOf()) |
| | | topMenuAdapter.notifyDataSetChanged() |
| | | } |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.queryCourseList(page).requestByF(this,success = {_,data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseGridAdapter |
| | | import kotlinx.android.synthetic.main.fragment_teacher.* |
| | | |
| | | class TeacherFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_teacher |
| | | |
| | | private val list = arrayListOf<CourseBean>() |
| | | private val adapter = CourseGridAdapter(list) |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | rv_course.layoutManager = GridLayoutManager(requireContext(),2) |
| | | rv_course.adapter = adapter |
| | | getData() |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.getCoursePageList().requestByF(this){_,data-> |
| | | mVideoView.setUrl(data?.videoUrl) |
| | | mVideoView.start() |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL(null, sHead + data?.tutorIntroduction, "text/html", "utf-8", null) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import com.sinata.xqmuse.network.entity.CourseType |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseTypeGridAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.TypeAdapter |
| | | import kotlinx.android.synthetic.main.activity_type_course.* |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class TypeCourserActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_type_course |
| | | |
| | | private val types by lazy { intent.getParcelableArrayListExtra<CourseType>("types")?: arrayListOf() } |
| | | private val index by lazy { intent.getIntExtra("index",0) } |
| | | private val typeAdapter by lazy { TypeAdapter(types) } |
| | | private var page = 1 |
| | | private val list = arrayListOf<CourseBean>() |
| | | private val adapter = CourseTypeGridAdapter(list) |
| | | |
| | | override fun initClick() { |
| | | typeAdapter.setOnItemClickListener { view, position -> |
| | | typeAdapter.index = position |
| | | typeAdapter.notifyDataSetChanged() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | |
| | | adapter.setOnItemClickListener { view, position -> |
| | | showDialog() |
| | | HttpManager.getPayCourseInfoById(list[position].id).request(this,success = {_,data-> |
| | | dismissDialog() |
| | | data?.goDetail(this) |
| | | }){_,_-> |
| | | dismissDialog() |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | title = "全部课程" |
| | | rv_type.layoutManager = LinearLayoutManager(this) |
| | | typeAdapter.index = index |
| | | rv_type.adapter = typeAdapter |
| | | rv_list.layoutManager = GridLayoutManager(this,2) |
| | | rv_list.adapter = adapter |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | getData() |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.queryCourseList(page,types[typeAdapter.index].id).request(this,success = { _, data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | tv_empty.gone() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | tv_empty.visible() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Chapter |
| | | import java.util.ArrayList |
| | | |
| | | class ChapterAdapter(chapterList: ArrayList<Chapter>):HFRecyclerAdapter<Chapter>(chapterList, R.layout.item_chapter) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: Chapter) { |
| | | holder.setText(R.id.tv_name,data.chapterTitle) |
| | | holder.setText(R.id.tv_time,"%02d:%02d".format(data.duration/60,data.duration%60)) |
| | | holder.setText(R.id.tv_count,data.realLearnedNum.toString()) |
| | | holder.setText(R.id.tv_sort,(position+1).toString()) |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import android.content.Context |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.ImageView |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.utils.glide.GlideUtil |
| | | import com.youth.banner.adapter.BannerAdapter |
| | | |
| | | class CourseBannerAdapter(data:ArrayList<Banner>, private val context:Context) |
| | | :BannerAdapter<Banner,RecyclerView.ViewHolder>(data){ |
| | | override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder { |
| | | val view = LayoutInflater.from(context).inflate(R.layout.item_banner_course, parent, false) |
| | | return BannerViewHolder(view) |
| | | } |
| | | |
| | | override fun onBindView( |
| | | holder: RecyclerView.ViewHolder?, |
| | | data: Banner?, |
| | | position: Int, |
| | | size: Int |
| | | ) { |
| | | val bannerViewHolder = holder as BannerViewHolder |
| | | GlideUtil.load(context,data?.url,bannerViewHolder.img,0) |
| | | bannerViewHolder.bg.visibility = View.GONE |
| | | } |
| | | |
| | | inner class BannerViewHolder(v:View) :RecyclerView.ViewHolder(v){ |
| | | var img:ImageView = v.findViewById(R.id.iv_img) as ImageView |
| | | var bg:View = v.findViewById(R.id.bg) as View |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import java.util.ArrayList |
| | | |
| | | class CourseGridAdapter(list: ArrayList<CourseBean>):HFRecyclerAdapter<CourseBean>(list, R.layout.item_course_grid) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CourseBean) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_bg).setImageURI(data.coverUrl) |
| | | holder.setText(R.id.tv_title,data.courseTitle) |
| | | holder.setText(R.id.tv_subtitle,data.briefIntroduction) |
| | | holder.setText(R.id.tv_count,(data.count).toString()) |
| | | |
| | | val iv_vip = holder.bind<View>(R.id.iv_vip) |
| | | val tv_price = holder.bind<TextView>(R.id.tv_price) |
| | | when(data?.chargeType){ //1=免费 2=会员免费 3=单独收费 |
| | | 2->{ |
| | | iv_vip.visible() |
| | | tv_price.gone() |
| | | } |
| | | 3->{ |
| | | iv_vip.gone() |
| | | tv_price.visible() |
| | | tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | }else->{ |
| | | iv_vip.gone() |
| | | tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.CourseType |
| | | import com.sinata.xqmuse.network.entity.Menu |
| | | import java.util.ArrayList |
| | | |
| | | class CourseTypeAdapter(topMenu: ArrayList<CourseType>) :HFRecyclerAdapter<CourseType>(topMenu, R.layout.item_top_menu){ |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CourseType) { |
| | | holder.setText(R.id.tv_name,data.name) |
| | | holder.bind<SimpleDraweeView>(R.id.iv_menu).setImageURI(data.imageUrl) |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import java.util.ArrayList |
| | | |
| | | class CourseTypeGridAdapter(list: ArrayList<CourseBean>):HFRecyclerAdapter<CourseBean>(list, R.layout.item_course_type_grid) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CourseBean) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_bg).setImageURI(data.coverUrl) |
| | | holder.setText(R.id.tv_title,data.courseTitle) |
| | | holder.setText(R.id.tv_subtitle,data.briefIntroduction) |
| | | holder.setText(R.id.tv_count,(data.count).toString()) |
| | | |
| | | val iv_vip = holder.bind<View>(R.id.iv_vip) |
| | | val tv_price = holder.bind<TextView>(R.id.tv_price) |
| | | val tv_offline = holder.bind<View>(R.id.tv_offline) |
| | | val tv_free = holder.bind<View>(R.id.tv_free) |
| | | if (data.courseType == 2){ |
| | | tv_offline.visible() |
| | | iv_vip.gone() |
| | | tv_price.gone() |
| | | tv_free.gone() |
| | | }else when(data?.chargeType){ //1=免费 2=会员免费 3=单独收费 |
| | | 2->{ |
| | | iv_vip.visible() |
| | | tv_price.gone() |
| | | tv_offline.gone() |
| | | tv_free.gone() |
| | | } |
| | | 3->{ |
| | | tv_offline.gone() |
| | | iv_vip.gone() |
| | | tv_price.visible() |
| | | tv_free.gone() |
| | | tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | }else->{ |
| | | tv_free.visible() |
| | | tv_offline.gone() |
| | | iv_vip.gone() |
| | | tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.course.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.CourseType |
| | | import org.jetbrains.anko.textColorResource |
| | | import java.util.ArrayList |
| | | |
| | | class TypeAdapter(types: ArrayList<CourseType>):HFRecyclerAdapter<CourseType>(types, R.layout.item_type) { |
| | | var index = 0 |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CourseType) { |
| | | val tvName = holder.bind<TextView>(R.id.tv_name) |
| | | tvName.text = data.name |
| | | val indicator = holder.bind<View>(R.id.indicator) |
| | | if (position == index){ |
| | | indicator.visible() |
| | | tvName.textColorResource = R.color.colorPrimary |
| | | }else{ |
| | | indicator.gone() |
| | | tvName.textColorResource = R.color.textColor66 |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.discovery |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import android.Manifest |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.sinata.xqmuse.JkApplication |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.AddMomentPop |
| | | import com.sinata.xqmuse.dialog.TipDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.Dynamic |
| | | import com.sinata.xqmuse.network.entity.Place |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.discovery.adapter.DynamicAdapter |
| | | import com.sinata.xqmuse.ui.discovery.adapter.PlaceAdapter |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import com.tbruyelle.rxpermissions2.RxPermissions |
| | | import kotlinx.android.synthetic.main.fragment_discovery.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.jetbrains.anko.support.v4.dip |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | |
| | | |
| | | class DiscoveryFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_discovery |
| | | |
| | | private val dyns = arrayListOf<Dynamic>() |
| | | private val adapter = DynamicAdapter(dyns) |
| | | private val list = arrayListOf<Place>() |
| | | private val adapter = PlaceAdapter(list) |
| | | private var page = 1 |
| | | var search: String? = null //搜索 |
| | | |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | EventBus.getDefault().register(this) |
| | | rv_act.layoutManager = LinearLayoutManager(requireContext()) |
| | | rv_act.adapter = adapter |
| | | iv_msg.setOnClickListener { |
| | | startActivity<MsgActivity>() |
| | | } |
| | | iv_add.setOnClickListener { |
| | | val pop = AddMomentPop(requireContext()) |
| | | pop.setCallback(object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | startActivity<PublishActivity>("isVideo" to (rst == "video")) |
| | | } |
| | | }) |
| | | pop.showAsDropDown(iv_add,dip(-120),-iv_add.measuredHeight-dip(20)) |
| | | } |
| | | rv_list.layoutManager = GridLayoutManager(requireContext(),2) |
| | | rv_list.adapter = adapter |
| | | |
| | | adapter.setOnItemClickListener { view, position -> |
| | | startActivity<DynamicActivity>("id" to dyns[position].id) |
| | | startActivity<PlaceDetailActivity>("id" to list[position].id) |
| | | } |
| | | refreshLayout.setOnRefreshListener { |
| | | val s = et_search.text.toString() |
| | |
| | | page++ |
| | | getData() |
| | | } |
| | | tv_search.clickDelay { |
| | | val s = et_search.text.toString() |
| | | search = if (s.isNullOrEmpty()) null else s |
| | | (requireActivity() as BaseActivity).hideInputMethod() |
| | | refreshLayout.resetNoMoreData() |
| | | page = 1 |
| | | getData() |
| | | |
| | | et_search.setOnClickListener { |
| | | startActivity<SearchPlaceActivity>() |
| | | } |
| | | getUnread() |
| | | page = 1 |
| | | getData() |
| | | checkLocation() |
| | | } |
| | | |
| | | fun getUnread(){ |
| | | HttpManager.messageCount().requestByF(this){_,data-> |
| | | if (data?:0>99){ |
| | | tv_unread.visible() |
| | | tv_unread.text = "99+" |
| | | }else if (data?:0>0){ |
| | | tv_unread.visible() |
| | | tv_unread.text = data.toString() |
| | | }else |
| | | tv_unread.gone() |
| | | private fun checkLocation() { |
| | | val rxPermissions = RxPermissions(requireActivity()) |
| | | if (rxPermissions.isGranted(Manifest.permission.ACCESS_FINE_LOCATION)||SPUtils.instance().getBoolean(Const.User.LOCATION_REFUSED)){ |
| | | refreshLayout.autoRefresh() |
| | | }else{ |
| | | TipDialog.show(childFragmentManager,"为了展示您附近的疗愈馆,我们需要获取该设备的位置权限",object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | val subscribe = |
| | | rxPermissions.request(Manifest.permission.ACCESS_FINE_LOCATION).subscribe { |
| | | if (it){ |
| | | //todo 高德定位 |
| | | refreshLayout.autoRefresh() |
| | | }else{ |
| | | SPUtils.instance().put(Const.User.LOCATION_REFUSED,true).apply() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | } |
| | | compositeDisposable.add(subscribe) |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | SPUtils.instance().put(Const.User.LOCATION_REFUSED,true).apply() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | },"去授权","取消") |
| | | } |
| | | } |
| | | |
| | | |
| | | private fun getData(){ |
| | | HttpManager.findList(page,search).requestByF(this,success = {_,data-> |
| | | HttpManager.getMeditationPage(page,search,JkApplication.lat, JkApplication.lon).requestByF(this,success = { _, data-> |
| | | if (page == 1) |
| | | dyns.clear() |
| | | dyns.addAll(data?: arrayListOf()) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (dyns.isEmpty()) |
| | | if (list.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data.isNullOrEmpty()) |
| | | else if (data?.list?.isNullOrEmpty() == true) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | |
| | | private val dyns = arrayListOf<Dynamic>() |
| | | private val adapter = DynamicAdapter(dyns,true) |
| | | private val comment = arrayListOf<Comment>() |
| | | private val commentAdapter = CommentAdapter(comment) |
| | | val id by lazy { intent.getStringExtra("id")?:"" } |
| | | private var page = 1 |
| | | |
| | | override fun initClick() { |
| | | tv_like.clickDelay { |
| | | if(dyns[0].isLike == "0") |
| | | HttpManager.doLike(id,1,null).request(this){_,_-> |
| | | dyns[0].isLike = if(dyns[0].isLike == "1") "0" else "1" |
| | | tv_like.setCompoundDrawablesRelativeWithIntrinsicBounds(0,if (dyns[0].isLike == "1") R.mipmap.dianzaned else R.mipmap.dianzan,0,0) |
| | | } |
| | | } |
| | | |
| | | |
| | | et_content.setOnEditorActionListener { v, actionId, event -> |
| | | val content = et_content.text.toString() |
| | |
| | | rv_moment.layoutManager = LinearLayoutManager(this) |
| | | rv_moment.adapter = adapter |
| | | rv_comment.layoutManager = LinearLayoutManager(this) |
| | | rv_comment.adapter = commentAdapter |
| | | |
| | | refreshLayout.setOnRefreshListener { |
| | | getMomentDetail() |
| | |
| | | if (page == 1) |
| | | comment.clear() |
| | | comment.addAll(data?: arrayListOf()) |
| | | commentAdapter.notifyDataSetChanged() |
| | | if (comment.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data.isNullOrEmpty()) |
| | |
| | | |
| | | override fun initClick() { |
| | | adapter.setOnItemClickListener { view, position -> |
| | | if (list[position].type == 2||list[position].type == 3||!list[position].findId.isNullOrEmpty()){ |
| | | if (list[position].isTurn == 1) |
| | | startActivity<DynamicActivity>("id" to list[position].findId) |
| | | else |
| | | myToast("该动态已不存在") |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | HttpManager.messageList(page).request(this,success = { _, data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?: arrayListOf()) |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data.isNullOrEmpty()) |
| | | else if (data?.list?.isNullOrEmpty() == true) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
New file |
| | |
| | | package com.sinata.xqmuse.ui.discovery |
| | | |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import cn.sinata.xldutils.gone |
| | | import com.google.android.material.appbar.AppBarLayout |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.discovery.adapter.BannerAdapter |
| | | import com.sinata.xqmuse.utils.AppBarStateChangeListener |
| | | import com.youth.banner.indicator.CircleIndicator |
| | | import com.youth.banner.indicator.RectangleIndicator |
| | | import com.youth.banner.indicator.RoundLinesIndicator |
| | | import kotlinx.android.synthetic.main.activity_place_detail.* |
| | | import org.jetbrains.anko.backgroundColor |
| | | import org.jetbrains.anko.imageResource |
| | | import org.jetbrains.anko.textColorResource |
| | | |
| | | class PlaceDetailActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_place_detail |
| | | |
| | | private val id by lazy { intent.getStringExtra("id") } |
| | | private val bannerImg = arrayListOf<String>() |
| | | private val bannerAdapter by lazy { |
| | | BannerAdapter(bannerImg, this) |
| | | } |
| | | |
| | | override fun initClick() { |
| | | iv_back.setOnClickListener { finish() } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | banner.adapter = bannerAdapter |
| | | banner.indicator = RectangleIndicator(this) |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | webView.backgroundColor = 0 |
| | | appbar.addOnOffsetChangedListener(object : AppBarStateChangeListener() { |
| | | override fun onStateChanged(appBarLayout: AppBarLayout?, state: State?, ratio:Double) { |
| | | bg.alpha = if(ratio<0.2) 0f else ((ratio-0.2)/0.8).toFloat() |
| | | when (state) { |
| | | State.EXPANDED -> { |
| | | //展开状态 |
| | | iv_back.imageResource = R.mipmap.icon_back_white |
| | | tvTitle.textColorResource = R.color.white |
| | | } |
| | | State.COLLAPSED -> { |
| | | //折叠状态 |
| | | iv_back.imageResource = R.mipmap.back |
| | | tvTitle.textColorResource = R.color.textColor |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | getData() |
| | | } |
| | | |
| | | private fun getData() { |
| | | HttpManager.getMeditationInfo(id?:"").request(this){_,data-> |
| | | data?.apply { |
| | | bannerImg.clear() |
| | | bannerImg.addAll(detailBannerUrl.split(",").filter { !it.isNullOrEmpty() }) |
| | | bannerAdapter.notifyDataSetChanged() |
| | | banner.postDelayed({ |
| | | banner.isAutoLoop(true) |
| | | banner.start() |
| | | },2000) |
| | | tv_name.text = hallName |
| | | tv_phone.text = contactNumber |
| | | tv_address.text = address |
| | | tv_time.text = "营业时间:$businessHours" |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + briefIntroduction, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.sinata.xqmuse.utils.picture.FileUtils |
| | | import com.tbruyelle.rxpermissions2.RxPermissions |
| | | import kotlinx.android.synthetic.main.activity_publish.* |
| | | import kotlinx.android.synthetic.main.activity_user_info.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | |
| | | |
| | | override fun initClick() { |
| | | tv_like.clickDelay { |
| | | if (data.isLike!="1") |
| | | HttpManager.doLike(findId?:"",2,data.id).request(this){ _, _-> |
| | | data.isLike = if (data.isLike == "1") "0" else "1" |
| | | data.likeCount = if (data.isLike == "1") data.likeCount+1 else data.likeCount-1 |
| | | tv_like.text = data.likeCount.toString() |
| | | tv_like.setCompoundDrawablesRelativeWithIntrinsicBounds(if (data.isLike == "1") R.mipmap.dianzaned else R.mipmap.dianzan,0,0,0) |
| | | } |
| | | |
| | | } |
| | | holder_top.setOnClickListener { |
| | | val conversationLongClickPop = CommentClickPop(this) |
| | |
| | | ReportDialog.show( |
| | | supportFragmentManager, object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | HttpManager.report(2,data.id,rst).request(this@ReplyActivity){ _, _-> |
| | | HttpManager.report(data.id,rst).request(this@ReplyActivity){ _, _-> |
| | | myToast("举报成功") |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.discovery |
| | | |
| | | import android.view.inputmethod.EditorInfo |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import com.sinata.xqmuse.JkApplication |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.Place |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.discovery.adapter.PlaceAdapter |
| | | import kotlinx.android.synthetic.main.activity_search_place.* |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class SearchPlaceActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_search_place |
| | | |
| | | private val list = arrayListOf<Place>() |
| | | private val adapter = PlaceAdapter(list) |
| | | private var page = 1 |
| | | var search: String? = null //搜索 |
| | | |
| | | override fun initClick() { |
| | | tv_cancel.setOnClickListener { finish() } |
| | | et_search.setOnEditorActionListener { v, actionId, event -> |
| | | if (actionId == EditorInfo.IME_ACTION_SEARCH){ |
| | | val s = et_search.text.toString() |
| | | search = if (s.isNullOrEmpty()) null else s |
| | | hideInputMethod() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | return@setOnEditorActionListener false |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | rv_result.layoutManager = GridLayoutManager(this,2) |
| | | rv_result.adapter = adapter |
| | | adapter.setOnItemClickListener { view, position -> |
| | | startActivity<PlaceDetailActivity>("id" to list[position].id) |
| | | } |
| | | refreshLayout.setOnRefreshListener { |
| | | val s = et_search.text.toString() |
| | | search = if (s.isNullOrEmpty()) null else s |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.getMeditationPage(page,search, JkApplication.lat, JkApplication.lon).request(this,success = { _, data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()) |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | else if (data?.list?.isNullOrEmpty() == true) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.discovery.adapter |
| | | |
| | | import android.content.Context |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.ImageView |
| | | import android.widget.TextView |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.sinata.xqmuse.utils.glide.GlideUtil |
| | | import com.youth.banner.adapter.BannerAdapter |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class BannerAdapter(data:ArrayList<String>, private val context:Context) |
| | | :BannerAdapter<String,RecyclerView.ViewHolder>(data){ |
| | | override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder { |
| | | val view = LayoutInflater.from(context).inflate(R.layout.item_banner_course, parent, false) |
| | | return BannerViewHolder(view) |
| | | } |
| | | |
| | | override fun onBindView( |
| | | holder: RecyclerView.ViewHolder?, |
| | | data: String?, |
| | | position: Int, |
| | | size: Int |
| | | ) { |
| | | val bannerViewHolder = holder as BannerViewHolder |
| | | GlideUtil.load(context,data,bannerViewHolder.img,0) |
| | | bannerViewHolder.bg.visibility = View.GONE |
| | | } |
| | | |
| | | inner class BannerViewHolder(v:View) :RecyclerView.ViewHolder(v){ |
| | | var img: ImageView = v.findViewById(R.id.iv_img) as ImageView |
| | | var bg:View = v.findViewById(R.id.bg) as View |
| | | } |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.discovery.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.CommentClickPop |
| | | import com.sinata.xqmuse.dialog.ReplyDialog |
| | | import com.sinata.xqmuse.dialog.CommentLongClickDialog |
| | | import com.sinata.xqmuse.dialog.ReportDialog |
| | | import com.sinata.xqmuse.network.Comment |
| | | import com.sinata.xqmuse.dialog.SuccessDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.ReplyComment |
| | | import com.sinata.xqmuse.network.entity.Comment |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.discovery.DynamicActivity |
| | | import com.sinata.xqmuse.ui.discovery.ReplyActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.dip |
| | | import org.jetbrains.anko.startActivity |
| | | import java.util.ArrayList |
| | | |
| | | class CommentAdapter(comment: ArrayList<Comment>):HFRecyclerAdapter<Comment>(comment, R.layout.item_comment) { |
| | | val findId by lazy { |
| | | (context as DynamicActivity).id |
| | | } |
| | | var layoutManager: LinearLayoutManager? = null |
| | | |
| | | var callback:StringCallback? = null |
| | | override fun onBind(holder: ViewHolder, position: Int, data: Comment) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_avatar).setImageURI(data.headImg) |
| | | holder.setText(R.id.tv_name,data.userName) |
| | | holder.bind<SimpleDraweeView>(R.id.iv_avatar).setImageURI(data.avatar) |
| | | holder.setText(R.id.tv_name,data.nickname) |
| | | holder.setText(R.id.tv_content,data.content) |
| | | holder.setText(R.id.tv_time,data.insertTime) |
| | | val tv_reply_count = holder.bind<TextView>(R.id.tv_reply_count) |
| | | if (data.commentList.size>2&&!data.showAll){ |
| | | tv_reply_count.text = "查看${data.commentList.size}条回复" |
| | | tv_reply_count.visible() |
| | | tv_reply_count.setOnClickListener { |
| | | context.startActivity<ReplyActivity>("data" to data,"findId" to findId) |
| | | } |
| | | }else |
| | | tv_reply_count.gone() |
| | | holder.setText(R.id.tv_time,data.publishTime) |
| | | val tv_reply = holder.bind<TextView>(R.id.tv_reply) |
| | | if (data.replyContent.isNullOrEmpty()) |
| | | tv_reply.gone() |
| | | else{ |
| | | tv_reply.visible() |
| | | tv_reply.text = SpanBuilder("平台回复:${data.replyContent}").bold(0,5).build() |
| | | } |
| | | |
| | | val tv_like = holder.bind<TextView>(R.id.tv_like) |
| | | tv_like.text = data.likeCount.toString() |
| | | tv_like.setCompoundDrawablesRelativeWithIntrinsicBounds(if (data.isLike == "1") R.mipmap.dianzaned else R.mipmap.dianzan,0,0,0) //todo是否点赞 |
| | | tv_like.setCompoundDrawablesRelativeWithIntrinsicBounds(0,0,if (data.like == 1) R.mipmap.dianzaned else R.mipmap.dianzan,0) //todo是否点赞 |
| | | tv_like.clickDelay { |
| | | if (data.isLike!="1") |
| | | HttpManager.doLike(findId,2,data.id).request(context as BaseActivity){_,_-> |
| | | data.isLike = if (data.isLike == "1") "0" else "1" |
| | | data.likeCount = if (data.isLike == "1") data.likeCount+1 else data.likeCount-1 |
| | | HttpManager.doLike(data.id).request(context as BaseActivity){_,_-> |
| | | data.like = if (data.like == 1) 2 else 1 |
| | | notifyItemChanged(position) |
| | | } |
| | | } |
| | | |
| | | holder.itemView.setOnClickListener { |
| | | val conversationLongClickPop = CommentClickPop(context) |
| | | conversationLongClickPop.setCallback(object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | val activity = context as BaseActivity |
| | | val type = if(rst == "report") ReportDialog.TYPE_REPORT else if (data.replyUserId == SPUtils.instance().getString( |
| | | Const.User.USER_ID,"-1")) ReportDialog.TYPE_REPLY else ReportDialog.TYPE_COMMENT |
| | | if(type == ReportDialog.TYPE_REPORT) |
| | | ReportDialog.show( |
| | | activity.supportFragmentManager, |
| | | object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | HttpManager.report(2,data.id,rst).request(activity){ _, _-> |
| | | activity.myToast("举报成功") |
| | | } |
| | | } |
| | | }) |
| | | else |
| | | ReplyDialog.show(activity.supportFragmentManager,"回复${data.userName}",object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | HttpManager.addComment(findId,data.id,rst,data.id,data.userId).request(activity){ _, _-> |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.REFRESH_REPLY)) |
| | | activity.myToast("评论成功") |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | conversationLongClickPop.showAsDropDown(holder.bind(R.id.tv_name),context.dip(200),0) |
| | | holder.itemView.setOnLongClickListener { |
| | | callback?.onResult(position.toString()) |
| | | return@setOnLongClickListener false |
| | | } |
| | | |
| | | val rv_reply = holder.bind<RecyclerView>(R.id.rv_reply) |
| | | rv_reply.layoutManager = LinearLayoutManager(context) |
| | | val reply = arrayListOf<ReplyComment>() |
| | | val adapter = ReplyAdapter(reply) |
| | | adapter.findId = findId |
| | | adapter.commentId = data.id |
| | | if (data.showAll){ |
| | | reply.addAll(data.commentList) |
| | | }else{ |
| | | reply.addAll(data.commentList.take(2)) |
| | | } |
| | | rv_reply.adapter = adapter |
| | | } |
| | | |
| | | override fun onAttachedToRecyclerView(recyclerView: RecyclerView) { |
| | | super.onAttachedToRecyclerView(recyclerView) |
| | | layoutManager = recyclerView.layoutManager as LinearLayoutManager |
| | | } |
| | | } |
| | |
| | | tvLike.text = data.likeCount.toString() |
| | | tvLike.setCompoundDrawablesRelativeWithIntrinsicBounds(if (data.isLike == "1") R.mipmap.dianzaned else R.mipmap.dianzan,0,0,0) |
| | | tvLike.setOnClickListener { |
| | | if(data.isLike != "1") |
| | | HttpManager.doLike(data.id,1,null).request(context as BaseActivity) { _, _ -> |
| | | data.isLike = if(data.isLike == "1") "0" else "1" |
| | | if (data.isLike == "1") data.likeCount++ else data.likeCount-- |
| | | notifyItemChanged(position) |
| | | } |
| | | |
| | | } |
| | | tvComment.text = data.comment.toString() |
| | | if (data.isExpand){ |
| | |
| | | val dynamicActivity = context as DynamicActivity |
| | | ReportDialog.show(dynamicActivity.supportFragmentManager,object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | HttpManager.report(1, dynamicActivity.id,rst).request(dynamicActivity){_,_-> |
| | | HttpManager.report( dynamicActivity.id,rst).request(dynamicActivity){_,_-> |
| | | dynamicActivity.myToast("举报成功") |
| | | } |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.discovery.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.ImageView |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | |
| | | |
| | | class MsgAdapter(msgs: ArrayList<Msg>):HFRecyclerAdapter<Msg>(msgs, R.layout.item_msg) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: Msg) { |
| | | val ivAvatar = holder.bind<SimpleDraweeView>(R.id.iv_avatar) |
| | | val tv_content = holder.bind<TextView>(R.id.tv_content) |
| | | if (data.type == 1){ |
| | | ivAvatar.setActualImageResource(R.mipmap.sys_msg) |
| | | holder.setText(R.id.tv_name,"系统通知") |
| | | holder.setText(R.id.tv_action,"") |
| | | tv_content.isSingleLine = false |
| | | }else{ |
| | | ivAvatar.setImageURI(data.headImg) |
| | | holder.setText(R.id.tv_name,data.userName) |
| | | holder.setText(R.id.tv_action,data.title) |
| | | tv_content.isSingleLine = true |
| | | } |
| | | val iv = holder.bind<ImageView>(R.id.iv) |
| | | iv.setImageResource(if (data.noticeType == 2) R.mipmap.ic_msg1 else R.mipmap.ic_notice) |
| | | holder.setText(R.id.tv_type,if (data.noticeType == 2) "回复消息" else "系统消息") |
| | | holder.bind<View>(R.id.iv_unread).visibility = if (data.readStatus == 1) View.VISIBLE else View.GONE |
| | | holder.setText(R.id.tv_time,data.time) |
| | | holder.setText(R.id.tv_content,data.content) |
| | | holder.setText(R.id.tv_time,data.insertTime.substring(0,10).replace("-",".")) |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.discovery.adapter |
| | | |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Place |
| | | import java.util.ArrayList |
| | | |
| | | class PlaceAdapter(list: ArrayList<Place>):HFRecyclerAdapter<Place>(list, R.layout.item_place) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: Place) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_cover).setImageURI(data.coverUrl) |
| | | holder.setText(R.id.tv_name,data.hallName) |
| | | holder.setText(R.id.tv_address,data.address) |
| | | holder.setText(R.id.tv_address,data.contactNumber) |
| | | holder.setText(R.id.tv_distance,"距你${data.distance}km") |
| | | } |
| | | } |
| | |
| | | ReportDialog.show( |
| | | activity.supportFragmentManager, object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | HttpManager.report(2,data.id,rst).request(activity){ _, _-> |
| | | HttpManager.report(data.id,rst).request(activity){ _, _-> |
| | | activity.myToast("举报成功") |
| | | } |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.home |
| | | |
| | | import android.graphics.Color |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import cn.sinata.xldutils.utils.toTime |
| | | import cn.sinata.xldutils.visible |
| | | import com.github.mikephil.charting.components.XAxis |
| | | import com.github.mikephil.charting.components.YAxis |
| | | import com.github.mikephil.charting.data.Entry |
| | | import com.github.mikephil.charting.data.LineData |
| | | import com.github.mikephil.charting.data.LineDataSet |
| | | import com.github.mikephil.charting.formatter.ValueFormatter |
| | | import com.github.mikephil.charting.interfaces.datasets.ILineDataSet |
| | | import com.sinata.xqmuse.MainActivity |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.ChooseStarDialog |
| | | import com.sinata.xqmuse.dialog.ChooseWeightDialog |
| | | import com.sinata.xqmuse.dialog.NoticeDialog |
| | | import com.sinata.xqmuse.dialog.LoginRuleDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.* |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.BGMSettingActivity |
| | | import com.sinata.xqmuse.ui.H5Activity |
| | | import com.sinata.xqmuse.ui.guide.GuideActivity |
| | | import com.sinata.xqmuse.ui.home.adapter.HomeAdapter |
| | | import com.sinata.xqmuse.ui.home.adapter.HomeBannerAdapter |
| | | import com.sinata.xqmuse.ui.home.adapter.LuckAdapter |
| | | import com.sinata.xqmuse.ui.home.adapter.TopMenuAdapter |
| | | import com.sinata.xqmuse.ui.mine.UserInfoActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.extention.getArrowIcon |
| | | import com.sinata.xqmuse.utils.extention.getStarIcon |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.fragment_home.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.jetbrains.anko.startActivityForResult |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | import java.util.* |
| | | import kotlin.math.absoluteValue |
| | | |
| | | class HomeFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_home |
| | |
| | | getPrivacy() |
| | | getList() |
| | | getBottomMenu() |
| | | initClick() |
| | | } |
| | | |
| | | private fun initClick() { |
| | | |
| | | iv_search.setOnClickListener { |
| | | startActivity<SearchActivity>() |
| | | } |
| | | iv_privacy.setOnClickListener { |
| | | startActivity<GuideActivity>() |
| | | } |
| | | iv_guide.setOnClickListener { |
| | | HttpManager.getH5(LoginRuleDialog.TYPE_PRIVACY).requestByF(this){ _, data-> |
| | | data?.let { |
| | | startActivity<H5Activity>("title" to "新手冥想指南","url" to it.content) |
| | | } |
| | | } |
| | | } |
| | | iv_voice.setOnClickListener { |
| | | startActivity<BGMSettingActivity>() |
| | | } |
| | | topMenuAdapter.setOnItemClickListener { view, position -> |
| | | startActivity<TypeVoiceActivity>("title" to topMenu[position].categoryName,"id" to topMenu[position].id) |
| | | } |
| | | iv_today.setOnClickListener { |
| | | if (today!=null){ |
| | | startActivity<VoiceDetailActivity>("id" to today!!.id) |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun getTopMenu(){ |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.home.adapter.HotAdapter |
| | | import com.sinata.xqmuse.utils.Const |
| | | import kotlinx.android.synthetic.main.activity_search.* |
| | | import kotlinx.android.synthetic.main.item_hot.view.* |
| | | import kotlinx.android.synthetic.main.item_hot.view.tv_name |
| | | import kotlinx.android.synthetic.main.item_search_his.view.* |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class SearchActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_search |
| | | private val SPLIT = "%s" |
| | | private val hisList = arrayListOf<String>() |
| | | private val hotList = arrayListOf<String>() |
| | | private val hotAdapter = HotAdapter(hotList) |
| | | |
| | | override fun initClick() { |
| | | hotAdapter.setOnItemClickListener { view, position -> |
| | | et_search.setText(hotList[position]) |
| | | tv_search.callOnClick() |
| | | } |
| | | |
| | | tv_search.setOnClickListener { |
| | | val key = et_search.text.toString() |
| | | if (key.isNullOrEmpty()){ |
| | | toast("请输入搜索内容") |
| | | }else{ |
| | | if (hisList.contains(key)) |
| | | hisList.remove(key) |
| | | hisList.add(0,key) |
| | | saveHis() |
| | | startActivity<SearchResultActivity>("key" to key) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | rv_hot.layoutManager = LinearLayoutManager(this) |
| | | rv_hot.adapter = hotAdapter |
| | | getHis() |
| | | getHotWordList() |
| | | } |
| | | |
| | | private fun getHotWordList(){ |
| | | HttpManager.getHotWordList().request(this){_,data-> |
| | | hotList.clear() |
| | | hotList.addAll(data?: arrayListOf()) |
| | | hotAdapter.notifyDataSetChanged() |
| | | } |
| | | } |
| | | |
| | | private fun getHis(){ |
| | | hisList.clear() |
| | | fl_his.removeAllViews() |
| | | val his = SPUtils.instance().getString(Const.User.SEARCH_HIS) |
| | | hisList.addAll(his.split(SPLIT).filter { it.isNotEmpty() }.take(10)) |
| | | hisList.forEach { |
| | | val inflate = layoutInflater.inflate(R.layout.item_search_his, fl_his, false) |
| | | fl_his.addView(inflate) |
| | | inflate.tv_name.text = it |
| | | inflate.tv_name.setOnClickListener { _-> |
| | | et_search.setText(it) |
| | | tv_search.callOnClick() |
| | | } |
| | | inflate.iv_del.setOnClickListener { _-> |
| | | hisList.remove(it) |
| | | saveHis() |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun saveHis() { |
| | | SPUtils.instance().put(Const.User.SEARCH_HIS,hisList.joinToString(SPLIT) { it }).apply() |
| | | getHis() |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.home.adapter.VoiceGridAdapter |
| | | import kotlinx.android.synthetic.main.activity_search_result.* |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class SearchResultActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_search_result |
| | | |
| | | private var key = "" |
| | | private var page = 1 |
| | | private val pageSize = 10 |
| | | private val list = arrayListOf<CommonItemBean>() |
| | | private val adapter = VoiceGridAdapter(list) |
| | | |
| | | override fun initClick() { |
| | | tv_search.setOnClickListener { |
| | | val s = et_search.text.toString() |
| | | if (s.isNullOrEmpty()){ |
| | | toast("请输入搜索内容") |
| | | }else{ |
| | | key = s |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | key = intent.getStringExtra("key")?:"" |
| | | et_search.setText(key) |
| | | rv_result.layoutManager = GridLayoutManager(this,2) |
| | | rv_result.adapter = adapter |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | getData() |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.search(key,page,pageSize).request(this,success = {_,data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | tv_empty.gone() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | tv_empty.visible() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.home.adapter.VoiceGridAdapter |
| | | import kotlinx.android.synthetic.main.layout_common_list.* |
| | | |
| | | class TypeVoiceActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.layout_common_list |
| | | |
| | | private val id by lazy { intent.getStringExtra("id")?:"" } |
| | | private var page = 1 |
| | | private val list = arrayListOf<CommonItemBean>() |
| | | private val adapter = VoiceGridAdapter(list) |
| | | override fun initClick() { |
| | | adapter.setOnItemClickListener { view, position -> |
| | | |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | title = intent.getStringExtra("title") |
| | | rv_list.layoutManager = GridLayoutManager(this,2) |
| | | rv_list.adapter = adapter |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | getData() |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.getMeditationPageByCateId(id,page).request(this,success = { _, data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home |
| | | |
| | | import androidx.core.os.bundleOf |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import cn.sinata.xldutils.utils.showAllowingStateLoss |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.CommentDialog |
| | | import com.sinata.xqmuse.dialog.ShareDialog |
| | | import com.sinata.xqmuse.dialog.TimeSettingDialog |
| | | import com.sinata.xqmuse.dialog.VolumeDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.VoiceDetail |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.utils.AudioUtils |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_voice_detail.* |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class VoiceDetailActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_voice_detail |
| | | |
| | | private val id by lazy { intent.getStringExtra("id")?:"" } |
| | | private var voiceDetail:VoiceDetail? = null |
| | | private val player by lazy { |
| | | AudioUtils() |
| | | } |
| | | private var index = 0 |
| | | private var isRecycle = true //true列表循环播放 |
| | | |
| | | override fun initClick() { |
| | | iv_back.setOnClickListener { finish() } |
| | | iv_collect.setOnClickListener { |
| | | collect() |
| | | } |
| | | |
| | | iv_play.setOnClickListener { |
| | | if (voiceDetail!=null) |
| | | player.startPlayMusic(this,voiceDetail?.meditationMusicList!![index]) |
| | | } |
| | | |
| | | iv_share.setOnClickListener { |
| | | val shareDialog = ShareDialog() |
| | | shareDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | if (rst == "wx"){ |
| | | toast("微信分享") |
| | | }else{ |
| | | toast("朋友圈分享") |
| | | } |
| | | } |
| | | } |
| | | shareDialog.showAllowingStateLoss(supportFragmentManager,"share") |
| | | } |
| | | |
| | | iv_time.setOnClickListener { |
| | | val timeSettingDialog = TimeSettingDialog() |
| | | timeSettingDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | toast("设置倒计时$rst") |
| | | } |
| | | } |
| | | timeSettingDialog.showAllowingStateLoss(supportFragmentManager,"time") |
| | | } |
| | | |
| | | iv_recycle.setOnClickListener { |
| | | isRecycle = !isRecycle |
| | | iv_recycle.setImageResource(if (isRecycle) R.mipmap.ic_recycle else R.mipmap.danquxunhuan) |
| | | toast(if (isRecycle) "当前播放模式已设置为顺序播放" else "当前播放模式已设置为单曲循环") |
| | | } |
| | | tv_comment.setOnClickListener { |
| | | val commentDialog = CommentDialog() |
| | | commentDialog.arguments = bundleOf("id" to id) |
| | | commentDialog.showAllowingStateLoss(supportFragmentManager,"comment") |
| | | } |
| | | iv_volume.setOnClickListener { |
| | | val volumeDialog = VolumeDialog() |
| | | volumeDialog.showAllowingStateLoss(supportFragmentManager,"vol") |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | isRecycle = SPUtils.instance().getBoolean(Const.User.IS_RECYCLE,true) |
| | | getDetail() |
| | | } |
| | | |
| | | private fun getDetail() { |
| | | HttpManager.getMeditationDetails(id).request(this){_,data-> |
| | | this.voiceDetail = data |
| | | data?.apply { |
| | | iv_collect.setImageResource(if (favorite == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | iv_bg.setImageURI(backgroundUrl) |
| | | tv_name.text = meditationTitle |
| | | tv_subtitle.text = detailDescription |
| | | tv_comment.text = questionCount |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun collect(){ |
| | | HttpManager.favorite(id).request(this){_,data-> |
| | | voiceDetail?.favorite = if (voiceDetail?.favorite == 1) 2 else 1 |
| | | iv_collect.setImageResource(if (voiceDetail?.favorite == 1) R.mipmap.collected else R.mipmap.uncollect) |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home.adapter |
| | | |
| | | import android.content.Context |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.ImageView |
| | | import android.widget.TextView |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.BGMBean |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.youth.banner.adapter.BannerAdapter |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class BgmBannerAdapter(data:ArrayList<BGMBean>, private val context:Context) :BannerAdapter<BGMBean,RecyclerView.ViewHolder>(data){ |
| | | var playPosition = -1 |
| | | |
| | | override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder { |
| | | val view = LayoutInflater.from(context).inflate(R.layout.item_banner_bgm, parent, false) |
| | | return BannerViewHolder(view) |
| | | } |
| | | |
| | | override fun onBindView( |
| | | holder: RecyclerView.ViewHolder?, |
| | | data: BGMBean, |
| | | position: Int, |
| | | size: Int |
| | | ) { |
| | | val bannerViewHolder = holder as BannerViewHolder |
| | | bannerViewHolder.iv_bg.setImageURI(data.imageUrl) |
| | | bannerViewHolder.iv_play.setImageResource(if (position == playPosition) R.mipmap.pause_1 else R.mipmap.play) |
| | | } |
| | | |
| | | inner class BannerViewHolder(v:View) :RecyclerView.ViewHolder(v){ |
| | | var iv_bg:SimpleDraweeView = v.findViewById(R.id.iv_bg) as SimpleDraweeView |
| | | var iv_play:ImageView = v.findViewById(R.id.iv_play) |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home.adapter |
| | | |
| | | import android.content.Context |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.TextView |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.youth.banner.adapter.BannerAdapter |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class CardBannerAdapter(data:ArrayList<CommonItemBean>, private val context:Context) |
| | | :BannerAdapter<CommonItemBean,RecyclerView.ViewHolder>(data){ |
| | | override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder { |
| | | val view = LayoutInflater.from(context).inflate(R.layout.item_banner_card, parent, false) |
| | | return BannerViewHolder(view) |
| | | } |
| | | |
| | | override fun onBindView( |
| | | holder: RecyclerView.ViewHolder?, |
| | | data: CommonItemBean?, |
| | | position: Int, |
| | | size: Int |
| | | ) { |
| | | val bannerViewHolder = holder as BannerViewHolder |
| | | bannerViewHolder.iv_bg.setImageURI(data?.backgroundUrl) |
| | | bannerViewHolder.tv_title.text = data?.meditationTitle |
| | | bannerViewHolder.tv_subtitle.text = data?.coverDescription |
| | | bannerViewHolder.tv_count.text = (data?.realLearnedNum?:0).toString() |
| | | when(data?.chargeType){ //1=免费 2=会员免费 3=单独收费 |
| | | 2->{ |
| | | bannerViewHolder.iv_vip.visible() |
| | | bannerViewHolder.tv_price.gone() |
| | | } |
| | | 3->{ |
| | | bannerViewHolder.iv_vip.gone() |
| | | bannerViewHolder.tv_price.visible() |
| | | bannerViewHolder.tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | }else->{ |
| | | bannerViewHolder.iv_vip.gone() |
| | | bannerViewHolder.tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | inner class BannerViewHolder(v:View) :RecyclerView.ViewHolder(v){ |
| | | var iv_bg:SimpleDraweeView = v.findViewById(R.id.iv_bg) as SimpleDraweeView |
| | | var tv_title:TextView = v.findViewById(R.id.tv_title) as TextView |
| | | var tv_subtitle:TextView = v.findViewById(R.id.tv_subtitle) as TextView |
| | | var tv_count:TextView = v.findViewById(R.id.tv_count) as TextView |
| | | var iv_vip:View = v.findViewById(R.id.iv_vip) |
| | | var tv_price:TextView = v.findViewById(R.id.tv_price) |
| | | } |
| | | } |
| | |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.sinata.xqmuse.network.entity.HomeListBean |
| | | import com.sinata.xqmuse.network.entity.Menu |
| | | import com.sinata.xqmuse.ui.home.TypeVoiceActivity |
| | | import com.youth.banner.Banner |
| | | import org.jetbrains.anko.startActivity |
| | | import java.util.ArrayList |
| | | |
| | | class HomeAdapter(list: ArrayList<HomeListBean>) :HFRecyclerAdapter<HomeListBean>(list, R.layout.item_home_list){ |
| | |
| | | } |
| | | iv_3.setOnClickListener { |
| | | context.myToast("点击菜单3") |
| | | |
| | | } |
| | | }else{ |
| | | cl_menu.gone() |
| | | cl_banner.visible() |
| | | holder.setText(R.id.tv_title,data.clientMeditationCategoryVO.categoryName) |
| | | holder.setText(R.id.tv_subtitle,data.clientMeditationCategoryVO.description) |
| | | |
| | | val banner_landscape = holder.bind<View>(R.id.banner_landscape) |
| | | val banner_card = holder.bind<View>(R.id.banner_card) |
| | | |
| | | holder.bind<View>(R.id.iv_more).setOnClickListener { |
| | | context.startActivity<TypeVoiceActivity>("title" to data.clientMeditationCategoryVO.categoryName,"id" to data.clientMeditationCategoryVO.id) |
| | | } |
| | | val banner_landscape = holder.bind<Banner<CommonItemBean,LandscapeBannerAdapter>>(R.id.banner_landscape) |
| | | val banner_card = holder.bind<Banner<CommonItemBean,CardBannerAdapter>>(R.id.banner_card) |
| | | if (data.clientMeditationCategoryVO.showType == 1){ //横版 |
| | | banner_landscape.visible() |
| | | banner_card.gone() |
| | | val landscapeBannerAdapter = LandscapeBannerAdapter(data.clientMeditationVOList,context) |
| | | banner_landscape.adapter = landscapeBannerAdapter |
| | | }else{ //竖版布局 |
| | | banner_landscape.gone() |
| | | banner_card.visible() |
| | | val cardBannerAdapter = CardBannerAdapter(data.clientMeditationVOList,context) |
| | | banner_card.adapter = cardBannerAdapter |
| | | banner_card.setBannerGalleryEffect(100,20,0.9f) |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home.adapter |
| | | |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.sinata.xqmuse.R |
| | | import org.jetbrains.anko.backgroundResource |
| | | import org.jetbrains.anko.textColorResource |
| | | |
| | | class HotAdapter(list: ArrayList<String>):HFRecyclerAdapter<String>(list, R.layout.item_hot) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: String) { |
| | | val tvName = holder.bind<TextView>(R.id.tv_name) |
| | | val tvSort = holder.bind<TextView>(R.id.tv_sort) |
| | | tvName.text = data |
| | | tvSort.text = (position+1).toString() |
| | | if (position > 2){ |
| | | tvName.textColorResource = R.color.textColor66 |
| | | tvSort.backgroundResource = R.drawable.bg_grey_circle |
| | | }else{ |
| | | tvName.textColorResource = R.color.textGreen |
| | | tvSort.backgroundResource = R.drawable.bg_green_circle |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home.adapter |
| | | |
| | | import android.content.Context |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.TextView |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.Banner |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import com.youth.banner.adapter.BannerAdapter |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class LandscapeBannerAdapter(data:ArrayList<CommonItemBean>, private val context:Context) |
| | | :BannerAdapter<CommonItemBean,RecyclerView.ViewHolder>(data){ |
| | | override fun onCreateHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder { |
| | | val view = LayoutInflater.from(context).inflate(R.layout.item_banner_round, parent, false) |
| | | return BannerViewHolder(view) |
| | | } |
| | | |
| | | override fun onBindView( |
| | | holder: RecyclerView.ViewHolder?, |
| | | data: CommonItemBean?, |
| | | position: Int, |
| | | size: Int |
| | | ) { |
| | | val bannerViewHolder = holder as BannerViewHolder |
| | | bannerViewHolder.iv_bg.setImageURI(data?.backgroundUrl) |
| | | bannerViewHolder.tv_title.text = data?.meditationTitle |
| | | bannerViewHolder.tv_subtitle.text = data?.coverDescription |
| | | bannerViewHolder.tv_count.text = (data?.realLearnedNum?:0).toString() |
| | | when(data?.chargeType){ //1=免费 2=会员免费 3=单独收费 |
| | | 2->{ |
| | | bannerViewHolder.iv_vip.visible() |
| | | bannerViewHolder.tv_price.gone() |
| | | } |
| | | 3->{ |
| | | bannerViewHolder.iv_vip.gone() |
| | | bannerViewHolder.tv_price.visible() |
| | | bannerViewHolder.tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | }else->{ |
| | | bannerViewHolder.iv_vip.gone() |
| | | bannerViewHolder.tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | inner class BannerViewHolder(v:View) :RecyclerView.ViewHolder(v){ |
| | | var iv_bg:SimpleDraweeView = v.findViewById(R.id.iv_bg) as SimpleDraweeView |
| | | var tv_title:TextView = v.findViewById(R.id.tv_title) as TextView |
| | | var tv_subtitle:TextView = v.findViewById(R.id.tv_subtitle) as TextView |
| | | var tv_count:TextView = v.findViewById(R.id.tv_count) as TextView |
| | | var iv_vip:View = v.findViewById(R.id.iv_vip) |
| | | var tv_price:TextView = v.findViewById(R.id.tv_price) |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.home.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.facebook.drawee.view.SimpleDraweeView |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.CommonItemBean |
| | | import java.util.ArrayList |
| | | |
| | | class VoiceGridAdapter(list: ArrayList<CommonItemBean>):HFRecyclerAdapter<CommonItemBean>(list,R.layout.item_voice_grid) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CommonItemBean) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_bg).setImageURI(data.backgroundUrl) |
| | | holder.setText(R.id.tv_title,data?.meditationTitle) |
| | | holder.setText(R.id.tv_subtitle,data?.coverDescription) |
| | | holder.setText(R.id.tv_count,(data?.realLearnedNum?:0).toString()) |
| | | |
| | | val iv_vip = holder.bind<View>(R.id.iv_vip) |
| | | val tv_price = holder.bind<TextView>(R.id.tv_price) |
| | | when(data?.chargeType){ //1=免费 2=会员免费 3=单独收费 |
| | | 2->{ |
| | | iv_vip.visible() |
| | | tv_price.gone() |
| | | } |
| | | 3->{ |
| | | iv_vip.gone() |
| | | tv_price.visible() |
| | | tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | }else->{ |
| | | iv_vip.gone() |
| | | tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | private var openid: String? = null |
| | | private var phone: String? = null |
| | | |
| | | private val androidId by lazy { |
| | | Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID) |
| | | } |
| | | |
| | | @SuppressLint("CheckResult") |
| | | override fun initClick() { |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.course.adapter.MedalAdapter |
| | | import kotlinx.android.synthetic.main.activity_level.* |
| | | import org.jetbrains.anko.backgroundColor |
| | | |
| | | class LevelActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_level |
| | | |
| | | private val count by lazy { intent.getIntExtra("count",0) } |
| | | |
| | | private val level = arrayListOf("新人","青铜达人","白银达人","黄金达人","钻石达人","大师达人","王者达人") |
| | | private val levelCount = arrayListOf(0,10,30,60,90,120,240) |
| | | private val gotList = arrayListOf<String>() |
| | | private val adapter = MedalAdapter(gotList) |
| | | |
| | | override fun initClick() { |
| | | iv_back.setOnClickListener { finish() } |
| | | tv_rule.setOnClickListener { |
| | | |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | val levelS = "LV%d.%s".format(getLevel(),level[getLevel()-1]) |
| | | tv_level.text = SpanBuilder(levelS).size(levelS.indexOf("."),levelS.length,16).build() |
| | | tv_count.text = "打卡次数:${count}" |
| | | if (getLevel() != 7){ |
| | | tv_next.visible() |
| | | tv_next.text = "再打卡%d次,可升级%s".format(levelCount[getLevel()]-count,level[getLevel()]) |
| | | } |
| | | rv_medal.layoutManager = GridLayoutManager(this,4) |
| | | rv_medal.adapter = adapter |
| | | gotList.addAll(level.take(getLevel())) |
| | | adapter.notifyDataSetChanged() |
| | | titleBar.gone() |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | webView.backgroundColor = 0 |
| | | webView.background.alpha = 0 |
| | | getInfo() |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 1 新人 |
| | | 2 青铜达人:打卡10次。 |
| | | 3 白银达人:打卡30次。 |
| | | 4 黄金达人:打卡60次。 |
| | | 5 钻石达人:打卡90次。 |
| | | 6 大师达人:打卡120次。 |
| | | 7 王者达人:打卡240次。 |
| | | */ |
| | | private fun getLevel() = when(count){ |
| | | in 0..9-> 1 |
| | | in 10..29-> 2 |
| | | in 30..59-> 3 |
| | | in 60..89-> 4 |
| | | in 90..119-> 5 |
| | | in 120..239-> 6 |
| | | else -> 7 |
| | | private fun getInfo() { |
| | | HttpManager.healingLevel().request(this) { _, data -> |
| | | iv_level.setImageURI(data?.levelIcon) |
| | | val s = "当前等级 ${data?.growthValue}/${data?.nextLevel}" |
| | | tv_current.text = SpanBuilder(s).bold(4,s.indexOf("/")).build() |
| | | tv_next.text = "你离下一等级还差${data?.differenceLevel}经验值,加油!" |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + data?.content, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | mProgressBar.progress = (data?.growthValue?:0)*100/(data?.nextLevel?:100) |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import android.app.Activity |
| | | import android.content.Intent |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import com.sinata.xqmuse.MainActivity |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import cn.sinata.xldutils.utils.hidePhone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.JkApplication |
| | | import com.sinata.xqmuse.dialog.PhoneDialog |
| | | import com.sinata.xqmuse.dialog.SingleWheelDialog |
| | | import com.sinata.xqmuse.dialog.TipDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.UserInfo |
| | | import com.sinata.xqmuse.network.entity.MineInfo |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.H5Activity |
| | | import com.sinata.xqmuse.ui.course.MyCourseActivity |
| | | import com.sinata.xqmuse.ui.course.ReceiveGiftActivity |
| | | import com.sinata.xqmuse.ui.login.LoginActivity |
| | | import com.sinata.xqmuse.ui.mine.adapter.MenuAdapter |
| | | import com.sinata.xqmuse.ui.discovery.MsgActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.event.EmptyEvent |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.fragment_mine.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.jetbrains.anko.backgroundResource |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | import org.jetbrains.anko.support.v4.startActivityForResult |
| | | import org.jetbrains.anko.support.v4.toast |
| | | |
| | | class MineFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.fragment_mine |
| | | |
| | | private var userInfo: UserInfo? = null |
| | | |
| | | private val menus = arrayListOf("我的课程","收藏课程","我的动态","个人钱包","成就等级","优惠券管理","银行绑定","好友推广") |
| | | private val adapter = MenuAdapter(menus) |
| | | private var userInfo: MineInfo? = null |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | EventBus.getDefault().register(this) |
| | | rv_menu.layoutManager = GridLayoutManager(requireContext(),4) |
| | | rv_menu.adapter = adapter |
| | | adapter.setOnItemClickListener { view, position -> |
| | | when(position){ |
| | | 0->startActivity<MyCourseActivity>() |
| | | 1->startActivity<CollectedCourseActivity>() |
| | | 2->startActivity<MyDynamicActivity>() |
| | | 3->startActivity<WalletActivity>() |
| | | 4->startActivity<LevelActivity>("count" to (userInfo?.clockIn?:0)) |
| | | 5->startActivity<CouponActivity>() |
| | | 6->startActivity<BindCardActivity>() |
| | | 7->startActivity<ShareActivity>() |
| | | } |
| | | queryUnread() |
| | | showUserInfo() |
| | | holder_info.setOnClickListener { |
| | | startActivityForResult<UserInfoActivity>(1) |
| | | } |
| | | tv_center.clickDelay { |
| | | startActivity<UserInfoActivity>("user" to userInfo) |
| | | tv_watch_his.setOnClickListener { |
| | | startActivity<WatchHisActivity>() |
| | | } |
| | | tv_feed.clickDelay { |
| | | startActivity<FeedbackActivity>() |
| | | tv_collect.setOnClickListener { |
| | | startActivity<WatchHisActivity>("type" to WatchHisActivity.COLLECTED) |
| | | } |
| | | tv_about.clickDelay { |
| | | HttpManager.getH5(4).requestByF(this){ _, data-> |
| | | data?.let { |
| | | startActivity<H5Activity>("title" to "关于我们","url" to it) |
| | | } |
| | | } |
| | | tv_has_buy.setOnClickListener { |
| | | startActivity<WatchHisActivity>("type" to WatchHisActivity.HAS_BUY) |
| | | } |
| | | tv_contact.clickDelay { |
| | | HttpManager.getPhone().requestByF(this){_,data-> |
| | | PhoneDialog.show(childFragmentManager,data?:"") |
| | | } |
| | | bg_vip.setOnClickListener { |
| | | startActivityForResult<VipActivity>(1) |
| | | } |
| | | tv_guide.clickDelay { |
| | | startActivity<UseGuideActivity>() |
| | | tv_service.setOnClickListener { |
| | | startActivity<ServiceActivity>() |
| | | } |
| | | tv_privacy_rule.clickDelay { |
| | | HttpManager.getH5(2).requestByF(this){ _, data-> |
| | | data?.let { |
| | | startActivity<H5Activity>("title" to "隐私协议","url" to it) |
| | | } |
| | | } |
| | | tv_level.setOnClickListener { |
| | | startActivity<LevelActivity>() |
| | | } |
| | | tv_user_rule.clickDelay { |
| | | HttpManager.getH5(1).requestByF(this){ _, data-> |
| | | data?.let { |
| | | startActivity<H5Activity>("title" to "用户协议","url" to it) |
| | | } |
| | | } |
| | | } |
| | | tv_set_unit.clickDelay { |
| | | SingleWheelDialog.show(childFragmentManager,"APP体重单位", arrayListOf("斤","公斤","磅"),object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | HttpManager.setUnit(if (rst == "斤") 2 else if (rst == "公斤") 1 else 3).requestByF(this@MineFragment){_,_-> |
| | | myToast("设置成功") |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.USER_INFO_CHANGED)) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | tv_address.clickDelay { |
| | | startActivity<ReceiveGiftActivity>() |
| | | iv_setting.setOnClickListener { |
| | | startActivity<SettingActivity>() |
| | | } |
| | | tv_setting.setOnClickListener { |
| | | startActivity<SettingActivity>() |
| | | } |
| | | tv_logout.setOnClickListener { |
| | | TipDialog.show(childFragmentManager,"确认退出登录吗?",object : TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | SPUtils.instance().put(Const.User.TOKEN,"").put(Const.User.USER_ID,"") |
| | | .put("isHint",false) |
| | | .put("MsgTime","") |
| | | .apply() |
| | | (requireActivity().application as JkApplication).exit() |
| | | startActivity<LoginActivity>() |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | } |
| | | }) |
| | | tv_share.setOnClickListener { |
| | | startActivity<ShareActivity>() |
| | | } |
| | | showUserInfo() |
| | | iv_msg.setOnClickListener { |
| | | startActivity<MsgActivity>() |
| | | } |
| | | tv_rank.setOnClickListener { |
| | | toast("H5") |
| | | } |
| | | tv_account.setOnClickListener { |
| | | startActivity<WalletActivity>() |
| | | } |
| | | } |
| | | |
| | | @Subscribe |
| | |
| | | } |
| | | |
| | | private fun showUserInfo() { |
| | | userInfo = (requireActivity() as MainActivity).homeData |
| | | userInfo?.apply { |
| | | iv_avatar.setImageURI(headImg) |
| | | tv_name.text = name |
| | | iv_level.setImageResource(getLevelRes()) |
| | | tv_invite_code.text = "邀请码:${code}" |
| | | tv_height.text = height |
| | | tv_weight.text = weight |
| | | tv_bmi.text = bMI |
| | | tv_unit.text = getUnitName() |
| | | tv_fat_state.text = bMIInfo |
| | | HttpManager.getUserInfo().requestByF(this){_,data-> |
| | | userInfo = data |
| | | data?.apply { |
| | | iv_avatar.setImageURI(avatar) |
| | | tv_name.text = nickname |
| | | tv_phone.text = cellPhone.hidePhone() |
| | | tv_vip.text = if (isVip == 2){ |
| | | bg_vip.backgroundResource = R.mipmap.no_vip |
| | | "你还未开通会员服务" |
| | | } else{ |
| | | bg_vip.backgroundResource = R.mipmap.bg_vip |
| | | "${vipExpireTime.substring(0,10)}到期" |
| | | } |
| | | tv_day.text = cumulative |
| | | tv_continue.text = continuity |
| | | val format = "%d小时%d分".format(today / 60, today % 60) |
| | | tv_today.text = SpanBuilder(format).size(format.indexOf("小"),format.indexOf("小")+2,11).size(format.length-1,format.length,11).build() |
| | | } |
| | | } |
| | | } |
| | | |
| | | fun queryUnread(){ |
| | | HttpManager.queryNotice().requestByF(this){_,data-> |
| | | if (data == true) iv_unread.visible() else iv_unread.gone() |
| | | } |
| | | } |
| | | |
| | |
| | | super.onDestroy() |
| | | EventBus.getDefault().unregister(this) |
| | | } |
| | | |
| | | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
| | | super.onActivityResult(requestCode, resultCode, data) |
| | | if (resultCode == Activity.RESULT_OK) |
| | | showUserInfo() |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import androidx.core.os.bundleOf |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.CourseBean |
| | | import com.sinata.xqmuse.network.requestByF |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseGridAdapter |
| | | import com.sinata.xqmuse.ui.home.VoiceDetailActivity |
| | | import kotlinx.android.synthetic.main.layout_common_list.* |
| | | import org.jetbrains.anko.support.v4.startActivity |
| | | |
| | | class MineGridFragment : BaseFragment() { |
| | | override fun contentViewId() = R.layout.layout_common_list |
| | | |
| | | private val type by lazy { arguments?.getInt("type",0)?:0 } |
| | | private var pType = 0 |
| | | private var state = 0 |
| | | private var page = 1 |
| | | private val list = arrayListOf<CourseBean>() |
| | | private val adapter = CourseGridAdapter(list) |
| | | |
| | | override fun onFirstVisibleToUser() { |
| | | pType = when(type){ |
| | | COLLECTED_COURSE, COLLECTED_SAVE->WatchHisActivity.COLLECTED |
| | | HAS_BUY_VOICE, HAS_BUY_COURSE->WatchHisActivity.HAS_BUY |
| | | else->WatchHisActivity.WATCH_HIS |
| | | } |
| | | state = when(type){ |
| | | COLLECTED_COURSE, WATCH_HIS_COURSE , HAS_BUY_COURSE-> 2 |
| | | COLLECTED_SAVE, WATCH_HIS_SAVE , HAS_BUY_VOICE->1 |
| | | else->0 |
| | | } |
| | | rv_list.layoutManager = GridLayoutManager(requireContext(),2) |
| | | rv_list.adapter = adapter |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page++ |
| | | getData() |
| | | } |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getData() |
| | | } |
| | | refreshLayout.autoRefresh() |
| | | adapter.setOnItemClickListener { view, position -> |
| | | when(type){ |
| | | WATCH_HIS_SAVE, COLLECTED_SAVE->{ |
| | | startActivity<VoiceDetailActivity>("id" to list[position].id) |
| | | } |
| | | WATCH_HIS_COURSE, COLLECTED_COURSE->{ |
| | | showDialog() |
| | | HttpManager.getPayCourseInfoById(list[position].id).requestByF(this,success = {_,data-> |
| | | dismissDialog() |
| | | data?.goDetail(requireContext()) |
| | | }){_,_-> |
| | | dismissDialog() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun getData(){ |
| | | HttpManager.lookHistory(pType,page,state).requestByF(this,success = { _, data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | tv_empty.gone() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | tv_empty.visible() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | |
| | | companion object{ |
| | | const val WATCH_HIS_SAVE = 1 //疗愈观看历史 |
| | | const val WATCH_HIS_COURSE = 2 //课程观看历史 |
| | | const val COLLECTED_SAVE = 3 //收藏疗愈 |
| | | const val COLLECTED_COURSE = 4 //收藏课程 |
| | | const val HAS_BUY_COURSE = 5 //已购课程 |
| | | const val HAS_BUY_VOICE = 6 //已购音频 |
| | | fun newInstance(type:Int):MineGridFragment{ |
| | | val mineGridFragment = MineGridFragment() |
| | | mineGridFragment.arguments = bundleOf("type" to type) |
| | | return mineGridFragment |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.QA |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.* |
| | | import kotlinx.android.synthetic.main.activity_qa_detail.* |
| | | import kotlinx.android.synthetic.main.activity_qa_detail.webView |
| | | import org.jetbrains.anko.backgroundColor |
| | | |
| | | class QaDetailActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_qa_detail |
| | | |
| | | private val data by lazy { intent.getParcelableExtra<QA>("data") } |
| | | |
| | | override fun initClick() { |
| | | } |
| | | |
| | | override fun initView() { |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | webView.backgroundColor = 0 |
| | | webView.background.alpha = 0 |
| | | |
| | | data?.apply { |
| | | tv_question.text = questionName |
| | | tv_answer.text = questionDescription |
| | | iv_code.setImageURI(customerServiceQrCode) |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + content, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.gone |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.entity.QA |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.mine.adapter.QAAdapter |
| | | import kotlinx.android.synthetic.main.activity_service.* |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class ServiceActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_service |
| | | |
| | | private var page = 1 |
| | | private val list = arrayListOf<QA>() |
| | | private val adapter = QAAdapter(list) |
| | | |
| | | override fun initClick() { |
| | | adapter.setOnItemClickListener { view, position -> |
| | | startActivity<QaDetailActivity>("data" to list[position]) |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | iv_back.setOnClickListener { finish() } |
| | | rv_list.layoutManager = LinearLayoutManager(this) |
| | | rv_list.adapter = adapter |
| | | refreshLayout.setOnRefreshListener { |
| | | page = 1 |
| | | getQa() |
| | | } |
| | | refreshLayout.setOnLoadMoreListener { |
| | | page ++ |
| | | getQa() |
| | | } |
| | | getQrCode() |
| | | refreshLayout.autoRefresh() |
| | | } |
| | | |
| | | private fun getQrCode() { |
| | | HttpManager.getQrCode().request(this){_,data-> |
| | | iv_code.setImageURI(data) |
| | | } |
| | | } |
| | | |
| | | private fun getQa(){ |
| | | HttpManager.commonQuestion(page).request(this,success = {_,data-> |
| | | if (page == 1) |
| | | list.clear() |
| | | list.addAll(data?.list?: arrayListOf()) |
| | | adapter.notifyDataSetChanged() |
| | | if (list.isEmpty()){ |
| | | refreshLayout.finishRefreshWithNoMoreData() |
| | | } else if (data?.list.isNullOrEmpty()) |
| | | refreshLayout.finishLoadMoreWithNoMoreData() |
| | | else if (page == 1) |
| | | refreshLayout.finishRefresh() |
| | | else |
| | | refreshLayout.finishLoadMore() |
| | | }){_,_-> |
| | | if (page == 1) |
| | | refreshLayout.finishRefresh(false) |
| | | else |
| | | refreshLayout.finishLoadMore(false) |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import cn.sinata.xldutils.gone |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.TipDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.H5Activity |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.utils.CacheCleanUtil |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import kotlinx.android.synthetic.main.activity_setting.* |
| | | import org.jetbrains.anko.bundleOf |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.startActivityForResult |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class SettingActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_setting |
| | | |
| | | override fun initClick() { |
| | | tv_phone.setOnClickListener { |
| | | startActivity<ChangePhoneActivity>() |
| | | } |
| | | tv_pwd.setOnClickListener { |
| | | startActivity<ChangePwdActivity>() |
| | | } |
| | | iv_back.setOnClickListener { finish() } |
| | | tv_unregister.clickDelay { |
| | | HttpManager.getH5(3).request(this){ _, data-> |
| | | data?.let { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | tv_bind.setOnClickListener { |
| | | |
| | | } |
| | | |
| | | tv_clear.setOnClickListener { |
| | | val tipDialog = TipDialog() |
| | | tipDialog.arguments = bundleOf("msg" to "是否清除应用缓存?") |
| | | tipDialog.setCallback(object : TipDialog.OnClickCallback { |
| | | override fun onOk() { |
| | | CacheCleanUtil.clearAllCache(this@SettingActivity) |
| | | toast("清理成功") |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | } |
| | | }) |
| | | tipDialog.show(supportFragmentManager, "tip") |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import android.Manifest |
| | | import android.content.Intent |
| | | import android.os.Bundle |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import cn.sinata.xldutils.activity.BaseActivity |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import cn.sinata.xldutils.visible |
| | | import com.github.zackratos.ultimatebar.UltimateBar |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.TipDialog |
| | | import com.sinata.xqmuse.network.Apis |
| | | import com.sinata.xqmuse.dialog.ShareDialog |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.home.ScannerActivity |
| | | import com.sinata.xqmuse.utils.extention.clickDelay |
| | | import com.sinata.xqmuse.utils.getQRcodeImg |
| | | import com.tbruyelle.rxpermissions2.RxPermissions |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import kotlinx.android.synthetic.main.activity_share.* |
| | | import org.jetbrains.anko.bundleOf |
| | | import org.jetbrains.anko.startActivityForResult |
| | | import org.jetbrains.anko.toast |
| | | import org.jetbrains.anko.backgroundColor |
| | | |
| | | class ShareActivity:BaseActivity() { |
| | | private val code by lazy { //不为空则需要直接绑定 |
| | | intent.getStringExtra("code") |
| | | } |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | setContentView(R.layout.activity_share) |
| | | titleBar.leftClick { finish() } |
| | | UltimateBar.with(this) |
| | | .statusDark(true) |
| | | .create().immersionBar() //沉浸状态栏 |
| | | titleBar.titleView.text = "好友推广" |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | webView.backgroundColor = 0 |
| | | webView.background.alpha = 0 |
| | | getShareInfo() |
| | | iv_scan.clickDelay { |
| | | val rxPermissions = RxPermissions(this) |
| | | if (rxPermissions.isGranted(Manifest.permission.CAMERA)) |
| | | startActivityForResult<ScannerActivity>(1) |
| | | else if ((SPUtils.instance().getBoolean("CAMERA_REFUSE"))) |
| | | myToast("没有相机权限") |
| | | else{ |
| | | val tipDialog = cn.sinata.xldutils.widget.TipDialog() |
| | | tipDialog.arguments = |
| | | bundleOf("msg" to "为了扫描好友二维码,我们需要获取相机访问权限", "ok" to "去授权", "cancel" to "不需要") |
| | | tipDialog.setCallback(object : cn.sinata.xldutils.widget.TipDialog.OnClickCallback { |
| | | override fun onOk() { |
| | | rxPermissions.request(Manifest.permission.CAMERA) |
| | | .subscribe { |
| | | if (it) { |
| | | startActivityForResult<ScannerActivity>(1) |
| | | } else{ |
| | | SPUtils.instance().put("CAMERA_REFUSE", true).apply() |
| | | myToast("没有相机权限") |
| | | } |
| | | } |
| | | } |
| | | iv_back.setOnClickListener { finish() } |
| | | tv_action.setOnClickListener { |
| | | val shareDialog = ShareDialog() |
| | | shareDialog.callback = object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | |
| | | override fun onCancel() { |
| | | SPUtils.instance().put("CAMERA_REFUSE", true).apply() |
| | | } |
| | | }) |
| | | tipDialog.show(supportFragmentManager, "camera") |
| | | } |
| | | } |
| | | tv_bind.clickDelay { |
| | | val code = et_code.text.toString() |
| | | if (code.length!=6) |
| | | myToast("请填写6位邀请码") |
| | | else |
| | | HttpManager.getBindingUserName(code).request(this){_,data-> |
| | | TipDialog.show(supportFragmentManager,"确认绑定用户“${data}”吗?",object : TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | HttpManager.binding(code).request(this@ShareActivity){_,_-> |
| | | myToast("绑定成功") |
| | | getShareInfo() |
| | | } |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | shareDialog.show(supportFragmentManager,"share") |
| | | } |
| | | } |
| | | |
| | | private fun getShareInfo(){ |
| | | HttpManager.peopleList().request(this){_,data-> |
| | | tv_rule.text = data?.content |
| | | tv_my_friend.text = "我邀请的好友:${if (data?.people.isNullOrEmpty()) "暂未绑定" else data!!.people}" |
| | | tv_my_invitor.text = data?.invite |
| | | iv_code.setImageBitmap(getQRcodeImg(this, Apis.SHARE_URL+data?.code)) |
| | | |
| | | if (data?.invite?.isNullOrEmpty() == true){ |
| | | iv_scan.visible() |
| | | tv_bind.visible() |
| | | et_code.visible() |
| | | if (!code.isNullOrEmpty()){ |
| | | et_code.setText(code) |
| | | tv_bind.callOnClick() |
| | | } |
| | | }else{ |
| | | iv_scan.gone() |
| | | tv_bind.gone() |
| | | et_code.gone() |
| | | if (!code.isNullOrEmpty()){ |
| | | myToast("你已经绑定过邀请人") |
| | | } |
| | | HttpManager.shareInfo().request(this){_,data-> |
| | | data?.apply { |
| | | iv_code.setImageURI(qrCode) |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + rules, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
| | | super.onActivityResult(requestCode, resultCode, data) |
| | | if (resultCode == RESULT_OK&&data!=null){ |
| | | val rst = data.getStringExtra("result")?:"" |
| | | if (rst.startsWith(Apis.SHARE_URL)) |
| | | et_code.setText(rst.substring(rst.length-6)) |
| | | else |
| | | myToast("二维码错误") |
| | | } |
| | | } |
| | | } |
| | |
| | | import android.os.Environment |
| | | import android.provider.Settings |
| | | import cn.sinata.xldutils.activity.SelectPhotoDialog |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.utils.myToast |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.dialog.* |
| | |
| | | class UserInfoActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_user_info |
| | | |
| | | private val userInfo by lazy { intent.getParcelableExtra<UserInfo>("user") } |
| | | private var userInfo:UserInfo? = null |
| | | private var changed = true |
| | | |
| | | override fun initClick() { |
| | | iv_avatar.setOnClickListener { |
| | | startActivityForResult<SelectPhotoDialog>(1) |
| | | } |
| | | |
| | | tv_name.clickDelay { |
| | | InputNameDialog.show(supportFragmentManager,userInfo?.name?:"",object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | updateInfo(name = rst) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | tv_sex.clickDelay { |
| | | SingleWheelDialog.show(supportFragmentManager,null,null,object :StringCallback{ |
| | | ChoosSexDialog.show(supportFragmentManager,object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | tv_sex.text = rst |
| | | updateInfo(gender = if (rst == "男") 1 else 2) |
| | | userInfo?.gender = rst.toInt() |
| | | tv_sex.text = if (userInfo?.gender == 1) "男" else if (userInfo?.gender == 2) "女" else if (userInfo?.gender == 3) "保密" else "" |
| | | } |
| | | }) |
| | | } |
| | |
| | | val chooseBirthDialog = ChooseBirthDialog() |
| | | chooseBirthDialog.setCallback(object : ChooseBirthDialog.Callback { |
| | | override fun onOk(s: String) { |
| | | userInfo?.birthday = s |
| | | tv_birth.text = s |
| | | updateInfo(birthday = s.replace(".","-")) |
| | | } |
| | | }) |
| | | chooseBirthDialog.show(supportFragmentManager, "birth") |
| | | } |
| | | |
| | | tv_height.clickDelay { |
| | | InputHeightDialog.show(supportFragmentManager,userInfo?.height?:"","身高",object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | tv_height.text = "${rst}cm" |
| | | updateInfo(height = rst.toInt()) |
| | | userInfo?.height = rst |
| | | } |
| | | }) |
| | | } |
| | | |
| | | tv_weight.clickDelay { |
| | | ChooseWeightDialog.show( |
| | | supportFragmentManager, |
| | | "设置体重",userInfo?.getUnitName()?:"", |
| | | if (userInfo?.weight.isNullOrEmpty()) null else userInfo?.weight, |
| | | object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | tv_weight.text = "${rst}${userInfo?.getUnitName()}" |
| | | userInfo?.weight = rst |
| | | updateInfo(weight = rst.toDouble()) |
| | | } |
| | | },"保存") |
| | | } |
| | | |
| | | tv_waistline.clickDelay { |
| | | InputHeightDialog.show(supportFragmentManager,userInfo?.waistline?:"","腰围",object :StringCallback{ |
| | | override fun onResult(rst: String) { |
| | | tv_waistline.text = "${rst}cm" |
| | | userInfo?.waistline = rst |
| | | updateInfo(waistline = rst.toInt()) |
| | | } |
| | | }) |
| | | iv_back.setOnClickListener { |
| | | onBackPressed() |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | userInfo?.apply { |
| | | iv_avatar.setImageURI(headImg) |
| | | tv_name.text = name |
| | | tv_sex.text = if (gender == "1") "男" else if (gender == "2") "女" else "" |
| | | tv_birth.text = birthday.replace("-",".") |
| | | if (!weight.isNullOrEmpty()&&weight.toDouble() != 0.0){ |
| | | tv_weight.text = "${weight}${getUnitName()}" |
| | | } |
| | | if (!height.isNullOrEmpty()&&height.toDouble() != 0.0){ |
| | | tv_height.text = "${height}cm" |
| | | } |
| | | if (!waistline.isNullOrEmpty()&&waistline.toDouble() != 0.0){ |
| | | tv_waistline.text = "${waistline}cm" |
| | | titleBar.gone() |
| | | getInfo() |
| | | } |
| | | |
| | | private fun getInfo() { |
| | | HttpManager.getUserDetail().request(this){_,data-> |
| | | userInfo = data |
| | | data?.apply { |
| | | iv_avatar.setImageURI(avatar) |
| | | et_nick.setText(nickname) |
| | | et_name.setText("") //todo |
| | | et_sign.setText(signature) |
| | | tv_sex.text = if (gender == 1) "男" else if (gender == 2) "女" else if (gender == 3) "保密" else "" |
| | | tv_birth.text = birthday |
| | | et_edu.setText(education) |
| | | et_profess.setText(industry) |
| | | et_company.setText(company) |
| | | et_job.setText(occupation) |
| | | et_location.setText(location) |
| | | et_homeland.setText(hometown) |
| | | et_mail.setText(email) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onBackPressed() { |
| | | if (changed) |
| | | TipDialog.show(supportFragmentManager,"是否保存修改?",object :TipDialog.OnClickCallback{ |
| | | override fun onOk() { |
| | | updateInfo() |
| | | } |
| | | |
| | | override fun onCancel() { |
| | | finish() |
| | | } |
| | | },"保存","不保存") |
| | | else |
| | | super.onBackPressed() |
| | | } |
| | | |
| | | |
| | | private fun updateInfo(avatar:String?=null,name:String?=null,gender:Int?=null,birthday:String?=null,weight:Double?=null,height:Int?=null,waistline:Int?=null){ |
| | | HttpManager.updateInfo(name,gender, birthday, weight,waistline, height, avatar).request(this@UserInfoActivity,true){_,_-> |
| | | myToast("修改成功") |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.USER_INFO_CHANGED)) |
| | | if (!name.isNullOrEmpty()){ |
| | | tv_name.text = name |
| | | userInfo?.name = name |
| | | } |
| | | private fun updateInfo(){ |
| | | HttpManager.updateInfo(userInfo?.avatar,userInfo?.birthday,et_company.text.toString(),et_edu.text.toString(),et_mail.text.toString(),userInfo?.gender,et_homeland.text.toString(), |
| | | et_profess.text.toString(),et_location.text.toString(),et_nick.text.toString(),et_job.text.toString(),et_sign.text.toString(),et_name.text.toString()).request(this@UserInfoActivity,true){_,_-> |
| | | myToast("保存成功") |
| | | setResult(RESULT_OK) |
| | | finish() |
| | | } |
| | | } |
| | | |
| | |
| | | if (resultCode == Activity.RESULT_OK&&data!=null){ |
| | | data.getStringExtra("path")!!.uploadWithCompress(this, object : StringCallback { |
| | | override fun onResult(rst: String) { |
| | | userInfo?.avatar = rst |
| | | iv_avatar.setImageURI(rst) |
| | | updateInfo(rst) |
| | | } |
| | | }) |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import android.webkit.WebChromeClient |
| | | import android.webkit.WebSettings |
| | | import android.webkit.WebViewClient |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import cn.sinata.xldutils.gone |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.HttpManager |
| | | import com.sinata.xqmuse.network.request |
| | | import com.sinata.xqmuse.ui.H5Activity |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import com.sinata.xqmuse.ui.mine.adapter.VipPriceAdapter |
| | | import kotlinx.android.synthetic.main.activity_vip.* |
| | | import org.jetbrains.anko.backgroundResource |
| | | import org.jetbrains.anko.startActivityForResult |
| | | import org.jetbrains.anko.toast |
| | | |
| | | class VipActivity : TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_vip |
| | | |
| | | private val price = arrayListOf<Double>() |
| | | private val adapter = VipPriceAdapter(price) |
| | | |
| | | override fun initClick() { |
| | | adapter.setOnItemClickListener { view, position -> |
| | | adapter.checked = position |
| | | adapter.notifyDataSetChanged() |
| | | } |
| | | tv_rule.setOnClickListener { |
| | | HttpManager.getVipContent(2).request(this){ _, data-> |
| | | data?.let { |
| | | startActivityForResult<H5Activity>(1,"title" to "会员用户协议","url" to "","showClose" to true) |
| | | } |
| | | } |
| | | } |
| | | |
| | | tv_action.setOnClickListener { |
| | | if (cb_rule.isChecked){ |
| | | |
| | | }else |
| | | toast("请阅读并同意《》") |
| | | } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | rv_price.layoutManager = GridLayoutManager(this,3) |
| | | rv_price.adapter = adapter |
| | | val settings = webView.settings |
| | | settings.javaScriptEnabled = true |
| | | settings.javaScriptCanOpenWindowsAutomatically = true |
| | | settings.defaultTextEncodingName = "utf-8" |
| | | settings.domStorageEnabled = true |
| | | settings.setSupportZoom(true) |
| | | // settings.textZoom = 200 |
| | | settings.useWideViewPort = true |
| | | settings.loadWithOverviewMode = true |
| | | settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING |
| | | webView.webChromeClient = object : WebChromeClient() {} |
| | | webView.webViewClient = object : WebViewClient() {} |
| | | showVipInfo() |
| | | getPrice() |
| | | getH5() |
| | | } |
| | | |
| | | private fun showVipInfo() { |
| | | HttpManager.getUserInfo().request(this){_,data-> |
| | | data?.apply { |
| | | tv_vip.text = if (isVip == 2){ |
| | | bg_vip.backgroundResource = R.mipmap.no_vip |
| | | "你还未开通会员服务" |
| | | } else{ |
| | | bg_vip.backgroundResource = R.mipmap.bg_vip |
| | | "${vipExpireTime.substring(0,10)}到期" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun getPrice() { |
| | | HttpManager.getVipPrice().request(this){_,data-> |
| | | data?.apply { |
| | | price.clear() |
| | | price.add(monthlyVip) |
| | | price.add(quarterlyVip) |
| | | price.add(annualVip) |
| | | adapter.notifyDataSetChanged() |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun getH5(){ |
| | | HttpManager.getVipContent(1).request(this){_,data-> |
| | | val sHead = |
| | | "<html><head><meta name=\"viewport\" content=\"width=device-width, " + "initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" />" + "<style>img{max-width:100% !important;height:auto !important;}</style>" + "<style>body{max-width:100% !important;}</style>" + "</head><body>" |
| | | webView!!.loadDataWithBaseURL( |
| | | null, |
| | | sHead + data, |
| | | "text/html", |
| | | "utf-8", |
| | | null |
| | | ) |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine |
| | | |
| | | import android.view.ViewGroup |
| | | import androidx.fragment.app.Fragment |
| | | import androidx.fragment.app.FragmentPagerAdapter |
| | | import androidx.viewpager.widget.ViewPager |
| | | import cn.sinata.xldutils.gone |
| | | import cn.sinata.xldutils.visible |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.ui.TransparentStatusBarActivity |
| | | import kotlinx.android.synthetic.main.activity_watch_his.* |
| | | |
| | | class WatchHisActivity:TransparentStatusBarActivity() { |
| | | override fun setContentView() = R.layout.activity_watch_his |
| | | |
| | | private val type by lazy { intent.getIntExtra("type", WATCH_HIS) } |
| | | |
| | | override fun initClick() { |
| | | ll_1.setOnClickListener { |
| | | view_pager.currentItem = 0 |
| | | } |
| | | ll_2.setOnClickListener { |
| | | view_pager.currentItem = 1 |
| | | } |
| | | iv_back.setOnClickListener { finish() } |
| | | } |
| | | |
| | | override fun initView() { |
| | | titleBar.gone() |
| | | val frags = arrayListOf<Fragment>() |
| | | tv_title.text = when(type){ |
| | | COLLECTED->{ |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.COLLECTED_SAVE)) |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.COLLECTED_COURSE)) |
| | | "我的收藏" |
| | | } |
| | | HAS_BUY->{ |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.HAS_BUY_COURSE)) |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.HAS_BUY_VOICE)) |
| | | tv_1.text = "已购课程" |
| | | tv_2.text = "Purchased course" |
| | | tv_3.text = "已购音频" |
| | | tv_4.text = "Purchased audio" |
| | | "我的已购" |
| | | } |
| | | else->{ |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.WATCH_HIS_SAVE)) |
| | | frags.add(MineGridFragment.newInstance(MineGridFragment.WATCH_HIS_COURSE)) |
| | | "观看历史" |
| | | } |
| | | } |
| | | view_pager.adapter = object :FragmentPagerAdapter(supportFragmentManager,0){ |
| | | override fun getCount() = 2 |
| | | |
| | | override fun getItem(position: Int) = frags[position] |
| | | |
| | | override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) { |
| | | } |
| | | } |
| | | view_pager.addOnPageChangeListener(object :ViewPager.OnPageChangeListener{ |
| | | override fun onPageScrolled( |
| | | position: Int, |
| | | positionOffset: Float, |
| | | positionOffsetPixels: Int |
| | | ) { |
| | | |
| | | } |
| | | |
| | | override fun onPageSelected(position: Int) { |
| | | if (position == 0){ |
| | | iv_tab_1.visible() |
| | | iv_tab_2.gone() |
| | | }else{ |
| | | iv_tab_1.gone() |
| | | iv_tab_2.visible() |
| | | } |
| | | } |
| | | |
| | | override fun onPageScrollStateChanged(state: Int) { |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | companion object{ |
| | | const val WATCH_HIS = 1 |
| | | const val COLLECTED = 2 |
| | | const val HAS_BUY = 3 |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine.adapter |
| | | |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import com.sinata.xqmuse.R |
| | | import com.sinata.xqmuse.network.entity.QA |
| | | import java.util.ArrayList |
| | | |
| | | class QAAdapter(list: ArrayList<QA>):HFRecyclerAdapter<QA>(list, R.layout.item_qa) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: QA) { |
| | | holder.setText(R.id.tv_question,data.questionName) |
| | | holder.setText(R.id.tv_answer,data.questionDescription) |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.ui.mine.adapter |
| | | |
| | | import android.view.View |
| | | import android.widget.TextView |
| | | import cn.sinata.xldutils.adapter.HFRecyclerAdapter |
| | | import cn.sinata.xldutils.adapter.util.ViewHolder |
| | | import cn.sinata.xldutils.utils.SpanBuilder |
| | | import com.sinata.xqmuse.R |
| | | import org.jetbrains.anko.backgroundResource |
| | | import org.jetbrains.anko.textColorResource |
| | | import java.util.ArrayList |
| | | |
| | | class VipPriceAdapter(price: ArrayList<Double>):HFRecyclerAdapter<Double>(price, R.layout.item_vip) { |
| | | var checked = 0 |
| | | override fun onBind(holder: ViewHolder, position: Int, data: Double) { |
| | | holder.setText(R.id.tv_name,if (position == 0) "月度会员" else if (position == 1) "季度会员" else "年度会员") |
| | | holder.setText(R.id.tv_price,SpanBuilder("¥%.2f".format(data)).size(0,1,15).build()) |
| | | holder.setText(R.id.tv_daily_price,"¥%.2f天".format(data/30)) |
| | | val bg = holder.bind<View>(R.id.cl_bg) |
| | | val tvName = holder.bind<TextView>(R.id.tv_name) |
| | | val tvPrice = holder.bind<TextView>(R.id.tv_price) |
| | | val tvDaily = holder.bind<TextView>(R.id.tv_daily_price) |
| | | if (position == checked){ |
| | | bg.backgroundResource = R.drawable.bg_light_green_10dp |
| | | tvName.textColorResource = R.color.white |
| | | tvPrice.textColorResource = R.color.white |
| | | tvDaily.textColorResource = R.color.white |
| | | }else{ |
| | | bg.backgroundResource = R.drawable.bg_grey_10dp |
| | | tvName.textColorResource = R.color.textColor |
| | | tvPrice.textColorResource = R.color.textColor |
| | | tvDaily.textColorResource = R.color.textColor99 |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.utils; |
| | | |
| | | import android.util.Log; |
| | | |
| | | import com.google.android.material.appbar.AppBarLayout; |
| | | |
| | | /** |
| | | * ZhongTian |
| | | * Created by hds with AndroidStudio |
| | | * Contact me by SCKJ Co.,Ltd |
| | | * 2020-01-06 14:56 Monday |
| | | * Description:AppBarStateChangeListener |
| | | */ |
| | | public abstract class AppBarStateChangeListener implements AppBarLayout.OnOffsetChangedListener { |
| | | |
| | | public enum State { |
| | | EXPANDED, |
| | | COLLAPSED, |
| | | IDLE |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public final void onOffsetChanged(AppBarLayout appBarLayout, int i) { |
| | | int totalScrollRange = appBarLayout.getTotalScrollRange(); |
| | | Log.e("mmp","总位移:"+totalScrollRange+",当前位移:"+i); |
| | | double ratio = Math.abs(((double)i) / totalScrollRange); |
| | | if (ratio > 0.6) { |
| | | onStateChanged(appBarLayout, State.COLLAPSED,ratio); |
| | | } else { |
| | | onStateChanged(appBarLayout, State.EXPANDED,ratio); |
| | | } |
| | | } |
| | | |
| | | public abstract void onStateChanged(AppBarLayout appBarLayout, State state,double ratio); |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.utils; |
| | | |
| | | import android.content.Context; |
| | | import android.media.MediaPlayer; |
| | | import android.media.MediaRecorder; |
| | | import android.net.Uri; |
| | | import android.os.Environment; |
| | | import android.os.Handler; |
| | | import android.util.Log; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | |
| | | public class AudioUtils { |
| | | |
| | | //文件路径 |
| | | private String filePath; |
| | | //文件夹路径 |
| | | private String FolderPath; |
| | | |
| | | private MediaRecorder mMediaRecorder; |
| | | private final String TAG = "fan"; |
| | | public static final int MAX_LENGTH = 1000 * 600;// 最大录音时长十分钟,实际行程设置为5分钟上传一次 |
| | | |
| | | private OnAudioStatusUpdateListener audioStatusUpdateListener; |
| | | private MediaPlayer mMediaPlayer; |
| | | |
| | | private float volume = 0.5f; //播放音量 |
| | | |
| | | /** |
| | | * 文件存储默认sdcard/record |
| | | */ |
| | | public AudioUtils() { |
| | | //默认保存路径为/sdcard/record/下 |
| | | this(Environment.getExternalStorageDirectory() + "/record/"); |
| | | } |
| | | |
| | | public AudioUtils(String filePath) { |
| | | |
| | | File path = new File(filePath); |
| | | if (!path.exists()) |
| | | path.mkdirs(); |
| | | |
| | | this.FolderPath = filePath; |
| | | } |
| | | |
| | | private long startTime; |
| | | private long endTime; |
| | | |
| | | |
| | | /** |
| | | * 开始录音 使用amr格式 |
| | | * 录音文件 |
| | | * |
| | | * @return |
| | | */ |
| | | public void startRecord() { |
| | | // 开始录音 |
| | | /* ①Initial:实例化MediaRecorder对象 */ |
| | | if (mMediaRecorder == null) |
| | | mMediaRecorder = new MediaRecorder(); |
| | | try { |
| | | /* ②setAudioSource/setVedioSource */ |
| | | mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);// 设置麦克风 |
| | | /* ②设置音频文件的编码:AAC/AMR_NB/AMR_MB/Default 声音的(波形)的采样 */ |
| | | mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); |
| | | /* |
| | | * ②设置输出文件的格式:THREE_GPP/MPEG-4/RAW_AMR/Default THREE_GPP(3gp格式 |
| | | * ,H263视频/ARM音频编码)、MPEG-4、RAW_AMR(只支持音频且音频编码要求为AMR_NB) |
| | | */ |
| | | mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); |
| | | |
| | | filePath = FolderPath + System.currentTimeMillis() + ".caf"; |
| | | /* ③准备 */ |
| | | mMediaRecorder.setOutputFile(filePath); |
| | | mMediaRecorder.setMaxDuration(MAX_LENGTH); |
| | | mMediaRecorder.prepare(); |
| | | /* ④开始 */ |
| | | mMediaRecorder.start(); |
| | | // AudioRecord audioRecord. |
| | | /* 获取开始时间* */ |
| | | startTime = System.currentTimeMillis(); |
| | | updateMicStatus(); |
| | | Log.e("fan", "startTime" + startTime); |
| | | } catch (IllegalStateException e) { |
| | | Log.i(TAG, "call startAmr(File mRecAudioFile) failed!" + e.getMessage()); |
| | | } catch (IOException e) { |
| | | Log.i(TAG, "call startAmr(File mRecAudioFile) failed!" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 停止录音 |
| | | */ |
| | | public long stopRecord() { |
| | | if (mMediaRecorder == null) |
| | | return 0L; |
| | | endTime = System.currentTimeMillis(); |
| | | |
| | | //有一些网友反应在5.0以上在调用stop的时候会报错,翻阅了一下谷歌文档发现上面确实写的有可能会报错的情况,捕获异常清理一下就行了,感谢大家反馈! |
| | | try { |
| | | mMediaRecorder.stop(); |
| | | mMediaRecorder.reset(); |
| | | mMediaRecorder.release(); |
| | | mMediaRecorder = null; |
| | | |
| | | audioStatusUpdateListener.onStop(filePath); |
| | | // filePath = ""; //这行代码会引起连续录音文件为空的bug |
| | | |
| | | } catch (RuntimeException e) { |
| | | if (mMediaRecorder != null) { |
| | | mMediaRecorder.reset(); |
| | | mMediaRecorder.release(); |
| | | mMediaRecorder = null; |
| | | } |
| | | File file = new File(filePath); |
| | | if (file.exists()) |
| | | file.delete(); |
| | | |
| | | filePath = ""; |
| | | |
| | | } |
| | | return endTime - startTime; |
| | | } |
| | | |
| | | public String getFilePath() { |
| | | return filePath; |
| | | } |
| | | |
| | | /** |
| | | * 取消录音 |
| | | */ |
| | | public void cancelRecord() { |
| | | |
| | | try { |
| | | |
| | | mMediaRecorder.stop(); |
| | | mMediaRecorder.reset(); |
| | | mMediaRecorder.release(); |
| | | mMediaRecorder = null; |
| | | |
| | | } catch (RuntimeException e) { |
| | | mMediaRecorder.reset(); |
| | | mMediaRecorder.release(); |
| | | mMediaRecorder = null; |
| | | } |
| | | File file = new File(filePath); |
| | | if (file.exists()) |
| | | file.delete(); |
| | | |
| | | filePath = ""; |
| | | |
| | | } |
| | | |
| | | private final Handler mHandler = new Handler(); |
| | | private Runnable mUpdateMicStatusTimer = new Runnable() { |
| | | public void run() { |
| | | updateMicStatus(); |
| | | } |
| | | }; |
| | | |
| | | |
| | | private int BASE = 1; |
| | | private int SPACE = 100;// 间隔取样时间 |
| | | |
| | | public void setOnAudioStatusUpdateListener(OnAudioStatusUpdateListener audioStatusUpdateListener) { |
| | | this.audioStatusUpdateListener = audioStatusUpdateListener; |
| | | } |
| | | |
| | | /** |
| | | * 更新麦克状态 |
| | | */ |
| | | private void updateMicStatus() { |
| | | |
| | | if (mMediaRecorder != null) { |
| | | double ratio = (double) mMediaRecorder.getMaxAmplitude() / BASE; |
| | | double db = 0;// 分贝 |
| | | if (ratio > 1) { |
| | | db = 20 * Math.log10(ratio); |
| | | if (null != audioStatusUpdateListener) { |
| | | audioStatusUpdateListener.onUpdate(db, System.currentTimeMillis() - startTime); |
| | | } |
| | | } |
| | | mHandler.postDelayed(mUpdateMicStatusTimer, SPACE); |
| | | } |
| | | } |
| | | |
| | | public interface OnAudioStatusUpdateListener { |
| | | /** |
| | | * 录音中... |
| | | * |
| | | * @param db 当前声音分贝 |
| | | * @param time 录音时长 |
| | | */ |
| | | public void onUpdate(double db, long time); |
| | | |
| | | /** |
| | | * 停止录音 |
| | | * |
| | | * @param filePath 保存路径 |
| | | */ |
| | | public void onStop(String filePath); |
| | | |
| | | public void onStartPlay(); |
| | | |
| | | public void onFinishPlay(); |
| | | } |
| | | |
| | | //开始播放录音 |
| | | public void startPlayMusic(Context context, String filePath) { |
| | | if (mMediaPlayer != null) { |
| | | stopPlayMusic(); |
| | | } |
| | | mMediaPlayer = new MediaPlayer(); |
| | | mMediaPlayer.setVolume(volume,volume); |
| | | try { |
| | | Log.e("mmp", "path:" + filePath); |
| | | mMediaPlayer.setDataSource(context, Uri.parse(filePath)); |
| | | mMediaPlayer.prepareAsync(); |
| | | mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { |
| | | @Override |
| | | public void onPrepared(MediaPlayer mp) { |
| | | // 装载完毕回调 |
| | | mMediaPlayer.start(); |
| | | if (audioStatusUpdateListener != null) |
| | | audioStatusUpdateListener.onStartPlay(); |
| | | } |
| | | }); |
| | | mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { |
| | | @Override |
| | | public void onCompletion(MediaPlayer mp) { |
| | | stopPlayMusic(); |
| | | // BaseEvent baseEvent = new BaseEvent(BaseEvent.SEND_AODIO_PLAY_OVER); |
| | | // baseEvent.setMsg(filePath); |
| | | // EventBus.getDefault().post(baseEvent); |
| | | } |
| | | }); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public void setVolume(float volume){ |
| | | this.volume = volume; |
| | | if (mMediaPlayer!=null){ |
| | | mMediaPlayer.setVolume(volume,volume); |
| | | } |
| | | } |
| | | |
| | | //结束录音播放 |
| | | public void stopPlayMusic() { |
| | | if (mMediaPlayer == null) |
| | | return; |
| | | try { |
| | | mMediaPlayer.stop(); |
| | | mMediaPlayer.release(); |
| | | if (audioStatusUpdateListener != null) |
| | | audioStatusUpdateListener.onFinishPlay(); |
| | | mMediaPlayer = null; |
| | | } catch (IllegalStateException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取文件长度 |
| | | * |
| | | * @param context |
| | | * @param filePath |
| | | * @return |
| | | */ |
| | | public int getMusicTime(Context context, String filePath) { |
| | | if (mMediaPlayer != null) { |
| | | stopPlayMusic(); |
| | | } |
| | | mMediaPlayer = new MediaPlayer(); |
| | | try { |
| | | mMediaPlayer.setDataSource(context, Uri.parse(filePath)); |
| | | mMediaPlayer.prepare(); |
| | | int duration = mMediaPlayer.getDuration(); |
| | | if (0 != duration) { |
| | | mMediaPlayer.release(); |
| | | return duration / 1000; |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.utils; |
| | | |
| | | /** |
| | | * Created by lmw on 2018/4/10. |
| | | */ |
| | | |
| | | import android.content.Context; |
| | | import android.os.Environment; |
| | | |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | |
| | | public class CacheCleanUtil { |
| | | |
| | | public static String getTotalCacheSize(Context context) throws Exception { |
| | | |
| | | //Context.getExternalCacheDir() --> SDCard/Android/data/你的应用包名/cache/目录,一般存放临时缓存数据 |
| | | long cacheSize = getFolderSize(context.getCacheDir()); |
| | | //Context.getExternalFilesDir() --> SDCard/Android/data/你的应用的包名/files/ 目录,一般放一些长时间保存的数据 |
| | | if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { |
| | | cacheSize += getFolderSize(context.getExternalCacheDir()); |
| | | } |
| | | return getFormatSize(cacheSize); |
| | | } |
| | | |
| | | public static void clearAllCache(Context context) { |
| | | deleteDir(context.getCacheDir()); |
| | | if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { |
| | | deleteDir(context.getExternalCacheDir()); |
| | | //下面两句清理webview网页缓存.但是每次执行都报false,我用的是魅蓝5.1的系统,后来发现且/data/data/应用package目录下找不到database文///件夹 不知道是不是个别手机的问题, |
| | | context.deleteDatabase("webview.db"); |
| | | context.deleteDatabase("webviewCache.db"); |
| | | } |
| | | } |
| | | |
| | | private static boolean deleteDir(File dir) { |
| | | if (dir != null && dir.isDirectory()) { |
| | | String[] children = dir.list(); |
| | | for (int i = 0; i < children.length; i++) { |
| | | boolean success = deleteDir(new File(dir, children[i])); |
| | | if (!success) { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | return dir.delete(); |
| | | } |
| | | |
| | | // 获取文件 |
| | | //Context.getExternalFilesDir() --> SDCard/Android/data/你的应用的包名/files/ 目录,一般放一些长时间保存的数据 |
| | | //Context.getExternalCacheDir() --> SDCard/Android/data/你的应用包名/cache/目录,一般存放临时缓存数据 |
| | | public static long getFolderSize(File file) throws Exception { |
| | | long size = 0; |
| | | try { |
| | | File[] fileList = file.listFiles(); |
| | | for (int i = 0; i < fileList.length; i++) { |
| | | // 如果下面还有文件 |
| | | if (fileList[i].isDirectory()) { |
| | | size = size + getFolderSize(fileList[i]); |
| | | } else { |
| | | size = size + fileList[i].length(); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return size; |
| | | } |
| | | |
| | | /** |
| | | * 格式化单位 |
| | | * @param size |
| | | */ |
| | | public static String getFormatSize(double size) { |
| | | double kiloByte = size / 1024; |
| | | |
| | | double megaByte = kiloByte / 1024; |
| | | if (megaByte < 1) { |
| | | BigDecimal result1 = new BigDecimal(Double.toString(kiloByte)); |
| | | return result1.setScale(2, BigDecimal.ROUND_HALF_UP) |
| | | .toPlainString() + "K"; |
| | | } |
| | | |
| | | double gigaByte = megaByte / 1024; |
| | | if (gigaByte < 1) { |
| | | BigDecimal result2 = new BigDecimal(Double.toString(megaByte)); |
| | | return result2.setScale(2, BigDecimal.ROUND_HALF_UP) |
| | | .toPlainString() + "M"; |
| | | } |
| | | |
| | | double teraBytes = gigaByte / 1024; |
| | | if (teraBytes < 1) { |
| | | BigDecimal result3 = new BigDecimal(Double.toString(gigaByte)); |
| | | return result3.setScale(2, BigDecimal.ROUND_HALF_UP) |
| | | .toPlainString() + "G"; |
| | | } |
| | | BigDecimal result4 = new BigDecimal(teraBytes); |
| | | return result4.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() |
| | | + "T"; |
| | | } |
| | | |
| | | } |
| | |
| | | const val USER_NAME = "userName" |
| | | const val USER_PWD = "pwd" |
| | | const val USER_PHONE = "userPhone" |
| | | const val SEARCH_HIS = "SEARCH_HIS" |
| | | const val ANSWER = "answers" |
| | | const val VOLUME = "VOLUME" |
| | | const val BGM = "BGM" |
| | | const val IS_RECYCLE = "IS_RECYCLE" |
| | | const val LOCATION_REFUSED = "LOCATION_REFUSED" |
| | | } |
| | | |
| | | object Method{ |
| | | const val PING_RECEIVE = "OK" |
| | | const val ORDER_STATUS = "ORDER_STATUS" |
| | | const val END_PUSH = "END_PUSH" |
| | | const val OFFLINE = "OFFLINE" |
| | | const val REASSIGN = "REASSIGN" |
| | | const val FERRY = "FERRY" |
| | | } |
| | | |
| | | object EventCode{ |
| | | const val CHANGE_STAR = 0x01 //更换星座 |
| | |
| | | import java.io.File; |
| | | |
| | | public class OSSUtil { |
| | | public final String BUCKET_NAME = "jkjianshen"; |
| | | public final String ENDPOINT = "obs.cn-north-4.myhuaweicloud.com"; |
| | | public final String OSS_AK = "X3V6GPYUK1VQ03K0JG4G"; |
| | | public final String OSS_AKS = "CustHR4B9XKdT7hGcEYEpV9UVUoc4pmUhnHckU9h"; |
| | | public final String BUCKET_NAME = "xqgwzh"; |
| | | public final String ENDPOINT = "obs.cn-south-1.myhuaweicloud.com"; |
| | | public final String OSS_AK = "HNZKSJL5LKM2NZVJPE8O"; |
| | | public final String OSS_AKS = "VjKImAoCB8Q2lEcwGO9xIemirpOVZuij9DVRSXcr"; |
| | | |
| | | // private Activity mActivity; |
| | | // private ArrayList<OSSAsyncTask> mTasks = new ArrayList<>(); |
| | |
| | | String url = imgPath; |
| | | try { |
| | | ObsClient obsClient = new ObsClient(OSS_AK,OSS_AKS,ENDPOINT); |
| | | // obsClient.createBucket(PassportConfig.OSS_BUCKET); |
| | | if (imgPath.length() < 11){ |
| | | imgPath = System.currentTimeMillis()+imgPath; |
| | | } |
New file |
| | |
| | | package com.sinata.xqmuse.views; |
| | | |
| | | import android.content.Context; |
| | | import android.content.res.TypedArray; |
| | | import android.util.AttributeSet; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | |
| | | import com.sinata.xqmuse.R; |
| | | |
| | | |
| | | /** |
| | | * Created by lmw on 2016/11/8. |
| | | */ |
| | | |
| | | public class FlowLayout extends ViewGroup{ |
| | | private float mVerticalSpacing; //每个item纵向间距 |
| | | private float mHorizontalSpacing; //每个item横向间距 |
| | | public FlowLayout(Context context) { |
| | | this(context,null); |
| | | } |
| | | |
| | | public FlowLayout(Context context, AttributeSet attrs, int defStyleAttr) { |
| | | super(context, attrs, defStyleAttr); |
| | | inial(context,attrs); |
| | | } |
| | | |
| | | public FlowLayout(Context context, AttributeSet attrs) { |
| | | this(context, attrs,0); |
| | | inial(context,attrs); |
| | | } |
| | | |
| | | public void setHorizontalSpacing(float pixelSize) { |
| | | mHorizontalSpacing = pixelSize; |
| | | } |
| | | public void setVerticalSpacing(float pixelSize) { |
| | | mVerticalSpacing = pixelSize; |
| | | } |
| | | |
| | | @Override |
| | | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { |
| | | //获取容器设置的padding |
| | | int mPaddingLeft = getPaddingLeft(); |
| | | int mPaddingRight = getPaddingRight(); |
| | | int mPaddingTop = getPaddingTop(); |
| | | int mPaddingBottom = getPaddingBottom(); |
| | | //获取布局要求给的宽度大小 |
| | | int widthSize = MeasureSpec.getSize(widthMeasureSpec); |
| | | //获取布局要求给的 高度的mode |
| | | int heightMode = MeasureSpec.getMode(heightMeasureSpec); |
| | | //获取布局要求给的 高度大小 |
| | | int heightSize = MeasureSpec.getSize(heightMeasureSpec); |
| | | |
| | | //容器存放所有子View所需的总高度 |
| | | int totalHeight = mPaddingTop + mPaddingBottom; |
| | | //某行已使用的宽度 |
| | | int lineUsedSize = mPaddingLeft + mPaddingRight; |
| | | //用来保存某行最后占的高度,需要取同一行中最高的子View的高度 |
| | | int lineHeight = 0; |
| | | |
| | | //循环遍历每一个子View |
| | | for (int i = 0; i < getChildCount(); i++) { |
| | | View child = getChildAt(i); |
| | | if(child.getVisibility() == GONE){ |
| | | //如果子View被设置为隐藏,就跳过这个子View |
| | | continue; |
| | | } |
| | | //让子View自己去测量自己,测量之后就可以调用子View的getMeasureWidth方法获取到测量宽 |
| | | measureChild(child,widthMeasureSpec,heightMeasureSpec); |
| | | int childWidth = child.getMeasuredWidth(); //获取子View的测量宽 |
| | | int childHeight = child.getMeasuredHeight(); //获取子View的测量高 |
| | | //获取子View的布局参数LayoutParams |
| | | MarginLayoutParams mlps = (MarginLayoutParams) child.getLayoutParams(); |
| | | //计算这个孩子一共需要多少空间 |
| | | int spaceWidth = childWidth + mlps.leftMargin + mlps.rightMargin; |
| | | int spaceHeight = childHeight + mlps.topMargin + mlps.bottomMargin; |
| | | |
| | | if(lineUsedSize + spaceWidth <= widthSize){ |
| | | lineUsedSize += spaceWidth + mHorizontalSpacing; |
| | | //只要子View的高度大与之前保存的行高,就将子View的高度赋值给行高 |
| | | if(spaceHeight > lineHeight){ |
| | | lineHeight = spaceHeight; |
| | | } |
| | | }else{ //这个子View不够摆放,将放到下一行 |
| | | totalHeight += lineHeight + mVerticalSpacing; |
| | | lineUsedSize = mPaddingLeft + mPaddingRight + spaceWidth; |
| | | lineHeight = spaceHeight; |
| | | } |
| | | } |
| | | if(heightMode == MeasureSpec.EXACTLY){ |
| | | totalHeight = heightSize; |
| | | }else{ |
| | | totalHeight += lineHeight; |
| | | } |
| | | setMeasuredDimension(widthSize,totalHeight); |
| | | } |
| | | |
| | | /** |
| | | * 给子控件布局,也就是设置子控件在容器中的位置 |
| | | * @param changed |
| | | * @param l |
| | | * @param t |
| | | * @param r |
| | | * @param b |
| | | */ |
| | | @Override |
| | | protected void onLayout(boolean changed, int l, int t, int r, int b) { |
| | | //获取给容器设置的padding |
| | | int mPaddingLeft = getPaddingLeft(); |
| | | int mPaddingRight = getPaddingRight(); |
| | | int mPaddingTop = getPaddingTop(); |
| | | //子View |
| | | int lineX = mPaddingLeft; |
| | | int lineY = mPaddingTop; |
| | | int lineWidth = r - l; |
| | | //某行已使用的宽度 |
| | | int lineUsed = mPaddingLeft + mPaddingRight; |
| | | int lineHeight = 0; |
| | | for (int i = 0; i < this.getChildCount(); i++) { |
| | | View child = this.getChildAt(i); |
| | | if (child.getVisibility() == GONE) { |
| | | continue; |
| | | } |
| | | int childWidth = child.getMeasuredWidth(); //获取子View的测量宽 |
| | | int childHeight = child.getMeasuredHeight(); //获取子View的测量高 |
| | | //获取子View的布局参数LayoutParams |
| | | MarginLayoutParams mlps = (MarginLayoutParams) child.getLayoutParams(); |
| | | //计算这个孩子一共需要多少空间 |
| | | int spaceWidth = childWidth + mlps.leftMargin + mlps.rightMargin; |
| | | int spaceHeight = childHeight + mlps.topMargin + mlps.bottomMargin; |
| | | |
| | | if(lineUsed + spaceWidth > lineWidth){ //不够放了 |
| | | lineY += lineHeight + mVerticalSpacing; |
| | | //变量的重新设置 |
| | | lineUsed = mPaddingLeft + mPaddingRight; |
| | | lineX = mPaddingLeft; |
| | | lineHeight = 0; |
| | | } |
| | | //设置子View在容器中的位置 |
| | | child.layout(lineX+mlps.leftMargin,lineY+mlps.topMargin,lineX+mlps.leftMargin+childWidth,lineY+mlps.topMargin+childHeight); |
| | | if(spaceHeight > lineHeight){ |
| | | lineHeight = spaceHeight; |
| | | } |
| | | lineUsed += spaceWidth + mHorizontalSpacing; |
| | | lineX += spaceWidth + mHorizontalSpacing; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | protected LayoutParams generateLayoutParams(LayoutParams p) { |
| | | return new MarginLayoutParams(p); |
| | | } |
| | | |
| | | @Override |
| | | public LayoutParams generateLayoutParams(AttributeSet attrs) |
| | | { |
| | | return new MarginLayoutParams(getContext(), attrs); |
| | | } |
| | | |
| | | @Override |
| | | protected LayoutParams generateDefaultLayoutParams() { |
| | | return new MarginLayoutParams(super.generateDefaultLayoutParams()); |
| | | } |
| | | |
| | | /** |
| | | * 初始化自定义属性 |
| | | * @param context |
| | | * @param attrs |
| | | */ |
| | | private void inial(Context context,AttributeSet attrs) { |
| | | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.FlowLayout); |
| | | float horizontal = typedArray.getDimension(R.styleable.FlowLayout_HorizontalSpacing,15); |
| | | float verticel = typedArray.getDimension(R.styleable.FlowLayout_VerticalSpacing,15); |
| | | setHorizontalSpacing(horizontal); |
| | | setVerticalSpacing(verticel); |
| | | typedArray.recycle(); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:bottomLeftRadius="25dp" android:bottomRightRadius="25dp"/> |
| | | <solid android:color="#80000000"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="30dp"/> |
| | | <solid android:color="#E5B664"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="8dp"/> |
| | | <solid android:color="@color/darkGreen"/> |
| | | </shape> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <gradient android:startColor="#EA5E00" android:endColor="@color/white" android:angle="270"/> |
| | | <gradient |
| | | android:angle="270" |
| | | android:endColor="@color/white" |
| | | android:centerColor="#F3FFF8" |
| | | android:startColor="#F3FFF8" /> |
| | | <corners android:radius="10dp" /> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="14dp"/> |
| | | <solid android:color="@color/colorPrimary"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="17dp"/> |
| | | <solid android:color="#8AAE65"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="20dp"/> |
| | | <solid android:color="#8AAE65"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="26dp"/> |
| | | <solid android:color="@color/textGreen"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="@color/textGreen"/> |
| | | <corners android:radius="10dp"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="10dp"/> |
| | | <solid android:color="#EFF2F2"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="10dp"/> |
| | | <solid android:color="#F5F5F5"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="10dp"/> |
| | | <solid android:color="@color/textColor66"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="14dp"/> |
| | | <stroke android:color="@color/dividing_line_color" android:width="1px"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="10dp"/> |
| | | <gradient android:centerColor="@color/white" android:angle="180"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="10dp"/> |
| | | <solid android:color="#A6C586"/> |
| | | </shape> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="4dp"/> |
| | | <solid android:color="#F4420A"/> |
| | | <solid android:color="#FF0000"/> |
| | | </shape> |
| | |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <gradient android:endColor="#33999999" |
| | | android:centerColor="#15999999" |
| | | android:startColor="#00FFFFFF" android:angle="270"/> |
| | | android:startColor="#00FFFFFF" android:angle="90"/> |
| | | </shape> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <gradient android:endColor="#33999999" |
| | | android:centerColor="#15999999" |
| | | <gradient android:endColor="#333333" |
| | | android:centerColor="#25999999" |
| | | android:startColor="#00FFFFFF" android:angle="90"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="@color/white"/> |
| | | <corners android:radius="25dp"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp"/> |
| | | <solid android:color="#80ffffff"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:bottomLeftRadius="25dp" android:bottomRightRadius="25dp"/> |
| | | <solid android:color="#80ffffff"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <item android:state_selected="true" android:drawable="@mipmap/ic_full"/> |
| | | <item android:drawable="@mipmap/ic_origin"/> |
| | | |
| | | </selector> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:radius="5dp"/> |
| | | <solid android:color="#A2D7CE"/> |
| | | <size android:width="6dp" android:height="6dp"/> |
| | | </shape> |
| | |
| | | xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:id="@android:id/background"> |
| | | <shape> |
| | | <solid android:color="@color/page_bg" /> |
| | | <solid android:color="@color/white" /> |
| | | <corners android:radius="15dp"/> |
| | | </shape> |
| | | </item> |
| | |
| | | <item android:id="@android:id/progress"> |
| | | <clip> |
| | | <shape> |
| | | <solid android:color="@color/colorPrimary" /> |
| | | <solid android:color="#FDCA8F" /> |
| | | <corners android:radius="15dp"/> |
| | | |
| | | </shape> |
| | | </clip> |
| | | </item> |
| | | </layer-list> |
| | | </layer-list> |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:drawable="@mipmap/time_check" android:state_checked="true"/> |
| | | <item android:drawable="@mipmap/time_uncheck" android:state_checked="false"/> |
| | | </selector> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <item android:state_checked="true" android:drawable="@mipmap/icon_selected"/> |
| | | <item android:state_checked="false" android:drawable="@mipmap/icon_radiobutton"/> |
| | | <item android:state_checked="true" android:drawable="@mipmap/check_pay"/> |
| | | <item android:state_checked="false" android:drawable="@mipmap/uncheck_pay"/> |
| | | </selector> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <solid android:color="#B6DC90"/> |
| | | <corners android:radius="20dp"/> |
| | | <stroke android:color="@color/white" android:width="2dp"/> |
| | | <size android:width="16dp" android:height="16dp"/> |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <ImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:scaleType="fitXY" |
| | | android:src="@mipmap/bg_bgm_set"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="心泉·疗愈" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="60dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_back" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginStart="5dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | android:text="场景音" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | android:textColor="@color/textColor" |
| | | android:drawableStart="@mipmap/yinle" |
| | | android:drawablePadding="10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="28dp" |
| | | android:layout_marginStart="14dp" |
| | | app:layout_constraintStart_toStartOf="parent"/> |
| | | <SeekBar |
| | | android:layout_width="0dp" |
| | | android:layout_height="16dp" |
| | | android:progressDrawable="@drawable/progress_drawable" |
| | | app:layout_constraintStart_toEndOf="@id/iv_silent" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_max" |
| | | android:progress="50" |
| | | android:thumb="@drawable/thumb" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:layout_marginTop="27dp" |
| | | android:id="@+id/sb_voice"/> |
| | | <ImageView |
| | | android:id="@+id/iv_silent" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/jingyin" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | android:layout_marginStart="21dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_max" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/yinliang" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | android:layout_marginEnd="21dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_2" |
| | | android:text="场景" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | android:textColor="@color/textColor" |
| | | android:drawableStart="@mipmap/changjing" |
| | | android:drawablePadding="10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/sb_voice" |
| | | android:layout_marginTop="48dp" |
| | | android:layout_marginStart="14dp" |
| | | app:layout_constraintStart_toStartOf="parent"/> |
| | | <com.youth.banner.Banner |
| | | android:layout_width="match_parent" |
| | | android:layout_height="243dp" |
| | | android:layout_marginTop="30dp" |
| | | app:is_auto_loop="false" |
| | | app:is_infinite_loop="false" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:id="@+id/banner_landscape"/> |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_btn_action" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginHorizontal="45dp" |
| | | android:text="保存设置" |
| | | android:layout_marginBottom="30dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:background="@color/page_bg" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <LinearLayout |
| | | android:id="@+id/ll_bottom" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="84dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | app:layout_constraintBottom_toBottomOf="parent"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="合计" |
| | | android:layout_marginStart="19dp" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="¥" |
| | | android:layout_marginStart="5dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textGreen"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_weight="1" |
| | | android:layout_height="wrap_content" |
| | | android:text="0.00" |
| | | android:id="@+id/tv_total" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textGreen"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="34dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_marginEnd="20dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="16sp" |
| | | android:text="确认并支付" |
| | | android:gravity="center" |
| | | android:paddingHorizontal="18dp" |
| | | android:id="@+id/tv_action" |
| | | android:background="@drawable/bg_green_17dp"/> |
| | | </LinearLayout> |
| | | <CheckBox |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/ll_bottom" |
| | | android:layout_marginBottom="8dp" |
| | | android:background="@null" |
| | | android:text="我已阅读并同意" |
| | | android:padding="2dp" |
| | | android:layout_marginStart="21dp" |
| | | android:button="@drawable/selector_check_radio" |
| | | app:layout_constraintHorizontal_chainStyle="packed" |
| | | android:textColor="@color/textColor99" |
| | | android:id="@+id/cb_rule"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_buy_rule" |
| | | android:text="《课程/疗愈音频购买协议》" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/cb_rule" |
| | | app:layout_constraintStart_toEndOf="@id/cb_rule" |
| | | android:textSize="13sp" |
| | | android:paddingVertical="4dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textGreen"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="内容" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/cb_rule" |
| | | app:layout_constraintStart_toEndOf="@id/tv_buy_rule" |
| | | android:textSize="13sp" |
| | | android:paddingVertical="4dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor99"/> |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_buy_rule"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:layout_marginTop="14dp" |
| | | android:paddingBottom="22dp" |
| | | android:layout_marginHorizontal="8dp"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="84dp" |
| | | android:layout_height="84dp" |
| | | android:id="@+id/iv_cover" |
| | | app:roundedCornerRadius="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:placeholderImage="@color/page_bg" |
| | | android:layout_marginStart="13dp" |
| | | android:layout_marginTop="16dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_cover" |
| | | android:text="0.0" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textGreen" |
| | | android:layout_marginEnd="14dp" |
| | | android:layout_marginTop="11dp"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_title" |
| | | app:layout_constraintStart_toEndOf="@id/iv_cover" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_cover" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginStart="18dp" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:text="心里咨询课程" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="8dp"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_teacher" |
| | | app:layout_constraintStart_toEndOf="@id/iv_cover" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_price" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_cover" |
| | | android:layout_marginBottom="8dp" |
| | | android:layout_marginStart="18dp" |
| | | android:textStyle="bold" |
| | | android:textSize="12sp" |
| | | android:text="心里咨询课程" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginEnd="8dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_teacher" |
| | | android:text="X1" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textGreen" |
| | | android:layout_marginEnd="14dp" |
| | | android:layout_marginTop="11dp"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_cover" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:layout_marginTop="22dp" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_money" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_price" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_cover" |
| | | android:layout_marginTop="45dp" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:text="¥2988"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="@id/iv_cover" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_cover" |
| | | android:layout_marginTop="45dp" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:text="订单金额"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:id="@+id/cl_send" |
| | | android:visibility="gone" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_money" |
| | | android:layout_marginTop="22dp" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="15dp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_phone" |
| | | android:text="好友账号"/> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/et_phone" |
| | | app:layout_constraintStart_toEndOf="@id/tv_1" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginStart="26dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@drawable/bg_grey_19dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:paddingVertical="13dp" |
| | | android:paddingHorizontal="20dp" |
| | | android:inputType="number" |
| | | android:maxLength="11" |
| | | android:hint="请输入好友手机号" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="21dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_phone" |
| | | app:layout_constraintEnd_toEndOf="@id/et_phone" |
| | | android:padding="10dp" |
| | | android:text="查询账号" |
| | | android:id="@+id/tv_search" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textGreen"/> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="56dp" |
| | | android:layout_height="56dp" |
| | | android:id="@+id/iv_avatar" |
| | | app:layout_constraintTop_toBottomOf="@id/et_phone" |
| | | android:layout_marginTop="13dp" |
| | | app:roundAsCircle="true" |
| | | app:layout_constraintStart_toStartOf="@id/tv_1" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="9dp" |
| | | android:layout_marginTop="8dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv_avatar" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | tools:text="倪可乐"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_phone" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginStart="9dp" |
| | | android:layout_marginTop="2dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv_avatar" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | tools:text="13990129012"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <RadioGroup |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:layout_marginTop="14dp" |
| | | android:paddingBottom="22dp" |
| | | android:layout_marginBottom="20dp" |
| | | android:id="@+id/rg_pay" |
| | | android:layout_marginHorizontal="8dp"> |
| | | <RadioButton |
| | | android:id="@+id/rb_balance" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:button="@null" |
| | | android:text="余额抵扣" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:paddingVertical="14dp" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:layout_marginTop="18dp" |
| | | android:drawableStart="@mipmap/pay_wallet" |
| | | android:drawableEnd="@drawable/selector_check_pay" |
| | | android:checked="true" |
| | | android:drawablePadding="7dp"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:button="@null" |
| | | android:text="支付宝支付" |
| | | android:id="@+id/rb_ali" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:paddingVertical="14dp" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:drawableStart="@mipmap/pay_ali" |
| | | android:drawableEnd="@drawable/selector_check_pay" |
| | | android:drawablePadding="7dp"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:button="@null" |
| | | android:text="微信支付" |
| | | android:id="@+id/rb_wx" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:paddingVertical="14dp" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:drawableStart="@mipmap/pay_wx" |
| | | android:drawableEnd="@drawable/selector_check_pay" |
| | | android:drawablePadding="7dp"/> |
| | | </RadioGroup> |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <androidx.core.widget.NestedScrollView |
| | | android:id="@+id/scrollView" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:scrollbars="none" |
| | | app:layout_constraintBottom_toTopOf="@id/ll_bottom" |
| | | app:layout_constraintTop_toTopOf="parent"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:background="@color/page_bg" |
| | | android:orientation="vertical" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/banner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="312dp" |
| | | android:scaleType="centerCrop" |
| | | android:foreground="@color/black33" |
| | | app:is_auto_loop="true" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="13dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:background="@drawable/bg_white_10dp"> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_collected" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | android:src="@mipmap/star_empty" |
| | | android:padding="5dp" |
| | | android:layout_marginEnd="9dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name"/> |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_collected" |
| | | tools:text="跳绳训练" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginStart="10dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_time" |
| | | tools:text="10分钟|H3" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="6dp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_type" |
| | | tools:text="瘦身|手臂" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="6dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_time" |
| | | android:layout_marginTop="11dp"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_info" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_time" |
| | | android:layout_marginTop="22dp" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginHorizontal="10dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="12dp" |
| | | android:text="运动使人的体温升高,很多人在运动后由于燥"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:layout_marginTop="9dp" |
| | | android:orientation="vertical" |
| | | android:layout_marginHorizontal="14dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_height="wrap_content" |
| | | android:text="课程介绍" |
| | | android:layout_marginTop="11dp" |
| | | android:layout_marginStart="11dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_list" |
| | | android:layout_marginTop="3dp" |
| | | android:layout_marginBottom="12dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1"/> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_2" |
| | | android:layout_width="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_height="wrap_content" |
| | | android:text="更多课程" |
| | | android:layout_marginTop="18dp" |
| | | android:layout_marginStart="18dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="6dp" |
| | | android:id="@+id/rv_course" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_tip" |
| | | android:layout_gravity="center" |
| | | android:drawableStart="@mipmap/tixingtishi" |
| | | android:gravity="center" |
| | | android:textColor="@color/colorRed" |
| | | android:textSize="11sp" |
| | | android:visibility="gone" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="3dp" |
| | | android:drawablePadding="5dp" |
| | | android:text="购买后“瘦身|手臂”相关课程均可查看;\n长期有效,我们将持续为您更新。" |
| | | android:layout_marginBottom="10dp"/> |
| | | |
| | | </LinearLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="课程详情" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="55dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:id="@+id/tv_title" |
| | | android:textStyle="bold"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:src="@mipmap/back_white" |
| | | android:padding="10dp" |
| | | android:id="@+id/iv_back" |
| | | android:layout_marginStart="4dp"/> |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="70dp" |
| | | android:layout_height="80dp" |
| | | android:background="@color/white" |
| | | android:gravity="center_vertical" |
| | | android:id="@+id/ll_bottom" |
| | | app:layout_constraintBottom_toBottomOf="parent"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_start" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="match_parent" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:visibility="gone" |
| | | android:layout_marginHorizontal="45dp" |
| | | android:text="开始训练"/> |
| | | <LinearLayout |
| | | android:id="@+id/ll_bottom_1" |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginStart="14dp" |
| | | android:gravity="center" |
| | | tools:text="¥0" |
| | | android:textColor="@color/colorRed" |
| | | android:textSize="24sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="9dp" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="160dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginEnd="10dp" |
| | | android:text="立即购买" /> |
| | | </LinearLayout> |
| | | |
| | | android:id="@+id/tv_send" |
| | | android:text="赠送好友" |
| | | android:drawableStart="@mipmap/send" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="26dp" |
| | | android:textColor="@color/textColor" |
| | | android:drawablePadding="8dp" |
| | | android:gravity="center"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="34dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_marginEnd="20dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="16sp" |
| | | android:gravity="center" |
| | | android:paddingHorizontal="22dp" |
| | | android:id="@+id/tv_action" |
| | | android:background="@drawable/bg_green_17dp"/> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | <androidx.coordinatorlayout.widget.CoordinatorLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toTopOf="@id/ll_bottom" /> |
| | | android:layout_height="0dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/ll_bottom"> |
| | | |
| | | <com.google.android.material.appbar.AppBarLayout |
| | | android:id="@+id/appbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_scrollFlags="scroll|enterAlwaysCollapsed"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:id="@+id/iv_cover" |
| | | app:layout_constraintDimensionRatio="39:31" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | app:layout_constraintTop_toBottomOf="@id/iv_cover" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_teacher" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="20dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name" |
| | | tools:text="导师 张可乐"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_teacher" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="25dp" |
| | | android:textColor="@color/textColor" |
| | | tools:text="心里咨询课程" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="20sp" |
| | | android:layout_marginEnd="10dp" |
| | | android:textSize="19sp"/> |
| | | <TextView |
| | | android:id="@+id/tv_count" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:layout_marginTop="18dp" |
| | | android:textColor="#CDCDCD" |
| | | android:textSize="10sp" |
| | | android:drawablePadding="6dp" |
| | | android:drawableStart="@mipmap/ic_count_grey" |
| | | tools:text="0人"/> |
| | | <!-- 如果要indicator动画 可以换成 MotionLayout实现--> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="73dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_count" |
| | | android:background="@color/page_bg" |
| | | android:layout_marginTop="25dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/cb_intro" |
| | | android:text="简介" |
| | | android:layout_width="83dp" |
| | | android:gravity="center" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="21sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_height="40dp"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tab_1" |
| | | android:layout_width="27dp" |
| | | android:layout_height="11dp" |
| | | android:src="@mipmap/tab_indicator" |
| | | app:layout_constraintTop_toBottomOf="@id/cb_intro" |
| | | app:layout_constraintStart_toStartOf="@id/cb_intro" |
| | | app:layout_constraintEnd_toEndOf="@id/cb_intro"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tab_2" |
| | | android:layout_width="27dp" |
| | | android:layout_height="11dp" |
| | | android:visibility="gone" |
| | | android:src="@mipmap/tab_indicator" |
| | | app:layout_constraintTop_toBottomOf="@id/cb_intro" |
| | | app:layout_constraintStart_toStartOf="@id/cb_chapter" |
| | | app:layout_constraintEnd_toEndOf="@id/cb_chapter"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tab_3" |
| | | android:layout_width="27dp" |
| | | android:layout_height="11dp" |
| | | android:visibility="gone" |
| | | android:src="@mipmap/tab_indicator" |
| | | app:layout_constraintTop_toBottomOf="@id/cb_intro" |
| | | app:layout_constraintStart_toStartOf="@id/cb_push" |
| | | app:layout_constraintEnd_toEndOf="@id/cb_push"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/cb_chapter" |
| | | android:text="章节" |
| | | android:layout_width="83dp" |
| | | android:gravity="center" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor99" |
| | | app:layout_constraintStart_toEndOf="@id/cb_intro" |
| | | android:layout_height="40dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/cb_push" |
| | | android:text="相关推荐" |
| | | android:layout_width="wrap_content" |
| | | android:gravity="center" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="16sp" |
| | | android:layout_marginStart="10dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor99" |
| | | app:layout_constraintStart_toEndOf="@id/cb_chapter" |
| | | android:layout_height="40dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | |
| | | </com.google.android.material.appbar.AppBarLayout> |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/scrollView" |
| | | app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="39dp" |
| | | android:layout_marginStart="22dp" |
| | | android:text="课程介绍" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/webView" |
| | | android:layout_marginTop="19dp"/> |
| | | <TextView |
| | | android:id="@+id/tv_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="35dp" |
| | | android:layout_marginStart="22dp" |
| | | android:text="课程目录" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_chapter"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="25dp" |
| | | android:layout_marginStart="22dp" |
| | | android:text="相关推荐" |
| | | android:id="@+id/tv_2" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:id="@+id/rv_push"/> |
| | | </LinearLayout> |
| | | |
| | | </androidx.core.widget.NestedScrollView> |
| | | </androidx.coordinatorlayout.widget.CoordinatorLayout> |
| | | |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/bg" |
| | | android:background="@color/white" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_back" |
| | | android:src="@mipmap/icon_back_white" |
| | | android:padding="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginTop="44dp" |
| | | android:layout_marginStart="4dp" /> |
| | | <ImageView |
| | | android:id="@+id/iv_share" |
| | | android:layout_width="44dp" |
| | | android:layout_height="44dp" |
| | | android:src="@mipmap/ic_share" |
| | | android:padding="10dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_back" |
| | | android:layout_marginEnd="4dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_back"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="44dp" |
| | | android:layout_height="44dp" |
| | | android:id="@+id/iv_collect" |
| | | android:padding="10dp" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_share" |
| | | app:layout_constraintTop_toTopOf="@id/iv_back" |
| | | android:layout_marginEnd="7dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_back" |
| | | android:src="@mipmap/uncollect"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="课程详情" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="55dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tvTitle"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="我的已购" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:orientation="vertical" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@color/white" |
| | | android:layout_marginTop="20dp"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="80dp" |
| | | android:orientation="horizontal" |
| | | android:background="@mipmap/bg_tab" |
| | | android:layout_marginTop="5dp"> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:id="@+id/ll_1"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="已购课程" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="18sp" |
| | | android:layout_marginTop="16dp" |
| | | android:textStyle="bold" |
| | | android:layout_gravity="center" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="Purchased course" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="6sp" |
| | | android:layout_gravity="center" /> |
| | | <ImageView |
| | | android:id="@+id/iv_tab_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ind_green" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_gravity="center"/> |
| | | </LinearLayout> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:id="@+id/ll_2"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="已购音频" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="18sp" |
| | | android:layout_marginTop="16dp" |
| | | android:textStyle="bold" |
| | | android:layout_gravity="center" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="Purchased audio" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="6sp" |
| | | android:layout_gravity="center" /> |
| | | <ImageView |
| | | android:id="@+id/iv_tab_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ind_green" |
| | | android:visibility="gone" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_gravity="center"/> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/view_pager" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"/> |
| | | </LinearLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="当前等级" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_level" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:paddingBottom="21dp" |
| | | android:id="@+id/cl" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@drawable/bg_green_10dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_level" |
| | | android:background="@mipmap/bg_level" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="50dp"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_level" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_margin="16dp" |
| | | android:textSize="32sp" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:text="LV1."/> |
| | | |
| | | android:layout_marginTop="22dp" |
| | | android:layout_marginStart="16dp" |
| | | android:layout_width="88dp" |
| | | android:layout_height="21dp" |
| | | android:src="@mipmap/vip_1"/> |
| | | <ProgressBar |
| | | style="?android:attr/progressBarStyleHorizontal" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" |
| | | android:progressDrawable="@drawable/progress_drawable" |
| | | android:thumb="@null" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_level" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:max="100" |
| | | android:id="@+id/mProgressBar"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_level" |
| | | app:layout_constraintStart_toStartOf="@id/tv_level" |
| | | android:layout_marginTop="6dp" |
| | | android:id="@+id/tv_current" |
| | | android:textColor="@color/darkGreen" |
| | | app:layout_constraintTop_toBottomOf="@id/mProgressBar" |
| | | app:layout_constraintStart_toStartOf="@id/mProgressBar" |
| | | android:layout_marginTop="16dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="18dp" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:text="打卡次数:0"/> |
| | | |
| | | android:text="当前等级"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_next" |
| | | android:visibility="gone" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_count" |
| | | app:layout_constraintStart_toStartOf="@id/tv_level" |
| | | android:layout_marginTop="4dp" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:text=""/> |
| | | |
| | | android:textColor="@color/darkGreen" |
| | | app:layout_constraintTop_toBottomOf="@id/mProgressBar" |
| | | app:layout_constraintEnd_toEndOf="@id/mProgressBar" |
| | | android:layout_marginTop="16dp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_current" |
| | | android:textSize="11sp" |
| | | android:text="你离下一等级还差0经验值,加油!"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:elevation="1dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="14dp" |
| | | app:layout_constraintTop_toBottomOf="@id/cl" |
| | | android:layout_marginTop="20dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_common_text" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="14dp" |
| | | android:text="获得徽章"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:paddingBottom="24dp" |
| | | android:id="@+id/rv_medal"/> |
| | | </LinearLayout> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/icon_level" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginStart="5dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/cl"/> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="40dp" |
| | | android:id="@+id/tv_rule" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_level" |
| | | android:layout_marginTop="23dp" |
| | | android:text="心泉・疗愈 升级规则" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:gravity="center" |
| | | android:layout_marginHorizontal="32dp" |
| | | android:background="@drawable/bg_green_20dp"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_rule" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="15dp" |
| | | android:background="@color/white" |
| | | android:id="@+id/webView"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools"> |
| | | |
| | | <xyz.doikki.videoplayer.player.VideoView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintDimensionRatio="390:310" |
| | | android:id="@+id/mVideoView" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | <ImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintDimensionRatio="390:310" |
| | | android:id="@+id/iv_cover" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | <ImageView |
| | | android:layout_width="42dp" |
| | | android:layout_height="42dp" |
| | | android:id="@+id/ivPlay" |
| | | android:src="@mipmap/play_detail" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_cover" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_cover"/> |
| | | <androidx.constraintlayout.widget.Barrier |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/barrier" |
| | | app:barrierDirection="bottom" |
| | | app:constraint_referenced_ids="iv_cover,mVideoView"/> |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/barrier"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_teacher" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="20dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name" |
| | | tools:text="导师 张可乐"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_teacher" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="25dp" |
| | | android:textColor="@color/textColor" |
| | | tools:text="心里咨询课程" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="20sp" |
| | | android:layout_marginEnd="10dp" |
| | | android:textSize="19sp"/> |
| | | <TextView |
| | | android:id="@+id/tv_address" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:layout_marginTop="18dp" |
| | | android:textColor="#CDCDCD" |
| | | android:textSize="10sp" |
| | | android:drawablePadding="6dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="25dp" |
| | | android:drawableStart="@mipmap/ic_local" |
| | | tools:text="成都市武侯区府城大道西段"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="39dp" |
| | | android:layout_marginStart="22dp" |
| | | android:text="简介" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/webView" |
| | | android:layout_marginTop="19dp"/> |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:layout_marginTop="25dp" |
| | | android:layout_marginBottom="27dp" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:layout_gravity="center"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="100dp" |
| | | android:layout_height="100dp" |
| | | android:layout_marginTop="6dp" |
| | | android:layout_marginHorizontal="6dp" |
| | | android:id="@+id/iv_code"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center" |
| | | android:text="添加助教老师微信\n了解详情" |
| | | android:textSize="10sp" |
| | | android:layout_marginBottom="10dp" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="10dp"/> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_width="match_parent" |
| | | android:background="@drawable/bg_shadow_top" |
| | | android:layout_height="192dp"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_back" |
| | | android:src="@mipmap/icon_back_white" |
| | | android:padding="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginTop="44dp" |
| | | android:layout_marginStart="4dp" /> |
| | | <ImageView |
| | | android:id="@+id/iv_share" |
| | | android:layout_width="44dp" |
| | | android:layout_height="44dp" |
| | | android:src="@mipmap/ic_share" |
| | | android:padding="10dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_back" |
| | | android:layout_marginEnd="4dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_back"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="44dp" |
| | | android:layout_height="44dp" |
| | | android:id="@+id/iv_collect" |
| | | android:padding="10dp" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_share" |
| | | app:layout_constraintTop_toTopOf="@id/iv_back" |
| | | android:layout_marginEnd="7dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_back" |
| | | android:src="@mipmap/uncollect"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="课程详情" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="55dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_contact" |
| | | android:src="@mipmap/ic_contact" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="180dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <androidx.coordinatorlayout.widget.CoordinatorLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/page_bg"> |
| | | |
| | | <com.google.android.material.appbar.AppBarLayout |
| | | android:id="@+id/appbar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_scrollFlags="scroll|enterAlwaysCollapsed"> |
| | | <com.youth.banner.Banner |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:id="@+id/banner" |
| | | app:indicator_selected_width="13dp" |
| | | app:indicator_normal_width="5dp" |
| | | app:indicator_height="5dp" |
| | | app:is_auto_loop="false" |
| | | app:layout_constraintDimensionRatio="39:31" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </com.google.android.material.appbar.AppBarLayout> |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/scrollView" |
| | | app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="25dp" |
| | | android:layout_marginTop="30dp" |
| | | android:textSize="20sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/darkGreen" |
| | | tools:text="心泉疗愈馆"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | android:layout_marginEnd="25dp" |
| | | android:layout_marginTop="4dp" |
| | | android:text="Xin quan" |
| | | android:textColor="@color/darkGreen"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginHorizontal="25dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/darkGreen"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_phone" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginTop="25dp" |
| | | android:layout_marginStart="28dp" |
| | | android:drawableStart="@mipmap/detail_call" |
| | | android:drawablePadding="6dp" |
| | | android:textSize="9sp" |
| | | android:textColor="@color/textColor" |
| | | tools:text="0431- 90129012"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_address" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_phone" |
| | | android:layout_marginTop="9dp" |
| | | android:layout_marginStart="28dp" |
| | | android:drawableStart="@mipmap/detail_address" |
| | | android:drawablePadding="6dp" |
| | | android:textSize="9sp" |
| | | android:textColor="@color/textColor" |
| | | tools:text="成都市武侯区府城大道西段"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_time" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_address" |
| | | android:layout_marginTop="9dp" |
| | | android:layout_marginStart="28dp" |
| | | android:drawableStart="@mipmap/detail_time" |
| | | android:drawablePadding="6dp" |
| | | android:textSize="9sp" |
| | | android:textColor="@color/textColor" |
| | | tools:text="成都市武侯区府城大道西段"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_2" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_time" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="25dp" |
| | | android:layout_marginTop="40dp" |
| | | android:textSize="20sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/darkGreen" |
| | | android:text="简介"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_2" |
| | | android:layout_marginEnd="25dp" |
| | | android:layout_marginTop="4dp" |
| | | android:text="synopsis" |
| | | android:textColor="@color/darkGreen"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:layout_marginHorizontal="25dp" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/darkGreen"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/webView" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:layout_marginTop="30dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | </androidx.coordinatorlayout.widget.CoordinatorLayout> |
| | | |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/bg" |
| | | android:background="@color/white" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_back" |
| | | android:src="@mipmap/icon_back_white" |
| | | android:padding="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginTop="44dp" |
| | | android:layout_marginStart="4dp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="疗愈馆详情" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="55dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tvTitle"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/wenti" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="16dp" |
| | | android:layout_marginTop="20dp" |
| | | android:id="@+id/iv"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_question" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="18dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | android:layout_marginStart="7dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="12dp" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | tools:text="关于账户问题"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_answer" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_question" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | android:layout_marginStart="7dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="12dp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/textColor66" |
| | | android:textSize="12sp" |
| | | tools:text="关于账户问题"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | android:layout_marginHorizontal="16dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_answer" |
| | | android:layout_marginTop="11dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor66" |
| | | android:text="咨询客服" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginBottom="30dp"/> |
| | | |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_code" |
| | | android:layout_width="96dp" |
| | | android:layout_height="96dp" |
| | | android:layout_gravity="center" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_1" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:actualImageScaleType="centerInside" |
| | | app:roundingBorderColor="@color/white" |
| | | app:placeholderImage="@color/page_bg" |
| | | android:layout_marginBottom="4dp" |
| | | app:roundingBorderWidth="8dp"/> |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_answer" |
| | | android:layout_marginTop="30dp" |
| | | android:background="@drawable/bg_grey_10dp_web" |
| | | app:layout_constraintBottom_toTopOf="@id/iv_code" |
| | | android:layout_marginBottom="50dp" |
| | | android:padding="10dp" |
| | | android:layout_marginHorizontal="16dp"> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/transparent" |
| | | android:id="@+id/webView"/> |
| | | </RelativeLayout> |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_search" |
| | | android:text="搜索" |
| | | android:textColor="@color/black" |
| | | android:textSize="17sp" |
| | | android:layout_marginEnd="10dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_search" |
| | | android:padding="10dp" |
| | | /> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_height="42dp" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_search" |
| | | android:layout_marginEnd="3dp" |
| | | android:background="@drawable/bg_white_20dp" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginStart="20dp" |
| | | android:gravity="center_vertical" |
| | | android:drawablePadding="9dp" |
| | | android:hint="请输入冥想搜索内容" |
| | | android:singleLine="true" |
| | | android:paddingStart="15dp" |
| | | android:drawableStart="@mipmap/ic_search_grey"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | app:layout_constraintStart_toStartOf="@id/et_search" |
| | | android:text="历史搜索" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="17sp" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="30dp" |
| | | android:id="@+id/tv_1"/> |
| | | <com.sinata.xqmuse.views.FlowLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/fl_his" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:layout_marginTop="15dp" |
| | | app:VerticalSpacing="10dp" |
| | | app:HorizontalSpacing="11dp" |
| | | android:layout_marginHorizontal="20dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/fl_his" |
| | | app:layout_constraintStart_toStartOf="@id/et_search" |
| | | android:text="热门搜索" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="17sp" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="30dp" |
| | | android:id="@+id/tv_2"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_hot" |
| | | android:paddingTop="10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:layout_marginHorizontal="19dp" |
| | | android:layout_marginTop="21dp" |
| | | android:minHeight="385dp" |
| | | android:background="@mipmap/bg_rv_hot"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.core.widget.NestedScrollView> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_cancel" |
| | | android:text="取消" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="17sp" |
| | | android:layout_marginEnd="10dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_search" |
| | | android:padding="10dp" |
| | | /> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_height="42dp" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_cancel" |
| | | android:layout_marginEnd="3dp" |
| | | android:background="@drawable/bg_white_20dp" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginStart="20dp" |
| | | android:gravity="center_vertical" |
| | | android:drawablePadding="9dp" |
| | | android:hint="搜索内容" |
| | | android:imeActionLabel="搜索" |
| | | android:imeOptions="actionSearch" |
| | | android:singleLine="true" |
| | | android:paddingStart="15dp" |
| | | android:drawableStart="@mipmap/ic_search_grey"/> |
| | | |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="16dp"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginHorizontal="18dp" |
| | | android:id="@+id/rv_result" /> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_empty" |
| | | android:visibility="gone" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | android:layout_marginTop="50dp" |
| | | android:text="暂未找到相关内容哦~" |
| | | android:gravity="center" |
| | | android:drawableTop="@mipmap/wu" |
| | | android:drawablePadding="25dp" |
| | | android:textSize="13sp"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_search" |
| | | android:text="搜索" |
| | | android:textColor="@color/black" |
| | | android:textSize="17sp" |
| | | android:layout_marginEnd="10dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_search" |
| | | android:padding="10dp" |
| | | /> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_height="42dp" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_search" |
| | | android:layout_marginEnd="3dp" |
| | | android:background="@drawable/bg_white_20dp" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginStart="20dp" |
| | | android:gravity="center_vertical" |
| | | android:drawablePadding="9dp" |
| | | android:hint="请输入冥想搜索内容" |
| | | android:singleLine="true" |
| | | android:paddingStart="15dp" |
| | | android:drawableStart="@mipmap/ic_search_grey"/> |
| | | |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="16dp"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/rv_result" /> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_empty" |
| | | android:visibility="gone" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | android:layout_marginTop="50dp" |
| | | android:text="暂未找到相关内容哦~" |
| | | android:gravity="center" |
| | | android:drawableTop="@mipmap/wu" |
| | | android:drawablePadding="25dp" |
| | | android:textSize="13sp"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="联系客服" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="30dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_height="0dp"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_code" |
| | | android:layout_width="132dp" |
| | | android:layout_height="132dp" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="10dp" |
| | | app:actualImageScaleType="centerInside" |
| | | app:roundingBorderColor="@color/white" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundingBorderWidth="10dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="扫码添加客服微信" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="13dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:paddingTop="30dp" |
| | | android:paddingBottom="20dp" |
| | | android:background="@color/white" |
| | | android:layout_marginTop="40dp" |
| | | android:text="问题类型" |
| | | android:paddingHorizontal="18dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | android:id="@+id/rv_list"/> |
| | | </LinearLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | android:background="#FAFAFA"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="设置" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | <LinearLayout |
| | | android:id="@+id/ll" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:background="@color/white"> |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="25dp" |
| | | android:layout_marginStart="7dp" |
| | | android:layout_marginEnd="4dp" |
| | | android:background="@drawable/bg_white_15dp"> |
| | | <TextView |
| | | android:id="@+id/tv_phone" |
| | | android:id="@+id/tv_bind" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="修改绑定手机" |
| | | android:textStyle="bold" |
| | | android:text="账号绑定" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | <View |
| | |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_pwd" |
| | | android:id="@+id/tv_clear" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="修改密码" |
| | | android:textStyle="bold" |
| | | android:text="清理缓存" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_about" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="关于心泉" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | <View |
| | |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="注销账号" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_rule" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="协议政策" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="49dp" |
| | | app:layout_constraintTop_toBottomOf="@id/ll" |
| | | android:layout_marginStart="7dp" |
| | | android:layout_marginEnd="4dp" |
| | | android:layout_marginTop="9dp" |
| | | android:text="切换账号" |
| | | android:id="@+id/tv_switch" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="17sp" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_white_15dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="49dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_switch" |
| | | android:layout_marginStart="7dp" |
| | | android:layout_marginEnd="4dp" |
| | | android:layout_marginTop="9dp" |
| | | android:text="退出登录" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="17sp" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_white_15dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/white" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | android:layout_height="match_parent"> |
| | | |
| | | <ImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:src="@mipmap/bg_share" |
| | | android:scaleType="fitXY" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/bg_born" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:scaleType="centerCrop"/> |
| | | <cn.sinata.xldutils.view.TitleBar |
| | | android:layout_marginTop="44dp" |
| | | android:text="推广活动" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_back" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="4dp" |
| | | android:padding="10dp" |
| | | android:src="@mipmap/back" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" /> |
| | | <TextView |
| | | android:id="@+id/tv_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="邀好友赚分佣抽成" |
| | | android:textSize="35sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="60dp" |
| | | android:fontFamily="@font/fly_flower_song" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textGreen" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="Invite friends to earn a commission" |
| | | android:textSize="9sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:fontFamily="@font/fly_flower_song" |
| | | android:textColor="@color/textGreen" /> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_code" |
| | | android:layout_width="150dp" |
| | | android:layout_height="150dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_gravity="center" |
| | | app:roundedCornerRadius="10dp" |
| | | android:layout_marginTop="50dp" |
| | | app:actualImageScaleType="centerInside" |
| | | app:roundingBorderColor="@color/white" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundingBorderWidth="10dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="45dp" |
| | | android:id="@+id/titleBar" |
| | | android:layout_marginTop="40dp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | android:layout_height="42dp" |
| | | android:id="@+id/tv_action" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_code" |
| | | android:layout_marginTop="23dp" |
| | | android:text="分享给好友赚佣金" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:gravity="center" |
| | | android:layout_marginHorizontal="52dp" |
| | | android:background="@drawable/bg_green_20dp"/> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:orientation="vertical" |
| | | app:layout_constraintTop_toBottomOf="@id/titleBar" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:layout_marginBottom="30dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_action" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@drawable/bg_gradient_share"> |
| | | android:layout_marginHorizontal="20dp" |
| | | android:layout_marginTop="30dp" |
| | | android:background="@drawable/bg_gradient_vertical" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:text="分享二维码" |
| | | android:gravity="center" |
| | | android:layout_marginTop="17dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp"/> |
| | | <ImageView |
| | | android:layout_width="200dp" |
| | | android:layout_height="200dp" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="13dp" |
| | | android:id="@+id/iv_code" |
| | | android:scaleType="centerCrop" /> |
| | | <LinearLayout |
| | | android:layout_marginTop="20dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="我的邀请人:" |
| | | android:layout_marginStart="9dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:id="@+id/tv_my_invitor" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_weight="1" |
| | | android:layout_height="35dp" |
| | | android:textSize="12sp" |
| | | android:id="@+id/et_code" |
| | | android:paddingHorizontal="11dp" |
| | | android:visibility="gone" |
| | | android:maxLength="6" |
| | | android:singleLine="true" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginBottom="10dp" |
| | | android:background="@drawable/bg_grey_line_8dp" |
| | | android:hint="输入邀请码后绑定"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="绑定" |
| | | android:textColor="@color/white" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_2" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="8dp" |
| | | android:paddingVertical="8dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:visibility="gone" |
| | | android:layout_marginStart="14dp" |
| | | android:paddingHorizontal="20dp" |
| | | android:background="@drawable/bg_green_8dp" |
| | | android:id="@+id/tv_bind"/> |
| | | <ImageView |
| | | android:id="@+id/iv_scan" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="10dp" |
| | | android:layout_marginEnd="3dp" |
| | | android:layout_gravity="center" |
| | | android:visibility="gone" |
| | | android:layout_marginBottom="5dp" |
| | | android:padding="5dp" |
| | | android:src="@mipmap/saomaicon"/> |
| | | </LinearLayout> |
| | | <TextView |
| | | android:id="@+id/tv_my_friend" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="我邀请的好友:" |
| | | android:layout_marginStart="9dp" |
| | | android:textSize="12sp" |
| | | android:text="分佣规则说明" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | android:layout_marginTop="13dp" |
| | | android:layout_marginHorizontal="10dp"/> |
| | | <ScrollView |
| | | android:textSize="15sp" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="25dp"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginTop="13dp"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_marginStart="9dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:paddingBottom="5dp" |
| | | android:id="@+id/tv_rule" |
| | | android:textColor="@color/textColor" |
| | | android:layout_height="wrap_content"/> |
| | | </ScrollView> |
| | | android:layout_marginTop="15dp" |
| | | android:background="@color/white" |
| | | android:id="@+id/webView"/> |
| | | </LinearLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:placeholderImage="@mipmap/bg_hehua" |
| | | app:placeholderImage="@mipmap/splash" |
| | | app:placeholderImageScaleType="centerCrop" /> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="100dp" |
| | | android:layout_height="match_parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:id="@+id/rv_type"/> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toEndOf="@id/rv_type" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_height="match_parent"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/rv_list" /> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | <TextView |
| | | android:id="@+id/tv_empty" |
| | | android:visibility="gone" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="@id/refreshLayout" |
| | | app:layout_constraintEnd_toEndOf="@id/refreshLayout" |
| | | app:layout_constraintTop_toTopOf="@id/refreshLayout" |
| | | app:layout_constraintBottom_toBottomOf="@id/refreshLayout" |
| | | android:layout_marginBottom="20dp" |
| | | android:text="暂未找到相关内容哦~" |
| | | android:gravity="center" |
| | | android:drawableTop="@mipmap/wu" |
| | | android:drawablePadding="25dp" |
| | | android:textSize="13sp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="#F4F8FB"> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_height="match_parent"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:background="@color/white" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_height="wrap_content"> |
| | | <ImageView |
| | | android:id="@+id/iv_more" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginEnd="15dp" |
| | | android:src="@mipmap/more_black" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_avatar" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" /> |
| | | |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_avatar" |
| | | android:layout_width="44dp" |
| | | android:layout_height="44dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginEnd="20dp" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_more" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundAsCircle="true" /> |
| | | |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="头像" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_avatar" |
| | | android:text="个人资料" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_avatar" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:gravity="end" |
| | | android:textColor="@color/textColor99" |
| | | android:hint="请输入" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_avatar" /> |
| | | |
| | | <TextView |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_1" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="姓名" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_name" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_1" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_1" |
| | | android:id="@+id/iv_back"/> |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" /> |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="10dp"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_height="wrap_content"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_avatar" |
| | | android:layout_width="99dp" |
| | | android:layout_height="99dp" |
| | | android:layout_marginTop="38dp" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundAsCircle="true" /> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/avatar" |
| | | app:layout_constraintStart_toStartOf="@id/iv_avatar" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_avatar" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_avatar"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_sex" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor99" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:gravity="end" |
| | | android:hint="请选择" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" /> |
| | | <EditText |
| | | android:id="@+id/et_nick" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginTop="30dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:textColor="@color/textColor" |
| | | android:singleLine="true" |
| | | android:hint="点击输入" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_avatar" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="性别" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_sex" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="昵称" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_nick" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_sex" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_nick" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_birth" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:textColor="@color/textColor99" |
| | | android:gravity="end" |
| | | android:hint="请选择" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_sex" /> |
| | | <EditText |
| | | android:id="@+id/et_name" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_nick" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="生日" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_birth" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="姓名" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_name" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_birth" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_name" /> |
| | | <EditText |
| | | android:id="@+id/et_sign" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_name" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_height" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:textColor="@color/textColor99" |
| | | android:gravity="end" |
| | | android:hint="请输入" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_birth" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="签名" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_sign" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="身高" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_height" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_sign" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_height" /> |
| | | <TextView |
| | | android:id="@+id/tv_sex" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:gravity="end" |
| | | app:layout_constraintTop_toBottomOf="@id/et_sign" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_weight" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/textColor99" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:gravity="end" |
| | | android:hint="请输入" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_height" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="性别" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_sex" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="体重" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_weight" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_sex" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_weight" /> |
| | | <TextView |
| | | android:id="@+id/tv_birth" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:textColor="@color/textColor" |
| | | android:gravity="end" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_sex" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_waistline" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:drawableEnd="@mipmap/more_black" |
| | | android:textColor="@color/textColor99" |
| | | android:gravity="end" |
| | | android:hint="请输入" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_weight" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="生日" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_birth" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="腰围" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_waistline" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_birth" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_waistline" /> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <EditText |
| | | android:id="@+id/et_edu" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_birth" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="学历" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_edu" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_edu" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_profess" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_edu" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="行业" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_profess" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_profess" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_company" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_profess" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="公司" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_company" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_company" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_job" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_company" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="职位" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_job" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_job" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_location" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_job" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="所在地" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_location" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_location" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_homeland" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/et_location" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="故乡" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_homeland" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_homeland" /> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_mail" |
| | | style="@style/style_form_text" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="100dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginEnd="14dp" |
| | | android:gravity="end" |
| | | android:hint="点击输入" |
| | | android:singleLine="true" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | app:layout_constraintTop_toBottomOf="@id/et_homeland" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="15dp" |
| | | android:text="邮箱" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_mail" |
| | | app:layout_constraintStart_toStartOf="parent" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/et_mail" /> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </ScrollView> |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="会员中心" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | |
| | | <CheckBox |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="38dp" |
| | | android:background="@null" |
| | | android:text="同意" |
| | | android:padding="2dp" |
| | | android:layout_marginStart="20dp" |
| | | android:button="@drawable/selector_check_radio" |
| | | app:layout_constraintHorizontal_chainStyle="packed" |
| | | android:textColor="@color/textColor66" |
| | | android:id="@+id/cb_rule"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_rule" |
| | | android:text="@string/vip_rule" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/cb_rule" |
| | | app:layout_constraintStart_toEndOf="@id/cb_rule" |
| | | android:textSize="13sp" |
| | | android:paddingVertical="4dp" |
| | | android:textColor="@color/textGreen"/> |
| | | |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toTopOf="@id/cb_rule" |
| | | android:layout_marginBottom="20dp" |
| | | android:textSize="18sp" |
| | | android:paddingVertical="15sp" |
| | | android:gravity="center" |
| | | android:id="@+id/tv_action" |
| | | android:text="立即开通" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:layout_marginHorizontal="21dp" |
| | | android:background="@drawable/bg_green_26dp"/> |
| | | |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_marginTop="55dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_action"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/bg_vip" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="364:113" |
| | | android:background="@mipmap/no_vip" |
| | | android:layout_marginHorizontal="13dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="心泉·疗愈会员" |
| | | app:layout_constraintTop_toTopOf="@id/bg_vip" |
| | | app:layout_constraintStart_toStartOf="@id/bg_vip" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginTop="23dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="22sp" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="升级为高级会员,解锁全部体验" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg_vip" |
| | | app:layout_constraintStart_toStartOf="@id/bg_vip" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginBottom="17dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="10sp"/> |
| | | <TextView |
| | | android:id="@+id/tv_vip" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="你还未开通会员服务" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg_vip" |
| | | app:layout_constraintEnd_toEndOf="@id/bg_vip" |
| | | android:layout_margin="18dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="8sp"/> |
| | | <TextView |
| | | android:id="@+id/tv_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/bg_vip" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="31dp" |
| | | android:layout_marginTop="28dp" |
| | | android:text="VIP会员套餐" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="9dp" |
| | | android:id="@+id/rv_price" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1"/> |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/webView" |
| | | android:layout_marginTop="18dp" |
| | | app:layout_constraintTop_toBottomOf="@id/rv_price"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/iv_bg" |
| | | app:placeholderImage="@mipmap/bg_heye" |
| | | app:placeholderImageScaleType="centerCrop" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="心泉·疗愈" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/white" |
| | | android:layout_marginTop="60dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_back" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back_white" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginStart="5dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ic_share" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:padding="10dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:id="@+id/iv_share"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/uncollect" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_share" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:padding="10dp" |
| | | android:id="@+id/iv_collect"/> |
| | | <SeekBar |
| | | android:layout_width="0dp" |
| | | android:layout_height="16dp" |
| | | android:progressDrawable="@drawable/progress_drawable" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_volume" |
| | | android:progress="0" |
| | | android:thumb="@drawable/thumb" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginStart="60dp" |
| | | android:layout_marginEnd="50dp" |
| | | android:layout_marginBottom="80dp" |
| | | android:id="@+id/sb_voice"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ic_volume_set" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="13dp" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | android:padding="10dp" |
| | | android:id="@+id/iv_volume" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_progress" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" |
| | | android:text="00:00" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | app:layout_constraintEnd_toStartOf="@id/sb_voice"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_total" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" |
| | | android:text="00:00" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | app:layout_constraintStart_toEndOf="@id/sb_voice"/> |
| | | <TextView |
| | | android:id="@+id/tv_comment" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:drawableTop="@mipmap/ic_comment" |
| | | app:layout_constraintBottom_toTopOf="@id/iv_volume" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginBottom="16dp" |
| | | android:drawablePadding="8dp" |
| | | android:text="0" |
| | | android:textStyle="bold" |
| | | android:gravity="center" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | android:layout_marginEnd="20dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ic_time_set" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_comment" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginStart="13dp" |
| | | android:id="@+id/iv_time"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ic_recycle" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_comment" |
| | | app:layout_constraintStart_toEndOf="@id/iv_time" |
| | | android:padding="10dp" |
| | | android:id="@+id/iv_recycle"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_subtitle" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_comment" |
| | | android:layout_marginHorizontal="22dp" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:textSize="14sp" |
| | | android:lineSpacingExtra="8dp" |
| | | android:lines="2" |
| | | android:text="聆听大自然,感受大自然的美,感受海浪带给我们的宁静。"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="22dp" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_subtitle" |
| | | android:text="海浪减压" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:textSize="26sp" |
| | | android:textStyle="bold" |
| | | android:layout_marginBottom="20dp"/> |
| | | <ImageView |
| | | android:id="@+id/iv_play" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/play_detail" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_name"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/center" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="10dp" |
| | | android:layout_marginTop="40dp" |
| | | android:layout_marginEnd="40dp" |
| | | android:text="充值" |
| | | android:layout_marginBottom="50dp" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | <TextView |
| | | android:id="@+id/tv_withdraw" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/center" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginEnd="10dp" |
| | | android:layout_marginTop="40dp" |
| | | android:textColor="@color/colorPrimary" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_action" |
| | | android:background="@drawable/bg_orange_line_20dp" |
| | | android:layout_marginStart="40dp" |
| | | android:text="提现" /> |
| | | <View |
| | | android:id="@+id/center" |
| | | android:layout_width="1dp" |
| | | android:layout_height="15dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | <View |
| | | android:id="@+id/bg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="248dp" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:background="@color/colorPrimary"/> |
| | | <cn.sinata.xldutils.view.TitleBar |
| | | android:layout_width="match_parent" |
| | | android:layout_height="44dp" |
| | | android:id="@+id/titleBar" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="40dp" /> |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_withdraw_record" |
| | | android:text="钱包" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/titleBar" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:layout_margin="14dp" |
| | | android:textSize="12sp" |
| | | android:text="@string/withdraw_record"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_withdraw_record" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:layout_marginStart="14dp" |
| | | android:textSize="12sp" |
| | | android:text="当前余额"/> |
| | | <TextView |
| | | android:id="@+id/tv_balance" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_withdraw_record" |
| | | android:layout_marginStart="14dp" |
| | | android:textSize="32sp" |
| | | /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="50dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:background="@drawable/bg_white_top_10dp" |
| | | android:id="@+id/bg_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg" |
| | | android:layout_marginBottom="6dp" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="@id/bg_title" |
| | | app:layout_constraintStart_toStartOf="@id/bg_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg_title" |
| | | android:layout_marginStart="14dp" |
| | | android:text="变动明细" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:id="@+id/tv_1" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | | android:id="@+id/tv_month" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_1" |
| | | android:paddingVertical="5dp" |
| | | android:background="@drawable/bg_green_line_22dp" |
| | | app:layout_constraintStart_toEndOf="@id/tv_1" |
| | | android:layout_marginStart="14dp" |
| | | android:textColor="@color/colorPrimary" |
| | | android:textSize="12sp" |
| | | android:drawableEnd="@mipmap/more_green" |
| | | android:text="请选择" |
| | | android:paddingHorizontal="10dp" |
| | | android:layout_width="110dp" |
| | | android:layout_height="wrap_content"/> |
| | | <TextView |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="重置" |
| | | android:textColor="@color/white" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_1" |
| | | app:layout_constraintEnd_toEndOf="@id/bg_title" |
| | | android:layout_marginEnd="10dp" |
| | | android:paddingVertical="5dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="20dp" |
| | | android:background="@drawable/bg_green_25dp" |
| | | android:id="@+id/tv_reset"/> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/refreshLayout" |
| | | app:layout_constraintTop_toBottomOf="@id/bg_title" |
| | | app:layout_constraintStart_toStartOf="@id/bg_title" |
| | | android:layout_marginTop="1dp" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_action" |
| | | android:layout_marginBottom="20dp" |
| | | android:background="@drawable/bg_white_bottom_10dp" |
| | | app:layout_constraintEnd_toEndOf="@id/bg_title"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/rv_list"/> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:elevation="2dp" |
| | | android:background="@mipmap/bg_wallet" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="50dp" |
| | | android:layout_marginHorizontal="13dp"> |
| | | <TextView |
| | | android:id="@+id/tv_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="26dp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginStart="30dp" |
| | | android:textSize="15sp" |
| | | android:text="可用余额 (元)"/> |
| | | <TextView |
| | | android:id="@+id/tv_balance" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="@id/tv_2" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:textSize="35sp" |
| | | android:text="0.00" |
| | | /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_3" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_balance" |
| | | app:layout_constraintStart_toStartOf="@id/tv_balance" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="20dp" |
| | | android:text="充值 (元)"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_4" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_balance" |
| | | app:layout_constraintStart_toEndOf="@id/tv_3" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="20dp" |
| | | android:text="收益 (元)"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_recharge_money" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_3" |
| | | app:layout_constraintStart_toStartOf="@id/tv_balance" |
| | | android:textSize="20sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="4dp" |
| | | android:text="0"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_income" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_3" |
| | | app:layout_constraintStart_toStartOf="@id/tv_4" |
| | | android:textSize="20sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="4dp" |
| | | android:text="0"/> |
| | | |
| | | <View |
| | | android:id="@+id/center" |
| | | android:layout_width="1dp" |
| | | android:layout_height="15dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/center" |
| | | android:layout_height="49dp" |
| | | android:layout_marginStart="6dp" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginEnd="13dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:text="充值" |
| | | android:gravity="center" |
| | | android:textColor="@color/textColor" |
| | | android:background="@drawable/bg_white_25dp" |
| | | android:layout_marginBottom="20dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_recharge_money"/> |
| | | <TextView |
| | | android:id="@+id/tv_withdraw" |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/center" |
| | | android:layout_height="49dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:textColor="@color/textColor" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_white_25dp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_action" |
| | | android:layout_marginStart="13dp" |
| | | android:text="提现" /> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="390:490" |
| | | android:background="@mipmap/bg_mine"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="观看历史" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:layout_marginTop="44dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/back" |
| | | android:padding="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:id="@+id/iv_back"/> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:orientation="vertical" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@color/white" |
| | | android:layout_marginTop="20dp"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="80dp" |
| | | android:orientation="horizontal" |
| | | android:background="@mipmap/bg_tab" |
| | | android:layout_marginTop="5dp"> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:id="@+id/ll_1"> |
| | | <TextView |
| | | android:id="@+id/tv_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="疗愈" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="18sp" |
| | | android:layout_marginTop="16dp" |
| | | android:textStyle="bold" |
| | | android:layout_gravity="center" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="Meditate" |
| | | android:textColor="@color/darkGreen" |
| | | android:id="@+id/tv_2" |
| | | android:textSize="6sp" |
| | | android:layout_gravity="center" /> |
| | | <ImageView |
| | | android:id="@+id/iv_tab_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ind_green" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_gravity="center"/> |
| | | </LinearLayout> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical" |
| | | android:id="@+id/ll_2"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="课程" |
| | | android:id="@+id/tv_3" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="18sp" |
| | | android:layout_marginTop="16dp" |
| | | android:textStyle="bold" |
| | | android:layout_gravity="center" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="course" |
| | | android:id="@+id/tv_4" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="6sp" |
| | | android:layout_gravity="center" /> |
| | | <ImageView |
| | | android:id="@+id/iv_tab_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ind_green" |
| | | android:visibility="gone" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_gravity="center"/> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/view_pager" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"/> |
| | | </LinearLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="设置生日" |
| | | android:text="" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="18dp"/> |
| | | <ImageView |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_close" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_action" |
| | | android:layout_marginStart="4dp" |
| | | android:text="取消" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:padding="10dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_action" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textColor="@color/colorPrimary" |
| | | android:textSize="15sp" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:text="确认" |
| | | android:layout_marginEnd="4dp" |
| | | android:padding="10dp" |
| | | android:layout_marginTop="3dp" |
| | | android:layout_marginEnd="5dp" |
| | | android:src="@mipmap/icon_close"/> |
| | | android:textStyle="bold"/> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_title" |
| | | android:layout_width="fill_parent" |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_height="wrap_content" |
| | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_content" |
| | | android:layout_width="fill_parent" |
| | | android:layout_width="match_parent" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_height="160dp" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/ll_title" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:orientation="horizontal"> |
| | | |
| | | <cn.sinata.xldutils.view.WheelView |
| | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_action" |
| | | app:layout_constraintTop_toBottomOf="@id/ll_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:text="保存" |
| | | android:paddingVertical="10dp" |
| | | android:paddingHorizontal="70dp" |
| | | android:textStyle="bold" |
| | | android:background="@drawable/bg_orange_20dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:paddingBottom="18dp" |
| | | android:background="@drawable/bg_white_10dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/rg_title" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:orientation="horizontal" |
| | | android:text="课程/疗愈音频购买协议" |
| | | android:gravity="center" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textGreen" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="5dp" |
| | | android:background="@drawable/bg_shadow_bottom" |
| | | app:layout_constraintTop_toBottomOf="@id/rg_title" |
| | | android:layout_marginTop="11dp"/> |
| | | |
| | | <WebView |
| | | android:id="@+id/sc_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="450dp" |
| | | android:paddingStart="14dp" |
| | | android:paddingEnd="14dp" |
| | | app:layout_constraintTop_toBottomOf="@id/rg_title" |
| | | android:layout_marginTop="26dp"/> |
| | | |
| | | <androidx.constraintlayout.widget.Guideline |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:id="@+id/center" |
| | | app:layout_constraintGuide_percent="0.5" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_cancel" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center" |
| | | android:text="拒绝" |
| | | android:textColor="@color/colorPrimary" |
| | | android:textSize="14sp" |
| | | android:background="@drawable/bg_green_line_22dp" |
| | | app:layout_constraintEnd_toStartOf="@id/center" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:paddingTop="9dp" |
| | | android:paddingBottom="9dp" |
| | | android:paddingHorizontal="35dp" |
| | | android:layout_marginTop="20dp" |
| | | app:layout_constraintTop_toBottomOf="@id/sc_content" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_ok" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center" |
| | | android:text="同意" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:paddingTop="9dp" |
| | | android:paddingBottom="9dp" |
| | | android:paddingHorizontal="35dp" |
| | | android:background="@drawable/bg_btn_dialog_ok" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/center" |
| | | app:layout_constraintTop_toTopOf="@id/tv_cancel" /> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@drawable/bg_white_top_20dp"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="55dp" |
| | | android:id="@+id/tv_man" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:text="男" |
| | | android:gravity="center" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textColor66"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="55dp" |
| | | android:id="@+id/tv_woman" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:text="女" |
| | | android:gravity="center" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textColor66"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="55dp" |
| | | android:id="@+id/tv_hide" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:text="保密" |
| | | android:gravity="center" |
| | | android:textStyle="bold" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textColor66"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="55dp" |
| | | android:id="@+id/tv_cancel" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:text="取消" |
| | | android:gravity="center" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/textColor66"/> |
| | | </LinearLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@drawable/bg_white_top_20dp" |
| | | android:paddingBottom="30dp" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="0条提问" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="18dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_close" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginEnd="5dp" |
| | | android:src="@mipmap/close"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/textColor66" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_margin="21dp"/> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="420dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="22dp" |
| | | android:id="@+id/refreshLayout"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_list" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"/> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/textColor66" |
| | | app:layout_constraintTop_toBottomOf="@id/refreshLayout"/> |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | app:layout_constraintTop_toBottomOf="@id/refreshLayout" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="发布" |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:textSize="12sp" |
| | | android:layout_marginEnd="40dp" |
| | | android:layout_marginTop="24dp" |
| | | android:layout_width="53dp" |
| | | android:layout_height="30dp" |
| | | android:background="@drawable/bg_green_14"/> |
| | | <EditText |
| | | android:layout_width="0dp" |
| | | android:layout_height="30dp" |
| | | android:background="@drawable/bg_grey_line_14dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_action" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_action" |
| | | android:layout_marginStart="40dp" |
| | | android:singleLine="true" |
| | | android:hint="留下你的精彩评论吧" |
| | | android:paddingHorizontal="15dp" |
| | | android:textSize="11sp" |
| | | android:gravity="center_vertical" |
| | | android:layout_marginEnd="14dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.core.widget.NestedScrollView> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@drawable/bg_white_top_20dp" |
| | | android:orientation="vertical" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_report" |
| | | android:text="举报提问" |
| | | android:gravity="center" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/colorPrimary" |
| | | android:textSize="15sp" |
| | | android:paddingVertical="17dp" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_cancel" |
| | | android:text="取消" |
| | | android:gravity="center" |
| | | android:paddingVertical="17dp" |
| | | android:textSize="15sp"/> |
| | | </LinearLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:gravity="center" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="25dp" |
| | | android:background="@drawable/bg_white_10dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="添加微信" |
| | | android:textSize="18sp" |
| | | android:layout_marginTop="17dp" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" /> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="230dp" |
| | | android:layout_height="230dp" |
| | | android:id="@+id/iv_code" |
| | | android:layout_marginTop="20dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="可添加助教微信,了解课程详情" |
| | | android:layout_marginTop="14dp"/> |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | android:layout_width="266dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="20dp" |
| | | android:text="知道了" |
| | | style="@style/style_btn_action" |
| | | android:layout_marginTop="24dp"/> |
| | | </LinearLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp"> |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:text="举报" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_msg" |
| | | <RadioGroup |
| | | android:id="@+id/rg_time" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="26dp" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginEnd="26dp" |
| | | android:gravity="center" |
| | | android:text="举报内容" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" /> |
| | | |
| | | |
| | | <EditText |
| | | android:layout_width="match_parent" |
| | | android:layout_height="127dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_msg" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:background="@drawable/bg_grey_line_4dp" |
| | | android:gravity="top" |
| | | android:padding="5dp" |
| | | android:textSize="14sp" |
| | | android:id="@+id/et_content" |
| | | android:hint="请输入" |
| | | android:textStyle="bold"/> |
| | | <LinearLayout |
| | | android:id="@+id/ll_button" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:gravity="center" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | app:layout_constraintTop_toBottomOf="@id/et_content" |
| | | android:layout_marginTop="23dp"> |
| | | |
| | | android:background="@drawable/bg_white_top_20dp" |
| | | android:paddingBottom="30dp" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_cancel" |
| | | style="@style/style_btn_cancel" |
| | | android:layout_width="0dp" |
| | | android:layout_weight="1" |
| | | android:layout_marginEnd="20dp" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="关闭" /> |
| | | |
| | | android:text="举报提问" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="18dp"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:layout_marginTop="20dp"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_1" |
| | | android:text="举报提问" |
| | | android:layout_marginTop="20dp" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:checked="true" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_2" |
| | | android:text="违法违规" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_3" |
| | | android:text="色情低俗" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_4" |
| | | android:text="低差广告" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_5" |
| | | android:text="不友善、引战" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_6" |
| | | android:text="诱导关注点赞" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_7" |
| | | android:text="网络暴力" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_8" |
| | | android:text="其他" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | style="@style/style_btn_action" |
| | | android:layout_width="0dp" |
| | | android:layout_weight="1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:text="确认" /> |
| | | </LinearLayout> |
| | | style="@style/style_btn_action" |
| | | android:text="确定" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginHorizontal="45dp"/> |
| | | </RadioGroup> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/white"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="15dp" |
| | | android:text="赠送好友" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="85dp" |
| | | android:textColor="@color/colorYellow" |
| | | android:text="¥2980" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | android:layout_marginEnd="14dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_price" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="14dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:text="订单金额:"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_price" |
| | | android:layout_marginTop="22dp"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_btn_action" |
| | | android:layout_marginHorizontal="44dp" |
| | | android:text="确认赠送" |
| | | android:id="@+id/tv_action" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="30dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_price" |
| | | android:layout_marginTop="44dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="50dp" |
| | | android:layout_marginHorizontal="18dp" |
| | | android:background="@drawable/bg_white_20dp" |
| | | android:paddingBottom="40dp" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="播放设置" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="32dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:id="@+id/tv_1" |
| | | android:text="导师声音" |
| | | android:gravity="center" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="20dp"/> |
| | | |
| | | <SeekBar |
| | | android:layout_width="0dp" |
| | | android:layout_height="16dp" |
| | | android:progressDrawable="@drawable/progress_drawable" |
| | | app:layout_constraintStart_toEndOf="@id/iv_silent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:progress="50" |
| | | android:thumb="@drawable/thumb" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:layout_marginTop="27dp" |
| | | android:id="@+id/sb_voice"/> |
| | | <ImageView |
| | | android:id="@+id/iv_silent" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/volume_green" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/sb_voice" |
| | | app:layout_constraintBottom_toBottomOf="@id/sb_voice" |
| | | android:layout_marginStart="21dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@color/white" |
| | | android:paddingBottom="30dp" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="分享到" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginTop="18dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_close" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginTop="3dp" |
| | | android:layout_marginEnd="5dp" |
| | | android:src="@mipmap/icon_close"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_circle" |
| | | android:id="@+id/tv_wx" |
| | | android:text="微信分享" |
| | | android:drawableTop="@mipmap/share_vx" |
| | | android:gravity="center" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | android:drawablePadding="8dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="23dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/tv_wx" |
| | | android:id="@+id/tv_circle" |
| | | android:text="朋友圈" |
| | | android:drawableTop="@mipmap/share_circle" |
| | | android:gravity="center" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | android:drawablePadding="8dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="23dp"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_cancel" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_wx" |
| | | android:layout_marginTop="22dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textColor="@color/textColor99" |
| | | android:textSize="14sp" |
| | | android:text="确认" |
| | | android:gravity="center" |
| | | android:paddingVertical="14dp" |
| | | android:background="@drawable/bg_grey_line"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:paddingBottom="30dp" |
| | | android:background="@drawable/bg_white_10dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_timer" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:padding="10dp" |
| | | android:layout_marginTop="4dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/colorPrimary" |
| | | android:text="2s"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_timer" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:id="@+id/tv_title" |
| | | android:textSize="15sp" |
| | | android:layout_marginTop="5dp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/colorPrimary" |
| | | android:drawablePadding="26dp" |
| | | android:text="举报成功" |
| | | android:drawableTop="@mipmap/suc_green" |
| | | android:gravity="center"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <RadioGroup |
| | | android:id="@+id/rg_time" |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@drawable/bg_white_top_20dp" |
| | | android:paddingBottom="30dp" |
| | | android:layout_height="wrap_content"> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_5" |
| | | android:text="5分钟" |
| | | android:layout_marginTop="20dp" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_10" |
| | | android:text="10分钟" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:checked="true" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_15" |
| | | android:text="15分钟" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_30" |
| | | android:text="30分钟" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_60" |
| | | android:text="60分钟" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_90" |
| | | android:text="90分钟" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_custom" |
| | | android:text="自定义" |
| | | android:textStyle="bold" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:paddingHorizontal="25dp" |
| | | android:textColor="@color/textColor66"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_min" |
| | | android:text="分钟" |
| | | android:textStyle="bold" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:paddingHorizontal="25dp" |
| | | android:textColor="@color/textColor66"/> |
| | | <EditText |
| | | android:id="@+id/et_time" |
| | | android:layout_width="111dp" |
| | | android:layout_height="33dp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_custom" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_min" |
| | | android:text="0" |
| | | android:textColor="@color/textColor" |
| | | android:gravity="center" |
| | | android:inputType="number" |
| | | android:singleLine="true" |
| | | android:background="@drawable/bg_grey_line_18dp"/> |
| | | <TextView |
| | | android:layout_width="34dp" |
| | | android:layout_height="33dp" |
| | | android:text="一" |
| | | android:textSize="12sp" |
| | | android:gravity="center" |
| | | app:layout_constraintStart_toStartOf="@id/et_time" |
| | | app:layout_constraintTop_toTopOf="@id/et_time" |
| | | android:id="@+id/tv_jian"/> |
| | | <TextView |
| | | android:layout_width="34dp" |
| | | android:layout_height="33dp" |
| | | android:text="+" |
| | | android:gravity="center" |
| | | android:textSize="18sp" |
| | | app:layout_constraintEnd_toEndOf="@id/et_time" |
| | | app:layout_constraintTop_toTopOf="@id/et_time" |
| | | android:id="@+id/tv_jia"/> |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="19dp" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_jian" |
| | | app:layout_constraintTop_toTopOf="@id/et_time" |
| | | app:layout_constraintBottom_toBottomOf="@id/et_time" |
| | | android:background="@color/dividing_line_color"/> |
| | | <View |
| | | android:layout_width="1dp" |
| | | android:layout_height="19dp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_jia" |
| | | app:layout_constraintTop_toTopOf="@id/et_time" |
| | | app:layout_constraintBottom_toBottomOf="@id/et_time" |
| | | android:background="@color/dividing_line_color"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <RadioButton |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rb_0" |
| | | android:text="关闭倒计时" |
| | | android:textSize="16sp" |
| | | android:paddingVertical="22dp" |
| | | android:button="@null" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="25dp" |
| | | android:drawableEnd="@drawable/selector_check" |
| | | android:textColor="@color/selector_green_grey"/> |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_btn_action" |
| | | android:text="确定" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginHorizontal="45dp"/> |
| | | </RadioGroup> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:orientation="vertical" |
| | | android:background="@color/white" |
| | | android:layout_height="match_parent"> |
| | | <TextView |
| | | android:id="@+id/tv_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="25dp" |
| | | android:text="心泉课程" |
| | | android:textSize="20sp" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:fontFamily="@font/sourcehansanscn_regular" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="运动" |
| | | android:textSize="18sp" |
| | | android:layout_gravity="center" |
| | | android:paddingVertical="12dp" |
| | | android:textStyle="bold" |
| | | android:text="XIN QUAN" |
| | | android:textSize="8sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="30dp"/> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_search" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:src="@mipmap/ic_search" |
| | | android:padding="10dp" |
| | | android:layout_marginStart="20dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_voice" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_title" |
| | | android:src="@mipmap/ic_voice" |
| | | android:padding="10dp" |
| | | android:layout_marginEnd="20dp"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" /> |
| | | <androidx.core.widget.NestedScrollView |
| | | android:scrollbars="none" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <com.youth.banner.Banner |
| | | android:id="@+id/banner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="160dp" |
| | | android:layout_marginTop="10dp" |
| | | app:delay_time="5000" |
| | | app:is_auto_loop="true" |
| | | app:indicator_normal_color="@color/disableColor" |
| | | app:indicator_selected_color="@color/white" |
| | | android:layout_marginHorizontal="14dp" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <EditText |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintTop_toBottomOf="@id/banner" |
| | | android:layout_marginTop="16dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:background="@drawable/bg_grey_16dp" |
| | | android:hint="输入关键字搜索" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:drawablePadding="6dp" |
| | | android:singleLine="true" |
| | | android:textColor="@color/textColor" |
| | | android:padding="9dp" |
| | | android:drawableStart="@mipmap/icon_search_gray"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_search" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_search" |
| | | app:layout_constraintEnd_toEndOf="@id/et_search" |
| | | android:paddingVertical="5dp" |
| | | android:paddingHorizontal="16dp" |
| | | android:textColor="@color/colorPrimary" |
| | | android:text="搜索" |
| | | android:textStyle="bold" |
| | | android:layout_marginEnd="4dp" |
| | | android:textSize="12sp" |
| | | android:background="@drawable/bg_green_14_alpha"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_my_course" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | app:layout_constraintEnd_toEndOf="@id/et_search" |
| | | android:text="我的课程" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginTop="15dp" |
| | | android:textStyle="bold" |
| | | android:paddingHorizontal="20dp" |
| | | android:paddingVertical="8dp" |
| | | android:background="@drawable/bg_green_25dp"/> |
| | | <View |
| | | android:layout_width="29dp" |
| | | android:layout_height="6dp" |
| | | android:layout_marginBottom="6dp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_1" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_1" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_my_course" |
| | | android:background="@drawable/bg_indicator_gradient"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_my_course" |
| | | app:layout_constraintStart_toStartOf="@id/et_search" |
| | | android:text="课程筛选" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_my_course" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="9dp" |
| | | android:id="@+id/rv_filter"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_course" |
| | | android:minHeight="500dp" |
| | | app:layout_constraintTop_toBottomOf="@id/rv_filter" /> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.core.widget.NestedScrollView> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | </LinearLayout> |
| | | android:layout_height="73dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:background="@color/page_bg" |
| | | android:layout_marginTop="20dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/cb_pub" |
| | | android:text="官方推荐" |
| | | android:layout_width="123dp" |
| | | android:gravity="center" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="21sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_height="40dp"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tab_1" |
| | | android:layout_width="27dp" |
| | | android:layout_height="11dp" |
| | | android:src="@mipmap/tab_indicator" |
| | | app:layout_constraintTop_toBottomOf="@id/cb_pub" |
| | | app:layout_constraintStart_toStartOf="@id/cb_pub" |
| | | app:layout_constraintEnd_toEndOf="@id/cb_pub"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_tab_2" |
| | | android:layout_width="27dp" |
| | | android:layout_height="11dp" |
| | | android:visibility="gone" |
| | | android:src="@mipmap/tab_indicator" |
| | | app:layout_constraintTop_toBottomOf="@id/cb_pub" |
| | | app:layout_constraintStart_toStartOf="@id/cb_teacher" |
| | | app:layout_constraintEnd_toEndOf="@id/cb_teacher"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/cb_teacher" |
| | | android:text="导师专栏" |
| | | android:layout_width="wrap_content" |
| | | android:gravity="center_vertical" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:textSize="16sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor99" |
| | | app:layout_constraintStart_toEndOf="@id/cb_pub" |
| | | android:layout_height="40dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <androidx.viewpager.widget.ViewPager |
| | | android:id="@+id/view_pager" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="93dp" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | android:layout_width="match_parent" |
| | | android:orientation="vertical" |
| | | android:background="@color/page_bg" |
| | | android:layout_height="match_parent"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="发现" |
| | | android:textSize="18sp" |
| | | android:layout_gravity="center" |
| | | android:paddingVertical="12dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="30dp"/> |
| | | <EditText |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="6dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:background="@drawable/bg_white_19dp" |
| | | android:hint="输入关键字搜索" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:drawablePadding="6dp" |
| | | android:singleLine="true" |
| | | android:textColor="@color/textColor" |
| | | android:padding="9dp" |
| | | android:drawableStart="@mipmap/icon_search_gray"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_search" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/et_search" |
| | | app:layout_constraintEnd_toEndOf="@id/et_search" |
| | | android:paddingVertical="5dp" |
| | | android:paddingHorizontal="16dp" |
| | | android:textColor="@color/colorPrimary" |
| | | android:text="搜索" |
| | | android:textStyle="bold" |
| | | android:layout_marginEnd="4dp" |
| | | android:textSize="12sp" |
| | | android:background="@drawable/bg_green_14_alpha"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | app:layout_constraintStart_toStartOf="@id/et_search" |
| | | android:text="动态精选" |
| | | android:textStyle="bold" |
| | | android:layout_marginTop="23dp" |
| | | android:textSize="16sp" |
| | | android:alpha="0.9" |
| | | android:textColor="@color/textColor"/> |
| | | <ImageView |
| | | android:id="@+id/iv_msg" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="@id/tv_1" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_1" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:src="@mipmap/tongzhi" |
| | | android:padding="10dp" |
| | | android:layout_marginEnd="4dp"/> |
| | | android:id="@+id/bg" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="39:35" |
| | | android:src="@mipmap/bg_shop" |
| | | android:scaleType="fitXY"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_unread" |
| | | android:layout_width="12dp" |
| | | android:layout_height="12dp" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_msg" |
| | | app:layout_constraintTop_toTopOf="@id/iv_msg" |
| | | android:textSize="9sp" |
| | | android:textColor="@color/white" |
| | | android:layout_margin="3dp" |
| | | android:gravity="center" |
| | | android:visibility="gone" |
| | | android:background="@drawable/bg_red_20dp" |
| | | android:text="1"/> |
| | | android:layout_width="match_parent" |
| | | android:layout_height="42dp" |
| | | android:id="@+id/et_search" |
| | | app:layout_constraintTop_toTopOf="@id/bg" |
| | | app:layout_constraintVertical_bias="0.56" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg" |
| | | android:layout_marginHorizontal="34dp" |
| | | android:background="@drawable/bg_white_20dp" |
| | | android:hint="搜索你附近的疗愈馆" |
| | | android:textSize="12sp" |
| | | android:drawablePadding="10dp" |
| | | android:singleLine="true" |
| | | android:gravity="center_vertical" |
| | | android:textColor="@color/textColor" |
| | | android:imeActionLabel="搜索" |
| | | android:textColorHint="#DEDEDE" |
| | | android:paddingHorizontal="15dp" |
| | | android:drawableStart="@mipmap/ic_search_black"/> |
| | | |
| | | |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:layout_marginTop="6dp" |
| | | app:layout_constraintTop_toBottomOf="@id/et_search" |
| | | android:layout_marginTop="20dp" |
| | | app:layout_constraintBottom_toBottomOf="parent"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/rv_act" |
| | | android:id="@+id/rv_list" |
| | | android:layout_marginHorizontal="18dp" |
| | | app:layout_constraintTop_toBottomOf="@id/rv_filter" /> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | <ImageView |
| | | android:id="@+id/iv_add" |
| | | android:layout_width="70dp" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/add_act" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="20dp" |
| | | android:layout_marginBottom="40dp"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/page_bg" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/refreshLayout"> |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_list" |
| | | android:layout_width="match_parent" |
| | | android:layout_marginHorizontal="17dp" |
| | | android:layout_height="match_parent"/> |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="100dp" |
| | | android:text="暂无数据" |
| | | android:id="@+id/tv_empty" |
| | | android:visibility="gone" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/textColor99"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_marginBottom="3dp" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_2"/> |
| | | <ImageView |
| | | android:id="@+id/iv_exchange" |
| | | android:id="@+id/iv_privacy" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/exchange" |
| | |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | app:layout_constraintDimensionRatio="390:205" |
| | | android:id="@+id/banner_privacy" |
| | | app:is_auto_loop="false" |
| | | android:layout_marginTop="6dp" /> |
| | | <View |
| | | android:layout_width="match_parent" |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/page_bg" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | xmlns:tools="http://schemas.android.com/tools"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="个人中心" |
| | | android:textSize="18sp" |
| | | android:layout_gravity="center" |
| | | android:paddingVertical="12dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textStyle="bold" |
| | | android:id="@+id/tv_title" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="30dp"/> |
| | | android:layout_height="0dp" |
| | | android:background="@mipmap/bg_mine" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintDimensionRatio="39:49"/> |
| | | <ScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:layout_marginTop="18dp" |
| | | android:background="@drawable/bg_white_top_20dp"> |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="65dp" |
| | | android:layout_height="65dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="80dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundAsCircle="true" |
| | | app:actualImageScaleType="centerCrop" |
| | | android:id="@+id/iv_avatar"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="100dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv_avatar" |
| | | android:layout_marginStart="11dp" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | android:layout_marginTop="10dp" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="18sp" |
| | | android:textSize="17sp" |
| | | android:textStyle="bold" |
| | | tools:text="可乐"/> |
| | | <ImageView |
| | | android:id="@+id/iv_level" |
| | | android:layout_width="18dp" |
| | | android:layout_height="18dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name" |
| | | app:layout_constraintStart_toEndOf="@id/tv_name" |
| | | android:layout_marginStart="6dp" |
| | | android:src="@mipmap/xinren"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_invite_code" |
| | | android:id="@+id/tv_phone" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | android:text="邀请码:" |
| | | tools:text="139****9012" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/textColor99"/> |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/holder_info" |
| | | app:layout_constraintStart_toStartOf="@id/iv_avatar" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_avatar" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_phone"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_setting" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | android:padding="10dp" |
| | | android:src="@mipmap/setting_mine" |
| | | android:layout_marginEnd="10dp"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_msg" |
| | | app:layout_constraintEnd_toStartOf="@id/iv_setting" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" |
| | | android:padding="10dp" |
| | | android:src="@mipmap/ic_msg" |
| | | android:layout_marginEnd="4dp"/> |
| | | <View |
| | | android:layout_width="6dp" |
| | | android:layout_height="6dp" |
| | | android:id="@+id/iv_unread" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_msg" |
| | | app:layout_constraintTop_toTopOf="@id/iv_msg" |
| | | android:layout_margin="8dp" |
| | | android:background="@drawable/bg_red_4dp"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/bg_vip" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_avatar" |
| | | app:layout_constraintDimensionRatio="364:113" |
| | | android:background="@mipmap/no_vip" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:layout_marginTop="25dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_center" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | android:layout_marginTop="14dp" |
| | | android:text="个人中心" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" |
| | | android:text="心泉·疗愈会员" |
| | | app:layout_constraintTop_toTopOf="@id/bg_vip" |
| | | app:layout_constraintStart_toStartOf="@id/bg_vip" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginTop="23dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="22sp" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="升级为高级会员,解锁全部体验" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg_vip" |
| | | app:layout_constraintStart_toStartOf="@id/bg_vip" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginBottom="17dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="10sp"/> |
| | | <TextView |
| | | android:id="@+id/tv_vip" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="你还未开通会员服务" |
| | | app:layout_constraintBottom_toBottomOf="@id/bg_vip" |
| | | app:layout_constraintEnd_toEndOf="@id/bg_vip" |
| | | android:layout_margin="18dp" |
| | | android:textColor="@color/darkGreen" |
| | | android:textSize="8sp"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_rank" |
| | | app:layout_constraintTop_toBottomOf="@id/bg_vip" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:text="爱心榜单" |
| | | android:textStyle="bold" |
| | | android:paddingVertical="5dp" |
| | | android:paddingHorizontal="12dp" |
| | | android:background="@drawable/bg_green_left_13"/> |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor" |
| | | android:drawableEnd="@mipmap/ic_rank" |
| | | android:padding="24dp" |
| | | android:background="@drawable/bg_gradient_vertical"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/cl_info" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_invite_code" |
| | | android:layout_marginTop="22dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:elevation="2dp"> |
| | | android:id="@+id/cl_record" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_rank" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginHorizontal="13dp" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor" |
| | | android:drawableEnd="@mipmap/ic_rank" |
| | | android:padding="24dp" |
| | | android:background="@drawable/bg_gradient_vertical"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:id="@+id/tv_more_record" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | android:text="疗愈学习记录" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="12dp" |
| | | android:text="体重" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_weight" |
| | | android:textSize="18sp" |
| | | android:drawableEnd="@mipmap/mine_more"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="228dp" |
| | | android:layout_height="171dp" |
| | | android:id="@+id/cl_total" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_more_record" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:text="0" |
| | | android:textSize="22sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="2dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_unit" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_weight" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="斤" |
| | | android:textSize="12sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_height" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_weight" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:text="0" |
| | | android:textSize="22sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="2dp"/> |
| | | android:background="@mipmap/lianhua" |
| | | android:layout_marginTop="40dp"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_day" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="10dp" |
| | | android:text="0" |
| | | android:textSize="55sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginBottom="20dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_day" |
| | | android:text="天" |
| | | app:layout_constraintStart_toEndOf="@id/tv_day" |
| | | android:textSize="16sp" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_day" |
| | | android:text="累积练习天数" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:textSize="16sp" |
| | | android:textColor="@color/textColor"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="12dp" |
| | | android:text="身高" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="@id/tv_height" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_height"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:id="@+id/cl_data" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:layout_marginHorizontal="21dp" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_total" |
| | | android:layout_marginTop="60dp"> |
| | | <View |
| | | android:id="@+id/center" |
| | | android:layout_width="1dp" |
| | | android:layout_height="31dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/center" |
| | | android:layout_marginTop="15dp" |
| | | android:textSize="13sp" |
| | | android:text="连续练习天数" |
| | | android:id="@+id/tv_3" |
| | | android:drawablePadding="6dp" |
| | | android:drawableStart="@drawable/green_dot"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_continue" |
| | | android:text="0" |
| | | app:layout_constraintStart_toStartOf="@id/tv_3" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_3" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_3" |
| | | android:layout_marginTop="8dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="25dp" |
| | | android:textSize="23sp" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="天" |
| | | app:layout_constraintStart_toEndOf="@id/tv_continue" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_continue" |
| | | android:textSize="11sp" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/center" |
| | | android:layout_marginTop="15dp" |
| | | android:textSize="13sp" |
| | | android:text="今日练习时长" |
| | | android:drawablePadding="6dp" |
| | | android:drawableStart="@drawable/green_dot_2"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_today" |
| | | android:text="0" |
| | | app:layout_constraintStart_toEndOf="@id/center" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_continue" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="25dp" |
| | | android:textSize="23sp" |
| | | android:textColor="@color/textColor"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_unit" |
| | | app:layout_constraintStart_toStartOf="@id/tv_height" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_height" |
| | | android:text="cm" |
| | | android:textSize="12sp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_bmi" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/tv_weight" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:text="0" |
| | | android:textSize="22sp" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="12dp" |
| | | android:text="BMI" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="@id/tv_bmi" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_bmi"/> |
| | | <TextView |
| | | android:id="@+id/tv_fat_state" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_unit" |
| | | app:layout_constraintStart_toStartOf="@id/tv_bmi" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_bmi" |
| | | android:text="" |
| | | android:textSize="12sp"/> |
| | | android:id="@+id/tv_level" |
| | | android:layout_marginHorizontal="21dp" |
| | | android:layout_marginTop="15dp" |
| | | android:paddingHorizontal="5dp" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_data" |
| | | android:background="@drawable/bg_level"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="疗愈等级" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/textColor" |
| | | android:paddingVertical="18dp" |
| | | android:id="@+id/tv_4"/> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:id="@+id/iv_vip" |
| | | android:layout_marginStart="10dp" |
| | | android:src="@mipmap/vip_1"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:text="查看详情" |
| | | android:gravity="end" |
| | | android:drawablePadding="6dp" |
| | | android:textSize="11sp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | </LinearLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:id="@+id/cl_menu" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | android:id="@+id/rv_menu" |
| | | android:paddingBottom="18dp" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_info" |
| | | android:layout_marginTop="16dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:elevation="2dp"/> |
| | | <LinearLayout |
| | | android:id="@+id/ll_menu" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_record" |
| | | android:layout_marginTop="15dp" |
| | | android:background="@drawable/bg_gradient_vertical" |
| | | android:layout_marginHorizontal="12dp"> |
| | | <TextView |
| | | android:id="@+id/tv_5" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="常用功能" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_margin="25dp" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_study_record" |
| | | android:text="学习记录" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:layout_marginTop="40dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="40dp" |
| | | android:drawablePadding="23dp" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_account" |
| | | android:drawableTop="@mipmap/study_record" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_5"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_account" |
| | | android:text="我的账户" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/account" |
| | | app:layout_constraintStart_toEndOf="@id/tv_study_record" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_watch_his" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_study_record"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_watch_his" |
| | | android:text="观看历史" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/watch_his" |
| | | app:layout_constraintStart_toEndOf="@id/tv_account" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_collect" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_study_record"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_collect" |
| | | android:text="我的收藏" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/my_collected" |
| | | app:layout_constraintStart_toEndOf="@id/tv_watch_his" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_study_record"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:id="@+id/cl_menu2" |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_10dp" |
| | | app:layout_constraintTop_toBottomOf="@id/rv_menu" |
| | | android:layout_marginTop="16dp" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:elevation="2dp" |
| | | android:orientation="vertical"> |
| | | <TextView |
| | | android:id="@+id/tv_feed" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="反馈与建议" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_about" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="关于我们" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_contact" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="联系我们" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_guide" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="使用指南" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_privacy_rule" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="隐私协议" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_user_rule" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="用户协议" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_set_unit" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="APP体重单位" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_address" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="地址管理" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | <TextView |
| | | android:id="@+id/tv_setting" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | style="@style/style_form_text" |
| | | android:text="设置" |
| | | android:paddingHorizontal="12dp" |
| | | android:drawableEnd="@mipmap/icon_more_grey"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color"/> |
| | | </LinearLayout> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_logout" |
| | | app:layout_constraintTop_toBottomOf="@id/ll_menu" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:text="退出登录" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toBottomOf="@id/cl_menu" |
| | | android:layout_marginTop="15dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="14dp" |
| | | android:textColor="@color/textColor99" |
| | | android:paddingHorizontal="28dp" |
| | | android:paddingVertical="10dp" |
| | | android:background="@drawable/bg_grey_line_8dp"/> |
| | | android:layout_marginBottom="20dp" |
| | | android:background="@drawable/bg_gradient_vertical" |
| | | android:layout_marginHorizontal="12dp"> |
| | | <TextView |
| | | android:id="@+id/tv_6" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="其他功能" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_margin="25dp" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_has_buy" |
| | | android:text="我的已购" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:layout_marginTop="40dp" |
| | | android:drawablePadding="23dp" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_service" |
| | | android:drawableTop="@mipmap/has_buy" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="40dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_6"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_service" |
| | | android:text="联系客服" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/service" |
| | | app:layout_constraintStart_toEndOf="@id/tv_has_buy" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_setting" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_has_buy"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_setting" |
| | | android:text="设置" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/setting" |
| | | app:layout_constraintStart_toEndOf="@id/tv_service" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_share" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_has_buy"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_share" |
| | | android:text="分享赚钱" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="13sp" |
| | | android:gravity="center" |
| | | android:drawablePadding="23dp" |
| | | android:drawableTop="@mipmap/share" |
| | | app:layout_constraintStart_toEndOf="@id/tv_setting" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_has_buy"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="76dp" |
| | | android:layout_height="76dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="16dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundAsCircle="true" |
| | | app:actualImageScaleType="centerCrop" |
| | | android:id="@+id/iv_avatar" |
| | | app:roundingBorderColor="@color/colorPrimary" |
| | | app:roundingBorderWidth="1dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.core.widget.NestedScrollView> |
| | | </ScrollView> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <com.scwang.smart.refresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:id="@+id/refreshLayout" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <com.scwang.smart.refresh.header.ClassicsHeader |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" /> |
| | | |
| | | <androidx.core.widget.NestedScrollView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_1" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginTop="9dp" |
| | | android:fontFamily="@font/sourcehansanscn_regular" |
| | | android:text="新手冥想指南" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="21sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="3dp" |
| | | android:text="Meditation guide" |
| | | android:textSize="8sp" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_1" |
| | | app:layout_constraintStart_toStartOf="@id/tv_1" /> |
| | | |
| | | <com.youth.banner.Banner |
| | | android:id="@+id/banner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_marginTop="6dp" |
| | | android:src="@mipmap/bg_guide" |
| | | app:layout_constraintDimensionRatio="390:205" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="10dp" |
| | | android:background="@color/page_bg" |
| | | app:layout_constraintTop_toBottomOf="@id/banner" /> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/rv_menu" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:background="@color/white" |
| | | app:layout_constraintTop_toBottomOf="@id/banner" /> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | app:layout_constraintTop_toBottomOf="@id/rv_menu" |
| | | android:background="@color/page_bg"> |
| | | <TextView |
| | | android:id="@+id/tv_2" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="19dp" |
| | | android:layout_marginTop="9dp" |
| | | android:fontFamily="@font/sourcehansanscn_regular" |
| | | android:text="推荐课程" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="21sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="3dp" |
| | | android:text="与内心的宁静与喜悦入睡" |
| | | android:textSize="8sp" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_2" |
| | | app:layout_constraintStart_toStartOf="@id/tv_2" /> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_course" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginHorizontal="12dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | </androidx.core.widget.NestedScrollView> |
| | | |
| | | <com.scwang.smart.refresh.footer.ClassicsFooter |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" /> |
| | | </com.scwang.smart.refresh.layout.SmartRefreshLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:background="@color/page_bg"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <xyz.doikki.videoplayer.player.VideoView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="18dp" |
| | | android:id="@+id/mVideoView" |
| | | app:layout_constraintDimensionRatio="390:220"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_1" |
| | | app:layout_constraintTop_toBottomOf="@id/mVideoView" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:text="导师简介" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginStart="21dp" |
| | | android:layout_marginTop="37dp"/> |
| | | |
| | | <WebView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_1" |
| | | android:layout_marginTop="18dp" |
| | | android:id="@+id/webView"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_2" |
| | | app:layout_constraintTop_toBottomOf="@id/webView" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:text="相关课程" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/textColor" |
| | | android:layout_marginStart="21dp" |
| | | android:layout_marginTop="37dp"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_2" |
| | | android:layout_marginHorizontal="12dp" |
| | | android:id="@+id/rv_course"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.core.widget.NestedScrollView> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:roundedCornerRadius="25dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | android:id="@+id/iv_bg" /> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_play" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_bg" |
| | | android:src="@mipmap/play"/> |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:id="@+id/iv_bg" |
| | | app:roundedCornerRadius="25dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_bg" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | android:background="@drawable/bg_black_alpha50_bottom_25"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginStart="18dp" |
| | | android:text="缓解压力" |
| | | android:textSize="11sp" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_title"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="@id/tv_title" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="17dp" |
| | | android:text="缓解压力" |
| | | android:textSize="6sp" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_subtitle"/> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="6dp" |
| | | android:layout_height="6dp" |
| | | android:src="@mipmap/ic_count" |
| | | app:layout_constraintTop_toTopOf="@id/tv_count" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_count" |
| | | app:layout_constraintStart_toEndOf="@id/tv_subtitle" |
| | | android:layout_marginStart="10dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | android:textColor="@color/white" |
| | | android:textSize="6sp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_subtitle" |
| | | android:layout_marginStart="2dp" |
| | | android:text="0"/> |
| | | <ImageView |
| | | android:layout_width="29dp" |
| | | android:layout_height="29dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="10dp" |
| | | android:src="@mipmap/play" |
| | | android:scaleType="fitCenter"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_vip" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:src="@mipmap/ic_vip"/> |
| | | |
| | | <TextView |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:text="0.0" |
| | | android:textSize="10sp" |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_brown_30"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <ImageView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:scaleType="centerCrop" |
| | | android:id="@+id/iv_img"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="14dp" |
| | | android:id="@+id/bg" |
| | | android:visibility="gone" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:background="@color/colorHalfTrans"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_height="match_parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="18dp" |
| | | app:layout_constraintDimensionRatio="353:259" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:roundedCornerRadius="8dp" |
| | | app:placeholderImage="@color/page_bg" |
| | | android:id="@+id/iv_bg" /> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintBottom_toTopOf="@id/tv_subtitle" |
| | | android:layout_marginBottom="4dp" |
| | | android:textStyle="bold" |
| | | android:textSize="18sp" |
| | | android:textColor="@color/white" |
| | | app:layout_constraintStart_toEndOf="@id/iv_play"/> |
| | | <ImageView |
| | | android:id="@+id/iv_play" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/play_white" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_subtitle" |
| | | android:layout_marginStart="14dp" |
| | | android:padding="10dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_subtitle" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | android:layout_marginBottom="16dp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/cl_bg" |
| | | android:layout_marginHorizontal="28dp" |
| | | android:layout_marginBottom="10dp" |
| | | android:background="@drawable/bg_white_alpha_20_10dp"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_title" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginStart="11dp" |
| | | android:textColor="@color/white" |
| | | android:textSize="20sp" |
| | | android:textStyle="bold" |
| | | android:text="想法思绪"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_subtitle" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="@id/tv_title" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="15dp" |
| | | android:textStyle="bold" |
| | | android:text="想法思绪"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | app:layout_constraintStart_toEndOf="@id/tv_subtitle" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_subtitle" |
| | | android:layout_marginStart="15dp" |
| | | android:drawablePadding="3dp" |
| | | android:drawableStart="@mipmap/ic_count" |
| | | android:textStyle="bold" |
| | | android:text="0"/> |
| | | <ImageView |
| | | android:layout_width="42dp" |
| | | android:layout_height="42dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="10dp" |
| | | android:src="@mipmap/play" |
| | | android:scaleType="fitCenter"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_vip" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="22dp" |
| | | android:src="@mipmap/ic_vip"/> |
| | | |
| | | <TextView |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="22dp" |
| | | android:text="0.0" |
| | | android:textSize="10sp" |
| | | android:textStyle="bold"/> |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_brown_30"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginHorizontal="20dp" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <TextView |
| | | android:id="@+id/tv" |
| | | android:layout_width="70dp" |
| | | android:layout_height="30dp" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/white" |
| | | android:textStyle="bold" |
| | | android:text="去学习" |
| | | android:gravity="center" |
| | | android:layout_marginEnd="20dp" |
| | | android:layout_marginBottom="6dp" |
| | | android:background="@drawable/bg_green_14" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_sort" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="23dp" |
| | | android:text="1" |
| | | android:textColor="@color/textColor99" |
| | | android:textSize="16sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="18dp" |
| | | android:text="第03课 毁灭与创新创建新体验" |
| | | android:textSize="14sp" |
| | | android:textColor="@color/textColor" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="90dp" |
| | | android:layout_marginStart="50dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_time" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | android:drawableStart="@mipmap/icon_time" |
| | | android:textSize="11sp" |
| | | android:drawablePadding="6dp" |
| | | android:layout_marginTop="8dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | android:textColor="#CDCDCD" |
| | | android:text="00:00"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | app:layout_constraintStart_toEndOf="@id/tv_time" |
| | | android:drawableStart="@mipmap/ic_count_grey" |
| | | android:textSize="11sp" |
| | | android:drawablePadding="6dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="8dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="20dp" |
| | | android:textColor="#CDCDCD" |
| | | android:text="0"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:paddingBottom="11dp" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="34dp" |
| | | android:layout_height="34dp" |
| | | android:layout_width="38dp" |
| | | android:layout_height="38dp" |
| | | android:id="@+id/iv_avatar" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | |
| | | app:layout_constraintStart_toEndOf="@id/iv_avatar" |
| | | android:text="张三" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="6dp" |
| | | android:layout_marginStart="12dp" |
| | | android:layout_marginTop="8dp" |
| | | android:textColor="@color/textColor66" |
| | | android:textStyle="bold"/> |
| | | <TextView |
| | |
| | | android:textSize="12sp" |
| | | android:layout_marginEnd="14dp" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginTop="5dp" |
| | | android:layout_marginTop="12dp" |
| | | android:text="很不错很不错很不错很不错很不错很不错很不错很不错很不错很不错很不错"/> |
| | | |
| | | <TextView |
| | |
| | | android:textColor="@color/textColor99" |
| | | android:layout_marginTop="10dp" |
| | | android:text="2023.10.11"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_reply_count" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_time" |
| | | app:layout_constraintStart_toEndOf="@id/tv_time" |
| | | android:layout_marginStart="11dp" |
| | | android:textColor="@color/colorBlue" |
| | | android:text="查看0条回复" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:padding="5dp" |
| | | app:layout_goneMarginStart="6dp"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_like" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_time" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_name" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_content" |
| | | android:text="0" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor99" |
| | | android:drawableStart="@mipmap/dianzan" |
| | | android:drawableEnd="@mipmap/dianzan" |
| | | android:drawablePadding="4dp" |
| | | android:gravity="center"/> |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_time" |
| | | android:layout_marginTop="9dp" |
| | | android:layout_marginEnd="14dp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/rv_reply" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:id="@+id/tv_reply" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_time" |
| | | android:layout_marginTop="9dp"/> |
| | | app:layout_constraintStart_toStartOf="@id/tv_content" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_content" |
| | | android:layout_marginTop="12dp" |
| | | android:textSize="12sp" |
| | | android:textColor="@color/textColor"/> |
| | | |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintDimensionRatio="167:219" |
| | | android:layout_marginHorizontal="7dp" |
| | | android:layout_marginVertical="9dp" |
| | | android:id="@+id/iv_bg" |
| | | app:roundedCornerRadius="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/textColor99" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_bg" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | android:background="@drawable/bg_white_alpha50_bottom_10"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="17dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:text="缓解压力" |
| | | android:textSize="18sp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_title"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="@id/tv_title" |
| | | app:layout_constraintEnd_toStartOf="@id/iv" |
| | | android:layout_marginEnd="8dp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="17dp" |
| | | android:text="缓解压力" |
| | | android:textSize="11sp" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_subtitle"/> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="10dp" |
| | | android:layout_height="10dp" |
| | | android:src="@mipmap/ic_count" |
| | | app:layout_constraintTop_toTopOf="@id/tv_count" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_count" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_count" |
| | | android:layout_marginEnd="3dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_title" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_subtitle" |
| | | android:layout_marginStart="2dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:text="0"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_vip" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:src="@mipmap/ic_vip"/> |
| | | |
| | | <TextView |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:text="0.0" |
| | | android:textSize="10sp" |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_brown_30"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintDimensionRatio="167:219" |
| | | android:layout_marginHorizontal="7dp" |
| | | android:layout_marginVertical="9dp" |
| | | android:id="@+id/iv_bg" |
| | | app:roundedCornerRadius="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/textColor99" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_bg" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | android:background="@drawable/bg_white_alpha50_bottom_10"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:text="缓解压力" |
| | | android:textSize="14sp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_title"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="@id/tv_title" |
| | | app:layout_constraintEnd_toStartOf="@id/iv" |
| | | android:layout_marginEnd="8dp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="10dp" |
| | | android:text="缓解压力" |
| | | android:textSize="8sp" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_subtitle"/> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="10dp" |
| | | android:layout_height="10dp" |
| | | android:src="@mipmap/ic_count" |
| | | app:layout_constraintTop_toTopOf="@id/tv_count" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_count" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_count" |
| | | android:layout_marginEnd="3dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_title" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_subtitle" |
| | | android:layout_marginStart="2dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:text="0"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_vip" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="8dp" |
| | | android:src="@mipmap/ic_vip"/> |
| | | |
| | | <TextView |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="8dp" |
| | | android:text="0.0" |
| | | android:textSize="10sp" |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_brown_30"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_offline" |
| | | android:src="@mipmap/offline" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="8dp"/> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_free" |
| | | android:src="@mipmap/xianmian" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="8dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | android:layout_height="259dp" |
| | | android:layout_marginTop="20dp" |
| | | android:visibility="gone" |
| | | app:is_auto_loop="false" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:id="@+id/banner_landscape"/> |
| | | <com.youth.banner.Banner |
| | | android:layout_width="match_parent" |
| | | android:layout_height="214dp" |
| | | android:visibility="gone" |
| | | app:is_auto_loop="false" |
| | | android:layout_marginTop="20dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | android:id="@+id/banner_card"/> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <TextView |
| | | android:layout_width="12dp" |
| | | android:layout_height="12dp" |
| | | android:id="@+id/tv_sort" |
| | | android:textColor="@color/white" |
| | | android:textSize="9sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="21dp" |
| | | android:gravity="center" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginBottom="15dp" |
| | | android:text="纯净之声" |
| | | app:layout_constraintStart_toEndOf="@id/tv_sort" |
| | | android:layout_marginStart="6dp" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold" |
| | | android:drawablePadding="12dp" |
| | | android:drawableEnd="@mipmap/more_black"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:background="@color/white" |
| | | android:layout_height="wrap_content"> |
| | | |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:id="@+id/iv_avatar" |
| | | android:layout_width="34dp" |
| | | android:layout_height="34dp" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/page_bg" |
| | | app:roundAsCircle="true" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginEnd="14dp" |
| | | android:ellipsize="end" |
| | | android:maxLines="1" |
| | | android:text="系统通知" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" |
| | | app:layout_constraintStart_toEndOf="@id/iv_avatar" |
| | | app:layout_constraintTop_toTopOf="@id/iv_avatar" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_action" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="6dp" |
| | | android:text="赞了你的评论" |
| | | android:textColor="@color/textColor99" |
| | | android:textSize="12sp" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_name" |
| | | app:layout_constraintStart_toEndOf="@id/tv_name" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_content" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:ellipsize="end" |
| | | android:text="您有一节直播课程即将开始" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_avatar" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="14dp" |
| | | android:padding="8dp" |
| | | android:background="@drawable/bg_grey_4dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_time" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="2022-09-09 09:01" |
| | | android:textColor="@color/textColor99" |
| | | android:textSize="12sp" |
| | | app:layout_constraintStart_toStartOf="@id/tv_name" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" /> |
| | | |
| | | <View |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginHorizontal="14dp" |
| | | android:background="@color/dividing_line_color" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_content" |
| | | android:layout_marginTop="17dp"/> |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_15dp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginStart="7dp" |
| | | android:layout_marginEnd="4dp" |
| | | android:layout_marginTop="6dp" |
| | | android:layout_marginBottom="6dp"> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="47dp" |
| | | android:layout_height="47dp" |
| | | android:layout_marginStart="13dp" |
| | | android:layout_marginTop="12dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="12dp" |
| | | android:src="@mipmap/ic_notice"/> |
| | | <TextView |
| | | android:id="@+id/tv_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="系统消息" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="15sp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | app:layout_constraintTop_toTopOf="@id/iv" |
| | | android:layout_marginStart="14dp" |
| | | android:layout_marginTop="4dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="9:00" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="12sp" |
| | | android:id="@+id/tv_time" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_type" |
| | | android:layout_marginEnd="9dp"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:text="9:00" |
| | | android:textColor="@color/textColor66" |
| | | android:textSize="12sp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:id="@+id/tv_content" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv" |
| | | app:layout_constraintStart_toStartOf="@id/tv_type" |
| | | android:layout_marginBottom="5dp" |
| | | android:layout_marginEnd="9dp"/> |
| | | <View |
| | | android:layout_width="7dp" |
| | | android:layout_height="7dp" |
| | | android:id="@+id/iv_unread" |
| | | android:background="@drawable/bg_red_4dp" |
| | | app:layout_constraintTop_toTopOf="@id/tv_type" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_type" |
| | | app:layout_constraintStart_toEndOf="@id/tv_type" |
| | | android:layout_marginStart="7dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginHorizontal="9dp" |
| | | android:layout_marginTop="13dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="13dp" |
| | | android:background="@drawable/bg_white_15dp"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:id="@+id/iv_cover" |
| | | app:layout_constraintDimensionRatio="148:116" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:roundedCornerRadius="10dp" |
| | | app:actualImageScaleType="centerCrop" |
| | | app:placeholderImage="@color/page_bg" |
| | | android:layout_margin="10dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_distance" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_cover" |
| | | app:layout_constraintTop_toTopOf="@id/iv_cover" |
| | | android:layout_margin="10dp" |
| | | android:text="距你8.8km" |
| | | android:textColor="@color/white" |
| | | android:paddingVertical="3dp" |
| | | android:paddingHorizontal="6dp" |
| | | android:textSize="8sp" |
| | | android:background="@drawable/bg_deep_green_8dp"/> |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:singleLine="true" |
| | | app:layout_constraintTop_toBottomOf="@id/iv_cover" |
| | | android:layout_marginHorizontal="15dp" |
| | | android:layout_marginTop="10dp" |
| | | android:textStyle="bold" |
| | | android:textSize="13sp" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/darkGreen" |
| | | android:text="心泉疗愈馆"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_address" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginHorizontal="15dp" |
| | | android:layout_marginTop="12dp" |
| | | android:drawableStart="@mipmap/place_loc" |
| | | android:drawablePadding="5dp" |
| | | android:text="成都市武侯区府城大道西段" |
| | | android:textSize="8sp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end"/> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_phone" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_address" |
| | | android:layout_marginHorizontal="15dp" |
| | | android:layout_marginTop="8dp" |
| | | android:drawableStart="@mipmap/place_phone" |
| | | android:drawablePadding="5dp" |
| | | android:text="1855" |
| | | android:textSize="8sp" |
| | | android:singleLine="true" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="18dp" |
| | | android:ellipsize="end"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@mipmap/ic_qus" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | android:layout_marginStart="16dp" |
| | | android:layout_marginTop="20dp" |
| | | android:id="@+id/iv"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_question" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="18dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | android:layout_marginStart="7dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="12dp" |
| | | android:textColor="@color/black" |
| | | android:textSize="15sp" |
| | | android:text="关于账户问题"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_answer" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_question" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintStart_toEndOf="@id/iv" |
| | | android:layout_marginStart="7dp" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="12dp" |
| | | android:textColor="@color/textColor66" |
| | | android:textSize="12sp" |
| | | android:text="关于账户问题"/> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/dividing_line_color" |
| | | android:layout_marginHorizontal="16dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_answer" |
| | | android:layout_marginTop="20dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_name" |
| | | android:text="深度睡眠" |
| | | android:textColor="@color/textColor99" |
| | | android:background="@drawable/bg_white_15dp" |
| | | android:paddingVertical="8dp" |
| | | android:paddingHorizontal="9dp" |
| | | android:textSize="12sp" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | android:layout_marginEnd="2dp" |
| | | android:layout_marginTop="2dp"/> |
| | | <ImageView |
| | | android:layout_width="12dp" |
| | | android:layout_height="12dp" |
| | | android:id="@+id/iv_del" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:src="@mipmap/ic_del"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="54dp" |
| | | android:text="会员专区" |
| | | android:gravity="center_vertical" |
| | | android:textSize="14sp" |
| | | android:id="@+id/tv_name" |
| | | android:textColor="@color/textColor66" |
| | | android:layout_marginStart="19dp" |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | <View |
| | | android:id="@+id/indicator" |
| | | android:layout_width="3dp" |
| | | android:layout_height="15dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/tv_name" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_name" |
| | | android:background="@drawable/bg_green_10dp"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginHorizontal="6dp" |
| | | android:background="@drawable/bg_grey_10dp" |
| | | android:id="@+id/cl_bg"> |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="28dp" |
| | | android:text="季度会员"/> |
| | | <TextView |
| | | android:id="@+id/tv_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/textColor" |
| | | android:textStyle="bold" |
| | | android:textSize="20sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_name" |
| | | android:layout_marginTop="10dp" |
| | | android:text="20"/> |
| | | <TextView |
| | | android:id="@+id/tv_daily_price" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="11sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_price" |
| | | android:layout_marginTop="10dp" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="30dp" |
| | | android:text="20"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto"> |
| | | <com.facebook.drawee.view.SimpleDraweeView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintDimensionRatio="167:219" |
| | | android:layout_marginHorizontal="7dp" |
| | | android:layout_marginVertical="9dp" |
| | | android:id="@+id/iv_bg" |
| | | app:roundedCornerRadius="25dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:placeholderImage="@color/textColor99" |
| | | app:actualImageScaleType="centerCrop"/> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="0dp" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | app:layout_constraintEnd_toEndOf="@id/iv_bg" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintBottom_toBottomOf="@id/iv_bg" |
| | | android:background="@drawable/bg_white_alpha50_bottom_25"> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | android:layout_marginTop="17dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:text="缓解压力" |
| | | android:textSize="18sp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_title"/> |
| | | <TextView |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | app:layout_constraintTop_toBottomOf="@id/tv_title" |
| | | app:layout_constraintStart_toStartOf="@id/tv_title" |
| | | app:layout_constraintEnd_toStartOf="@id/iv" |
| | | android:layout_marginEnd="8dp" |
| | | android:singleLine="true" |
| | | android:ellipsize="end" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="17dp" |
| | | android:text="缓解压力" |
| | | android:textSize="11sp" |
| | | android:textColor="@color/white" |
| | | android:id="@+id/tv_subtitle"/> |
| | | <ImageView |
| | | android:id="@+id/iv" |
| | | android:layout_width="10dp" |
| | | android:layout_height="10dp" |
| | | android:src="@mipmap/ic_count" |
| | | app:layout_constraintTop_toTopOf="@id/tv_count" |
| | | app:layout_constraintBottom_toBottomOf="@id/tv_count" |
| | | app:layout_constraintEnd_toStartOf="@id/tv_count" |
| | | android:layout_marginEnd="3dp"/> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/tv_count" |
| | | android:textColor="@color/white" |
| | | android:textSize="11sp" |
| | | app:layout_constraintEnd_toEndOf="@id/tv_title" |
| | | app:layout_constraintBaseline_toBaselineOf="@id/tv_subtitle" |
| | | android:layout_marginStart="2dp" |
| | | android:layout_marginEnd="6dp" |
| | | android:text="0"/> |
| | | |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:id="@+id/iv_vip" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:src="@mipmap/ic_vip"/> |
| | | |
| | | <TextView |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:id="@+id/tv_price" |
| | | app:layout_constraintTop_toTopOf="@id/iv_bg" |
| | | app:layout_constraintStart_toStartOf="@id/iv_bg" |
| | | android:layout_margin="15dp" |
| | | android:text="0.0" |
| | | android:textSize="10sp" |
| | | android:textColor="@color/white" |
| | | android:gravity="center" |
| | | android:background="@drawable/bg_brown_30"/> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | |
| | | <attr name="info" format="string" /> |
| | | <attr name="infoColor" format="string" /> |
| | | </declare-styleable> |
| | | |
| | | <declare-styleable name="FlowLayout"> |
| | | <attr name="VerticalSpacing" format="dimension" /> |
| | | <attr name="HorizontalSpacing" format="dimension" /> |
| | | </declare-styleable> |
| | | </resources> |
| | |
| | | <color name="deepGreen">#35662D</color> |
| | | <color name="midGreen">#5E9456</color> |
| | | <color name="darkGreen">#304D1F</color> |
| | | <color name="textGreen">#8AAE65</color> |
| | | <color name="colorDark">#464662</color> |
| | | <color name="colorHint">#B2B2BF</color> |
| | | <color name="colorDivider">#0D000000</color> |
| | |
| | | <string name="withdraw_record"><u>提现记录</u></string> |
| | | <string name="register"><u>注册账号</u></string> |
| | | <string name="tx_guide"><u>懂您才可以更好的帮助您</u></string> |
| | | <string name="vip_rule">《会员用户协议》</string> |
| | | |
| | | <string-array name="week_string_array"> |
| | | <item>日</item> |
| | |
| | | <item name="android:paddingTop">15dp</item> |
| | | <item name="android:paddingBottom">15dp</item> |
| | | <item name="android:background">@null</item> |
| | | <item name="android:drawablePadding">20dp</item> |
| | | <item name="android:drawablePadding">8dp</item> |
| | | |
| | | </style> |
| | | |
| | |
| | | */ |
| | | open fun onInvisibleToUser() {} |
| | | |
| | | private val compositeDisposable = CompositeDisposable() |
| | | val compositeDisposable = CompositeDisposable() |
| | | |
| | | private var isFirstResume = true |
| | | private var isPrepared = false |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | <corners android:topLeftRadius="10dp" android:topRightRadius="10dp"/> |
| | | <corners android:topLeftRadius="20dp" android:topRightRadius="20dp"/> |
| | | <solid android:color="@color/white"/> |
| | | </shape> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:background="@drawable/bg_white_top_10dp" |
| | | android:padding="@dimen/dp_15" |
| | | android:text="上传头像" |
| | | android:text="更换头像" |
| | | android:gravity="center" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | |
| | | android:background="@null" |
| | | android:padding="@dimen/dp_15" |
| | | android:text="拍照" |
| | | android:visibility="gone" |
| | | android:textStyle="bold" |
| | | android:textColor="@color/textColor" |
| | | android:textSize="@dimen/textSize" /> |
| | |
| | | android:background="@null" |
| | | android:textStyle="bold" |
| | | android:padding="@dimen/dp_15" |
| | | android:text="从手机相册选择" |
| | | android:textColor="@color/textColor" |
| | | android:text="从相册选择" |
| | | android:textColor="#92A87D" |
| | | android:textSize="@dimen/textSize" /> |
| | | |
| | | |
| | |
| | | android:background="@color/white" |
| | | android:padding="@dimen/dp_15" |
| | | android:text="取消" |
| | | android:textColor="@color/textColor99" |
| | | android:textColor="@color/textColor66" |
| | | android:textSize="@dimen/textSize" /> |
| | | </LinearLayout> |
| | |
| | | <color name="colorYellow">#FF9803</color> |
| | | <color name="colorDeepGreen">#003809</color> |
| | | <color name="textColorGreen">#6CC366</color> |
| | | <color name="textGreen">#0A4213</color> |
| | | <color name="colorGreen">#CBDCC5</color> |
| | | <color name="colorDark">#000000</color> |
| | | <color name="colorPink">#FCD8D8</color> |