Commit 0888c86e authored by 张释方's avatar 张释方

提交平台分红页面

parent bddfcbcd
......@@ -79,6 +79,15 @@ dependencies {
// androidTestImplementation 'androidx.test.ext:junit:1.1.1'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//下拉刷新
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-26'
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-26'
// xtablayout
implementation 'com.androidkun:XTabLayout:1.1.5'
//类似sharedPreference
implementation 'net.grandcentrix.tray:tray:0.12.0'
//util
implementation 'com.blankj:utilcodex:1.26.0'
api project(':library_base')
api project(':library_ad')
......
package com.mints.goodmoney.ui.adapter
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.PagerAdapter
class FriendsPagerAdapter(titltStr: List<String>, recyList: MutableList<RecyclerView>)
: PagerAdapter() {
private val mRecyList: MutableList<RecyclerView> = recyList
private val mTitleList: List<String> = titltStr
override fun getItemPosition(`object`: Any): Int {
// 处理notify方法失效
return POSITION_NONE
}
override fun getCount() = mTitleList.size
override fun isViewFromObject(view: View, `object`: Any): Boolean {
return view === `object`
}
override fun instantiateItem(container: ViewGroup, position: Int): Any {
val recyclerView = mRecyList[position]
container.addView(mRecyList[position])
return recyclerView
}
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
container.removeView(`object` as View?)
}
override fun getPageTitle(position: Int): CharSequence? {
return mTitleList[position]
}
}
\ No newline at end of file
package com.mints.goodmoney.ui.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.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.goodnews.R
import com.mints.goodnews.main.task.utils.GlideUtils
import com.mints.goodnews.main.task.bean.FriendHallMsgBean
class InvitedAdapter(context: Context, invitedData: MutableList<FriendHallMsgBean.ListBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
const val HOLDER_TYPE_EMPTY = 0
const val HOLDER_TYPE_INVITED = 1
}
private var mContext: Context = context
private var invitedData: List<FriendHallMsgBean.ListBean> = invitedData
private var mOnItemClickListener: OnItemClickListener? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (viewType == HOLDER_TYPE_EMPTY) {
val emptyView = LayoutInflater.from(parent.context).inflate(R.layout.item_empty, parent, false)
return EmptyHolder(emptyView)
}
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_recy_invited, parent, false)
return InvitedHolder(view)
}
override fun getItemCount(): Int {
return if (invitedData.isEmpty()) {
1
} else {
invitedData.size
}
}
override fun getItemViewType(position: Int): Int {
if (invitedData.isEmpty()) {
return HOLDER_TYPE_EMPTY
}
return HOLDER_TYPE_INVITED
}
override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, position: Int) {
if (viewHolder is EmptyHolder) {
return
}
val holder = viewHolder as InvitedHolder
when (position) {
0 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_first)
}
1 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_second)
}
2 -> {
holder.tvNum.visibility = View.GONE
holder.ivRanking.visibility = View.VISIBLE
holder.ivRanking.setImageResource(R.mipmap.icon_ranking_third)
}
else -> {
holder.tvNum.visibility = View.VISIBLE
holder.ivRanking.visibility = View.GONE
holder.tvNum.text = "" + (position + 1)
}
}
val data = invitedData[position]
GlideUtils.loadCircleImageView(mContext, data.head, holder.ivAvatar, R.mipmap.ic_avatar_ph, R.mipmap.ic_avatar_ph)
holder.tvName.text = data.name
holder.tvCoin.text = "" + data.contribution
holder.tvStr.text = "" + data.unit
holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(holder.itemView, position)
}
}
inner class EmptyHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
inner class InvitedHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val tvNum: TextView = itemView.findViewById(R.id.item_invited_tv_num)
val ivAvatar: ImageView = itemView.findViewById(R.id.item_invited_iv_avatar)
val ivRanking: ImageView = itemView.findViewById(R.id.item_invite_iv_ranking)
val tvName: TextView = itemView.findViewById(R.id.item_invited_tv_name)
val tvCoin: TextView = itemView.findViewById(R.id.item_invited_tv_coin)
val tvStr: TextView = itemView.findViewById(R.id.item_invited_tv_str)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
}
\ No newline at end of file
package com.mints.goodmoney.ui.adapter.listener
import android.view.View
//define interface
interface OnItemClickListener {
fun onItemClick(view: View?, position: Int)
}
\ No newline at end of file
package com.mints.goodnews.main.task.bean;
import java.io.Serializable;
import java.util.List;
public class FriendHallMsgBean implements Serializable {
/**
* titleMsg : 6元
* button :
* rate : 1:?
* contribution_yesterday : 0.18
* periods : 第20201113期
* cashMsg : 未达目标,今日加油
* list : [{"id":6,"sid":2031418094401000000,"date":"2020-11-14","level":2,"contribution":0.2,"status":0,"name":"186****1558","head":null}]
* contribution_today : 0.2
* cash : 0
* status : 1
*/
private String titleMsg;
private String button;
private String rate;
private double contribution_yesterday;
private String periods;
private String cashMsg;
private double contribution_today;
private double cash;
private int status;
private int friendCount;
private int directFriendsCount;
private int indirectFriendsCount;
private String rules;
private String remark;
public String getRules() {
return rules;
}
public void setRules(String rules) {
this.rules = rules;
}
public int getDirectFriendsCount() {
return directFriendsCount;
}
public void setDirectFriendsCount(int directFriendsCount) {
this.directFriendsCount = directFriendsCount;
}
public int getIndirectFriendsCount() {
return indirectFriendsCount;
}
public void setIndirectFriendsCount(int indirectFriendsCount) {
this.indirectFriendsCount = indirectFriendsCount;
}
public int getFriendCount() {
return friendCount;
}
public void setFriendCount(int friendCount) {
this.friendCount = friendCount;
}
private List<ListBean> list;
public String getTitleMsg() {
return titleMsg;
}
public void setTitleMsg(String titleMsg) {
this.titleMsg = titleMsg;
}
public String getButton() {
return button;
}
public void setButton(String button) {
this.button = button;
}
public String getRate() {
return rate;
}
public void setRate(String rate) {
this.rate = rate;
}
public double getContribution_yesterday() {
return contribution_yesterday;
}
public void setContribution_yesterday(double contribution_yesterday) {
this.contribution_yesterday = contribution_yesterday;
}
public String getPeriods() {
return periods;
}
public void setPeriods(String periods) {
this.periods = periods;
}
public String getCashMsg() {
return cashMsg;
}
public void setCashMsg(String cashMsg) {
this.cashMsg = cashMsg;
}
public double getContribution_today() {
return contribution_today;
}
public void setContribution_today(double contribution_today) {
this.contribution_today = contribution_today;
}
public double getCash() {
return cash;
}
public void setCash(double cash) {
this.cash = cash;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public class ListBean implements Serializable {
/**
* id : 6
* sid : 2031418094401000000
* date : 2020-11-14
* level : 2
* contribution : 0.2
* status : 0
* name : 186****1558
* head : null
*/
private int id;
private long sid;
private String date;
private int level;
private double contribution;
private int status;
private String name;
private String createTime;
private String head = null;
private String unit;
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public long getSid() {
return sid;
}
public void setSid(long sid) {
this.sid = sid;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public double getContribution() {
return contribution;
}
public void setContribution(double contribution) {
this.contribution = contribution;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
}
}
package com.mints.goodnews.main.task.bean
import java.io.Serializable
/**
* 描述:用户信息
* 作者:孟崔广
* 时间:2019/10/29 18:42
* 邮箱:mengcga@163.com
*/
class UserBean : Serializable {
val token: String? = null
val toKeepAnAccount: String? = null
val consumer: ConsumerBean? = null
inner class ConsumerBean : Serializable {
val head: String? = null
val openid: String? = null
val nickname: String? = null
val mobile: String? = null
val real_name: String? = null
val alipay_account: String? = null
val idcode: String? = null
val gameInfo: String? = null
var sumCoin: String? = null
val surplus //余额
= 0.0
val coin // 积分
= 0
val pk_id // 用户id
: Long = 0
val isFirstSignInApp // 首次登录app true:首次
= false
}
}
package com.mints.goodnews.main.task.manager
import android.text.TextUtils
import com.mints.goodnews.main.task.bean.UserBean
import com.tencent.mmkv.MMKV
/**
* 描述:管理用户信息
* 作者:孟崔广
* 时间:2019/10/28 13:54
*/
class UserManager {
companion object {
/**
* 游客 or 登录用户
*/
private const val IS_TEMP_USER = "is_temp_user"
/**
* 用户ID
*/
private const val USER_ID = "userId"
/**
* 用户CODE_ID
*/
private const val CODE_ID = "codeId"
/**
* 登陆状态ID
*/
private const val TOKEN_ID = "tokenId"
/**
* 手机号
*/
private const val MOBILE = "mobile"
/**
* 姓名
*/
private const val REAL_NAME = "realName"
/**
* 支付宝
*/
private const val ALIPAY_ACCOUNT = "alipay_account"
/**
* 用户金币
*/
private const val USER_GOLD = "user_gold"
/**
* 用户总金币
*/
private const val USER_SUM_GOLD = "user_sum_gold"
/**
* 用户零钱
*/
private const val USER_CASH = "user_cash"
/**
* 是否老用户 true-老用户
*/
private const val USER_OLD = "user_old"
/**
* 猎豹游戏info
*/
private const val GAME_INFO = "game_info"
/**
* 广告隐藏标识
*/
private const val AD_SHOW_FLAG = "ad_show_flag"
/**
* 微信名称
*/
private const val WX_NAME = "wx_name"
/**
* 微信头像
*/
private const val WX_HEADER = "wx_header"
/**
* 微信id
*/
private const val WX_OPENID = "wx_openid"
val INSTANCE: UserManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
UserManager()
}
}
init {
// TODO 初始化穿山甲
}
/**
* 保存用户信息
*
* @param userInfo
*/
fun saveUserInfo(userInfo: UserBean) {
val user = userInfo.consumer
val token = userInfo.token
if (token != null) {
MMKV.mmkvWithID(TOKEN_ID).encode(TOKEN_ID, token)
}
if (user != null) {
val mobile: String? = user.mobile
val openid: String? = user.openid
if (mobile == null && openid == null) {
MMKV.mmkvWithID(IS_TEMP_USER).remove(IS_TEMP_USER)
} else {
MMKV.mmkvWithID(IS_TEMP_USER).encode(IS_TEMP_USER, mobile + openid)
}
MMKV.mmkvWithID(USER_ID).encode(USER_ID, user.pk_id.toString())
MMKV.mmkvWithID(CODE_ID).encode(CODE_ID, user.idcode.toString())
MMKV.mmkvWithID(MOBILE).encode(MOBILE, mobile)
MMKV.mmkvWithID(ALIPAY_ACCOUNT)
.encode(ALIPAY_ACCOUNT, user.alipay_account.toString())
MMKV.mmkvWithID(USER_GOLD).encode(USER_GOLD, user.coin.toString())
MMKV.mmkvWithID(USER_CASH)
.encode(USER_CASH, String.format("%.2f", user.surplus))
MMKV.mmkvWithID(USER_SUM_GOLD).encode(USER_SUM_GOLD, user.sumCoin.toString())
MMKV.mmkvWithID(USER_OLD).encode(USER_OLD, !user.isFirstSignInApp)
MMKV.mmkvWithID(WX_NAME).encode(WX_NAME, user.nickname.toString())
MMKV.mmkvWithID(WX_HEADER).encode(WX_HEADER, user.head)
MMKV.mmkvWithID(WX_OPENID).encode(WX_OPENID, openid)
MMKV.mmkvWithID(GAME_INFO).encode(GAME_INFO, user.gameInfo)
MMKV.mmkvWithID(REAL_NAME).encode(REAL_NAME, user.real_name)
}
}
/**
* 单独获取用户id
*/
fun getMobile(): String {
val kv = MMKV.mmkvWithID(MOBILE)
return kv.decodeString(MOBILE, "")
}
/**
* 判断用户是否已登录
*
* @return true为已登录 false 为未登录
*/
fun userIsLogin(): Boolean {
val kv = MMKV.mmkvWithID(IS_TEMP_USER).decodeString(IS_TEMP_USER, "")
return !TextUtils.isEmpty(kv)
}
/**
* 单独获取用户id
*/
fun getUserID(): String {
val kv = MMKV.mmkvWithID(USER_ID)
return kv.decodeString(USER_ID, "")
}
/**
* 获取用户登陆状态
*/
fun getTokenID(): String {
val kv = MMKV.mmkvWithID(TOKEN_ID)
return kv.decodeString(TOKEN_ID, "")
}
/**
* 获取用户邀请码
*/
fun getCodeID(): String {
val kv = MMKV.mmkvWithID(CODE_ID)
return kv.decodeString(CODE_ID, "")
}
/**
* 获取真实姓名
*/
fun getRealName(): String {
val kv = MMKV.mmkvWithID(REAL_NAME)
return kv.decodeString(REAL_NAME, "")
}
/**
* 设置真实姓名
*
* @param name
*/
fun setRealName(name: String?) {
val kv = MMKV.mmkvWithID(REAL_NAME)
kv.encode(REAL_NAME, name)
}
/**
* 是否老用户 true-老用户
*/
fun getUserOld(): Boolean {
val kv = MMKV.mmkvWithID(USER_OLD)
return kv.decodeBool(USER_OLD, false)
}
fun getAdShowFlag(): Boolean {
val kv = MMKV.mmkvWithID(AD_SHOW_FLAG)
return kv.decodeBool(AD_SHOW_FLAG, false)
}
/**
* 设置真实姓名
*
* @param userOld
*/
fun setUserOld(userOld: Boolean) {
val kv = MMKV.mmkvWithID(USER_OLD)
kv.encode(USER_OLD, userOld)
}
/**
* 获取支付宝账户
*/
fun getAlipayAccount(): String {
val kv = MMKV.mmkvWithID(ALIPAY_ACCOUNT)
return kv.decodeString(ALIPAY_ACCOUNT, "")
}
/**
* 设置支付宝账户
*
* @param alipay
*/
fun setAlipayAccount(alipay: String?) {
val kv = MMKV.mmkvWithID(ALIPAY_ACCOUNT)
kv.encode(ALIPAY_ACCOUNT, alipay)
}
fun getUserSumGold(): String {
val kv = MMKV.mmkvWithID(USER_SUM_GOLD)
return kv.decodeString(USER_SUM_GOLD, "")
}
/**
* 获取用户金币/积分
*/
fun getUserGold(): String {
val kv = MMKV.mmkvWithID(USER_GOLD)
return kv.decodeString(USER_GOLD, "")
}
/**
* 设置用户金币/积分
*
* @param gold
*/
fun setUserGold(gold: String?) {
val kv = MMKV.mmkvWithID(USER_GOLD)
kv.encode(USER_GOLD, gold)
}
/**
* 获取用户零钱
*/
fun getUserCash(): String {
val kv = MMKV.mmkvWithID(USER_CASH)
return kv.decodeString(USER_CASH, "")
}
fun getGameInfo(): String {
val kv = MMKV.mmkvWithID(GAME_INFO)
return kv.decodeString(GAME_INFO, "")
}
fun getWxName(): String {
val kv = MMKV.mmkvWithID(WX_NAME)
return kv.decodeString(WX_NAME, "")
}
fun getWxHeader(): String {
val kv = MMKV.mmkvWithID(WX_HEADER)
return kv.decodeString(WX_HEADER, "")
}
fun getWxOpenid(): String {
val kv = MMKV.mmkvWithID(WX_OPENID)
return kv.decodeString(WX_OPENID, "")
}
/**
* 设置用户零钱
*
* @param cash
*/
fun setUserCash(cash: String?) {
val kv = MMKV.mmkvWithID(USER_CASH)
kv.encode(WX_OPENID, cash)
}
fun setGameInfo(gameInfo: String?) {
val kv = MMKV.mmkvWithID(GAME_INFO)
kv.encode(GAME_INFO, gameInfo)
}
fun setWxName(wxName: String?) {
val kv = MMKV.mmkvWithID(WX_NAME)
kv.encode(WX_NAME, wxName)
}
fun setWxHeader(wxHeader: String?) {
val kv = MMKV.mmkvWithID(WX_HEADER)
kv.encode(WX_HEADER, wxHeader)
}
/**
* mobile
*
* @param mobile
*/
fun setMobile(mobile: String?) {
val kv = MMKV.mmkvWithID(MOBILE)
kv.encode(MOBILE, mobile)
}
fun setAdShowFlag(adShowFlag: Boolean) {
val kv = MMKV.mmkvWithID(AD_SHOW_FLAG)
kv.encode(AD_SHOW_FLAG, adShowFlag)
}
fun userLogout() {
MMKV.mmkvWithID(USER_ID).remove(USER_ID)
MMKV.mmkvWithID(CODE_ID).remove(CODE_ID)
MMKV.mmkvWithID(TOKEN_ID).remove(TOKEN_ID)
MMKV.mmkvWithID(REAL_NAME).remove(REAL_NAME)
MMKV.mmkvWithID(IS_TEMP_USER).remove(IS_TEMP_USER)
MMKV.mmkvWithID(ALIPAY_ACCOUNT).remove(ALIPAY_ACCOUNT)
MMKV.mmkvWithID(USER_GOLD).remove(USER_GOLD)
MMKV.mmkvWithID(USER_CASH).remove(USER_CASH)
MMKV.mmkvWithID(USER_OLD).remove(USER_OLD)
MMKV.mmkvWithID(WX_OPENID).remove(WX_OPENID)
MMKV.mmkvWithID(WX_NAME).remove(WX_NAME)
MMKV.mmkvWithID(WX_HEADER).remove(WX_HEADER)
// MMKV.mmkvWithID(GAME_INFO).remove(GAME_INFO)
}
}
\ No newline at end of file
package com.mints.goodnews.main.task.utils;
import android.content.Context;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.signature.ObjectKey;
/**
* 描述:GlideUtils
* 作者:孟崔广
* 时间:2018/1/10 17:51
* 邮箱:mengcga@163.com
*/
public class GlideUtils {
/**
* Glide特点
* 使用简单
* 可配置度高,自适应程度高
* 支持常见图片格式 Jpg png gif webp
* 支持多种数据源 网络、本地、资源、Assets 等
* 高效缓存策略 支持Memory和Disk图片缓存 默认Bitmap格式采用RGB_565内存使用至少减少一半
* 生命周期集成 根据Activity/Fragment生命周期自动管理请求
* 高效处理Bitmap 使用Bitmap Pool使Bitmap复用,主动调用recycle回收需要回收的Bitmap,减小系统回收压力
* 这里默认支持Context,Glide支持Context,Activity,Fragment,FragmentActivity
*/
//默认加载
public static void loadImageView(Context mContext, String path, ImageView mImageView) {
Glide.with(mContext).load(path).into(mImageView);
}
//默认加载
public static void loadImageViewNoAnim(Context mContext, String path, ImageView mImageView) {
Glide.with(mContext).load(path).dontAnimate().into(mImageView);
}
//设置加载中图片
public static void loadImageViewLoding(Context mContext, String path, ImageView mImageView, int lodingImage) {
RequestOptions requestOptions = new RequestOptions();
requestOptions.placeholder(lodingImage);
Glide.with(mContext).load(path).apply(requestOptions).into(mImageView);
}
//设置加载中以及加载失败图片
public static void loadImageViewLoding(Context mContext, String path, ImageView mImageView, int lodingImage, int errorImageView) {
RequestOptions requestOptions = new RequestOptions();
requestOptions.placeholder(lodingImage);
requestOptions.error(errorImageView);
Glide.with(mContext).load(path).apply(requestOptions).into(mImageView);
}
//设置加载中以及加载失败圆形图片
public static void loadCircleImageView(Context mContext, String path, ImageView mImageView, int lodingImage, int errorImageView) {
RequestOptions requestOptions = new RequestOptions();
requestOptions.placeholder(lodingImage);
requestOptions.error(errorImageView);
requestOptions.circleCrop();
Glide.with(mContext).load(path).apply(requestOptions).into(mImageView);
}
//加载Gif
public static void loadImageViewGif(Context mContext, int drawable, ImageView imageView) {
Glide.with(mContext).load(drawable).into(imageView);
}
//加载Gif
public static void loadImageViewGifUrl(Context mContext, ImageView view, String url) {
RequestOptions options = (new RequestOptions())
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.timeout(60000)
.signature(new ObjectKey(System.currentTimeMillis()))
.priority(Priority.HIGH);
Glide.with(mContext).load(url).apply(options).into(view);
}
}
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="300"
android:fromYDelta="100%p"
android:toYDelta="0" />
<alpha
android:duration="500"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="750"
android:fromYDelta="0"
android:toYDelta="100%p" />
<alpha
android:duration="300"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
author:Remex Huang
website:feelyou.info
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="-100%p"
android:fromYDelta="0"
android:toXDelta="0"
android:toYDelta="0" >
</translate>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
author:Remex Huang
website:feelyou.info
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="100%p"
android:fromYDelta="0"
android:toXDelta="0"
android:toYDelta="0" >
</translate>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="-100%p"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="0" />
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="100%p" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
author:Remex Huang
website:feelyou.info
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="0"
android:fromYDelta="0"
android:toXDelta="-100%p"
android:toYDelta="0" >
</translate>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
author:Remex Huang
website:feelyou.info
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="0"
android:fromYDelta="0"
android:toXDelta="100%p"
android:toYDelta="0" >
</translate>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="200"
android:fromYDelta="100%p"
android:toYDelta="0" />
<alpha
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="200"
android:fromYDelta="0"
android:toYDelta="50%p" />
<alpha
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXDelta="100%p"
android:toXDelta="0"/>
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromXDelta="0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="-100%p" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fillAfter="false"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1"
android:toYScale="1" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromAlpha="1.0"
android:toAlpha="0" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromYDelta="-100%p"
android:toYDelta="0"/>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
~
~ Licensed under the Apache License, Version 2.0 (the "License”);
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="300"
android:fromYDelta="0"
android:toYDelta="-100%p"/>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--折叠状态下的阴影-->
<item app:state_collapsed="true">
<objectAnimator
android:propertyName="elevation"
android:valueTo="1.5dp"
android:valueType="floatType" />
</item>
<!--展开状态下的阴影-->
<item app:state_collapsed="false">
<objectAnimator
android:propertyName="elevation"
android:valueTo="1.5dp"
android:valueType="floatType" />
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_btn_friends_enabled" android:state_enabled="true" />
<item android:drawable="@drawable/shape_btn_friends_unenabled" android:state_enabled="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/color_E72C2B" android:state_enabled="true" />
<item android:color="@android:color/white" android:state_enabled="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_FFC7C7" />
<corners android:radius="100dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_FF9837" />
<corners android:radius="100dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffff9837" />
<corners android:radius="25dp" />
<gradient
android:angle="90"
android:endColor="#ffffb032"
android:startColor="#ffff7f2c"
android:type="linear"
android:useLevel="true" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffffffff" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- 中心背景 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 实心 -->
<solid android:color="#ffffff" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false">
<!-- <item android:duration="100">-->
<!-- <clip-->
<!-- android:clipOrientation="horizontal"-->
<!-- android:drawable="@mipmap/loading_u0"-->
<!-- android:gravity="left" />-->
<!-- </item>-->
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u1"
android:gravity="left" />
</item>
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u2"
android:gravity="left" />
</item>
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u3"
android:gravity="left" />
</item>
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u4"
android:gravity="left" />
</item>
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u5"
android:gravity="left" />
</item>
<item android:duration="100">
<clip
android:clipOrientation="horizontal"
android:drawable="@mipmap/loading_u6"
android:gravity="left" />
</item>
</animation-list>
\ No newline at end of file
This diff is collapsed.
<?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="70dp"
android:paddingTop="20dp">
<ImageView
android:id="@+id/iv_left_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="10dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_left_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:maxLength="12"
android:padding="8dp"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:maxLength="12"
android:textColor="@color/color_121B32"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_icon2"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right_icon"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_right_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textColor="@color/color_121B32"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
style="@style/view_line_E6E6E6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/iv_right_icon" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@mipmap/ic_record_empty" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/recy_friends"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
\ No newline at end of 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="50dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/item_invite_iv_ranking"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginTop="3dp"
android:visibility="gone" />
<TextView
android:id="@+id/item_invited_tv_num"
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="center"
android:textColor="@color/color_333"
android:textSize="16dp"
android:visibility="gone" />
<ImageView
android:id="@+id/item_invited_iv_avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp" />
<TextView
android:id="@+id/item_invited_tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:textColor="@color/color_333"
android:textSize="16sp" />
<TextView
android:id="@+id/item_invited_tv_coin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_FB560C"
android:textSize="22sp" />
<TextView
android:id="@+id/item_invited_tv_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="@color/color_FB560C"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment