基线备份:thirdparty 变体完成 + Android 4.2 兼容改造前
包含内容: - thirdparty flavor 独立 applicationId + Intent 入口(ThirdPartyEntryActivity) - 58 后端接口适配(单 /api 路径、code 0/200、camelCase 字段、UNBOUND 轮询) - MAC 硬件锚定校验(防一凭证多设备共用) - EPG mac 覆盖 SDK init(sMacOverride)+ ChannelManger 初始化对齐 - 提示文案优化(设备未注册/权益未绑定)
This commit is contained in:
81
app/src/main/java/com/pukka/jiecheng/utils/TopStyleUtils.java
Executable file
81
app/src/main/java/com/pukka/jiecheng/utils/TopStyleUtils.java
Executable file
@@ -0,0 +1,81 @@
|
||||
|
||||
package com.pukka.jiecheng.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.pukka.jiecheng.R;
|
||||
|
||||
/**
|
||||
* Author: wxf
|
||||
* Date: 2023/1/12 10:48
|
||||
* Description:Top样式切换
|
||||
*/
|
||||
public class TopStyleUtils {
|
||||
// 搜索、历史、订购、帮助 样式切换
|
||||
public static void topStyleChange(Context context, View view, boolean focus) {
|
||||
// ConstraintLayout constraintLayout = (ConstraintLayout) view;
|
||||
// View icon = constraintLayout.getChildAt(0);
|
||||
// icon.setSelected(focus);
|
||||
// TextView textView = (TextView) constraintLayout.getChildAt(1);
|
||||
if (focus) {
|
||||
view.animate().scaleX(1.1f).scaleY(1.1f).setDuration(100).start();
|
||||
// textView.setTextColor(context.getResources().getColor(R.color.index_top_text_focus));
|
||||
// textView.getPaint().setFakeBoldText(true);
|
||||
} else {
|
||||
view.animate().scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
// textView.setTextColor(context.getResources().getColor(R.color.index_top_text_nor));
|
||||
// textView.getPaint().setFakeBoldText(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static void topImageChange(View view, boolean focus) {
|
||||
if (focus) {
|
||||
ViewCompat.animate(view).scaleX(1.05f).scaleY(1.05f).setDuration(100).start();
|
||||
} else {
|
||||
ViewCompat.animate(view).scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
}
|
||||
}
|
||||
|
||||
public static void topImageChangeFilter(View view, boolean focus) {
|
||||
if (focus) {
|
||||
ViewCompat.animate(view).scaleX(1.02f).scaleY(1.02f).setDuration(100).start();
|
||||
} else {
|
||||
ViewCompat.animate(view).scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 一行的大模板 放大 防止焦点框外溢
|
||||
* */
|
||||
public static void topImageChange3(View view, boolean focus) {
|
||||
if (focus) {
|
||||
ViewCompat.animate(view).scaleX(1.02f).scaleY(1.05f).setDuration(100).start();
|
||||
} else {
|
||||
ViewCompat.animate(view).scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 对view放大1.05f
|
||||
*
|
||||
* @param view view
|
||||
* @param focus focus
|
||||
*/
|
||||
public static void topImageChange2(View view, boolean focus) {
|
||||
if (focus) {
|
||||
ViewCompat.animate(view).scaleX(1.03f).scaleY(1.05f).setDuration(100).start();
|
||||
} else {
|
||||
ViewCompat.animate(view).scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
}
|
||||
}
|
||||
public static void topImageChange4(View view, boolean focus) {
|
||||
if (focus) {
|
||||
ViewCompat.animate(view).scaleX(1.03f).scaleY(1.03f).setDuration(100).start();
|
||||
} else {
|
||||
ViewCompat.animate(view).scaleX(1.0f).scaleY(1.0f).setDuration(100).start();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user