Skip to content

Commit

Permalink
Android 更新SDK 7.7.9457
Browse files Browse the repository at this point in the history
  • Loading branch information
tatemin committed Sep 8, 2020
1 parent e9c7d49 commit 37416a3
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,145 +273,162 @@
"item_level": 4,
"item_icon_normal": "@beauty_biaozhun",
"item_icon_select": "@beauty_biaozhun"
},
{
},{
"item_id": 3,
"item_type": 20203,
"item_name": "@beauty_panel_filter_ziran",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_ziran",
"item_icon_select": "@beauty_ziran"
},
{
"item_id": 4,
"item_type": 20204,
"item_name": "@beauty_panel_filter_baixi",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_baixi",
"item_icon_select": "@beauty_baixi"
},
{
"item_id": 5,
"item_type": 20205,
"item_name": "@beauty_panel_filter_cheery",
"item_material_url": "",
"item_level": 8,
"item_icon_normal": "@beauty_yinghong",
"item_icon_select": "@beauty_yinghong"
},
{
"item_id": 4,
"item_type": 20204,
"item_id": 6,
"item_type": 20206,
"item_name": "@beauty_panel_filter_cloud",
"item_material_url": "",
"item_level": 8,
"item_icon_normal": "@beauty_yunshang",
"item_icon_select": "@beauty_yunshang"
},
{
"item_id": 5,
"item_type": 20205,
"item_id": 7,
"item_type": 20207,
"item_name": "@beauty_panel_filter_pure",
"item_material_url": "",
"item_level": 8,
"item_icon_normal": "@beauty_chunzhen",
"item_icon_select": "@beauty_chunzhen"
},
{
"item_id": 6,
"item_type": 20206,
"item_id": 8,
"item_type": 20208,
"item_name": "@beauty_panel_filter_orchid",
"item_material_url": "",
"item_level": 9,
"item_icon_normal": "@beauty_bailan",
"item_icon_select": "@beauty_bailan"
},
{
"item_id": 7,
"item_type": 20207,
"item_id": 9,
"item_type": 20209,
"item_name": "@beauty_panel_filter_vitality",
"item_material_url": "",
"item_level": 8,
"item_icon_normal": "@beauty_yuanqi",
"item_icon_select": "@beauty_yuanqi"
},
{
"item_id": 8,
"item_type": 20208,
"item_id": 10,
"item_type": 20210,
"item_name": "@beauty_panel_filter_super",
"item_material_url": "",
"item_level": 9,
"item_icon_normal": "@beauty_chaotuo",
"item_icon_select": "@beauty_chaotuo"
},
{
"item_id": 9,
"item_type": 20209,
"item_id": 11,
"item_type": 20211,
"item_name": "@beauty_panel_filter_fragrance",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_xiangfen",
"item_icon_select": "@beauty_xiangfen"
},
{
"item_id": 10,
"item_type": 20210,
"item_id": 12,
"item_type": 20212,
"item_name": "@beauty_panel_filter_white",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_fwhite",
"item_icon_select": "@beauty_fwhite"
},
{
"item_id": 11,
"item_type": 20211,
"item_id": 13,
"item_type": 20213,
"item_name": "@beauty_panel_filter_romantic",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_langman",
"item_icon_select": "@beauty_langman"
},
{
"item_id": 12,
"item_type": 20212,
"item_id": 14,
"item_type": 20214,
"item_name": "@beauty_panel_filter_fresh",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_qingxin",
"item_icon_select": "@beauty_qingxin"
},
{
"item_id": 13,
"item_type": 20213,
"item_id": 15,
"item_type": 20215,
"item_name": "@beauty_panel_filter_beautiful",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_weimei",
"item_icon_select": "@beauty_weimei"
},
{
"item_id": 14,
"item_type": 20214,
"item_id": 16,
"item_type": 20216,
"item_name": "@beauty_panel_filter_pink",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_fennen",
"item_icon_select": "@beauty_fennen"
},
{
"item_id": 15,
"item_type": 20215,
"item_id": 17,
"item_type": 20217,
"item_name": "@beauty_panel_filter_reminiscence",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_huaijiu",
"item_icon_select": "@beauty_huaijiu"
},
{
"item_id": 16,
"item_type": 20216,
"item_id": 18,
"item_type": 20218,
"item_name": "@beauty_panel_filter_blues",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_landiao",
"item_icon_select": "@beauty_landiao"
},
{
"item_id": 17,
"item_type": 20217,
"item_id": 19,
"item_type": 20219,
"item_name": "@beauty_panel_filter_cool",
"item_material_url": "",
"item_level": 5,
"item_icon_normal": "@beauty_qingliang",
"item_icon_select": "@beauty_qingliang"
},
{
"item_id": 18,
"item_type": 20218,
"item_id": 20,
"item_type": 20220,
"item_name": "@beauty_panel_filter_Japanese",
"item_material_url": "",
"item_level": 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface Beauty {
void setMotionTmplEnable(boolean enable);
void fillingMaterialPath(@NonNull BeautyInfo beautyInfo);
void setCurrentFilterIndex(@NonNull BeautyInfo beautyInfo, @IntRange(from = 0) int index);
void setCurrentBeautyIndex(@NonNull BeautyInfo beautyInfo, @IntRange(from = 0) int index);
void setOnFilterChangeListener(OnFilterChangeListener listener);
void clear();
int getFilterProgress(@NonNull BeautyInfo beautyInfo, @IntRange(from = 0) int index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,16 @@ public void setCurrentFilterIndex(BeautyInfo beautyInfo, int index) {
}
}

@Override
public void setCurrentBeautyIndex(@NonNull BeautyInfo beautyInfo, int index) {
for (TabInfo tabInfo : beautyInfo.getBeautyTabList()) {
if (tabInfo.getTabType() == BeautyConstants.TAB_TYPE_BEAUTY) {
ItemInfo itemInfo = tabInfo.getTabItemList().get(index);
dispatchBeautyEffects(itemInfo);
}
}
}

@Override
public void setOnFilterChangeListener(OnFilterChangeListener listener) {
mOnFilterChangeListener = listener;
Expand Down Expand Up @@ -715,6 +725,12 @@ private Bitmap decodeFilterResource(@NonNull ItemInfo itemInfo) {
case BeautyConstants.ITEM_TYPE_FILTER_STANDARD:
resId = R.drawable.beauty_filter_biaozhun;
break;
case BeautyConstants.ITEM_TYPE_FILTER_ZIRAN:
resId = R.drawable.beauty_filter_ziran;
break;
case BeautyConstants.ITEM_TYPE_FILTER_BAIXI:
resId = R.drawable.beauty_filter_baixi;
break;
case BeautyConstants.ITEM_TYPE_FILTER_CHEERY:
resId = R.drawable.beauty_filter_yinghong;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public ItemAdapter(Context context) {
}

public void setData(TabInfo tabInfo) {
setData(tabInfo, 0);
}

public void setData(TabInfo tabInfo, int defaultIndex) {
mTabInfo = tabInfo;
mSelectPos = defaultIndex;
if (mItemInfoList == null) {
mItemInfoList = new ArrayList<>();
}
Expand Down Expand Up @@ -106,10 +111,10 @@ public View getView(final int position, View convertView, ViewGroup parent) {
public void onClick(View v) {
if (mItemClickListener != null) {
mItemClickListener.onItemClick(itemInfo, position);
}
if (mSelectPos != position) {
mSelectPos = position;
notifyDataSetChanged();
if (mSelectPos != position) {
mSelectPos = position;
notifyDataSetChanged();
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,24 @@ public class BeautyConstants {

public static final int ITEM_TYPE_FILTER_FACE_SHAPE = 20201; // 无特效
public static final int ITEM_TYPE_FILTER_STANDARD = 20202; // 标准
public static final int ITEM_TYPE_FILTER_CHEERY = 20203; // 樱红
public static final int ITEM_TYPE_FILTER_CLOUD = 20204; // 云裳
public static final int ITEM_TYPE_FILTER_PURE = 20205; // 纯真
public static final int ITEM_TYPE_FILTER_ORCHID = 20206; // 白兰
public static final int ITEM_TYPE_FILTER_VITALITY = 20207; // 元气
public static final int ITEM_TYPE_FILTER_SUPER = 20208; // 超脱
public static final int ITEM_TYPE_FILTER_FRAGRANCE = 20209; // 香氛
public static final int ITEM_TYPE_FILTER_WHITE = 20210; // 美白
public static final int ITEM_TYPE_FILTER_ROMANTIC = 20211; // 浪漫
public static final int ITEM_TYPE_FILTER_FRESH = 20212; // 清新
public static final int ITEM_TYPE_FILTER_BEAUTIFUL = 20213; // 唯美
public static final int ITEM_TYPE_FILTER_PINK = 20214; // 粉嫩
public static final int ITEM_TYPE_FILTER_REMINISCENCE = 20215; // 怀旧
public static final int ITEM_TYPE_FILTER_BLUES = 20216; // 蓝调
public static final int ITEM_TYPE_FILTER_COOL = 20217; // 清凉
public static final int ITEM_TYPE_FILTER_JAPANESE = 20218; // 日系
public static final int ITEM_TYPE_FILTER_ZIRAN = 20203; // 自然
public static final int ITEM_TYPE_FILTER_BAIXI = 20204; // 白皙
public static final int ITEM_TYPE_FILTER_CHEERY = 20205; // 樱红
public static final int ITEM_TYPE_FILTER_CLOUD = 20206; // 云裳
public static final int ITEM_TYPE_FILTER_PURE = 20207; // 纯真
public static final int ITEM_TYPE_FILTER_ORCHID = 20208; // 白兰
public static final int ITEM_TYPE_FILTER_VITALITY = 20209; // 元气
public static final int ITEM_TYPE_FILTER_SUPER = 20210; // 超脱
public static final int ITEM_TYPE_FILTER_FRAGRANCE = 20211; // 香氛
public static final int ITEM_TYPE_FILTER_WHITE = 20212; // 美白
public static final int ITEM_TYPE_FILTER_ROMANTIC = 20213; // 浪漫
public static final int ITEM_TYPE_FILTER_FRESH = 20214; // 清新
public static final int ITEM_TYPE_FILTER_BEAUTIFUL = 20215; // 唯美
public static final int ITEM_TYPE_FILTER_PINK = 20216; // 粉嫩
public static final int ITEM_TYPE_FILTER_REMINISCENCE = 20217; // 怀旧
public static final int ITEM_TYPE_FILTER_BLUES = 20218; // 蓝调
public static final int ITEM_TYPE_FILTER_COOL = 20219; // 清凉
public static final int ITEM_TYPE_FILTER_JAPANESE = 20220; // 日系


public static final int ITEM_TYPE_MOTION_NONE = 20301; // 动效,无特效
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.tencent.liteav.demo.beauty.BeautyImpl;
import com.tencent.liteav.demo.beauty.adapter.ItemAdapter;
import com.tencent.liteav.demo.beauty.adapter.TabAdapter;
import com.tencent.liteav.demo.beauty.constant.BeautyConstants;
import com.tencent.liteav.demo.beauty.model.BeautyInfo;
import com.tencent.liteav.demo.beauty.model.ItemInfo;
import com.tencent.liteav.demo.beauty.model.TabInfo;
Expand Down Expand Up @@ -154,6 +155,9 @@ public BeautyInfo getDefaultBeautyInfo() {

public void setBeautyManager(TXBeautyManager beautyManager) {
mBeauty.setBeautyManager(beautyManager);
// 滤镜默认选中白皙
setCurrentFilterIndex(3);
setCurrentBeautyIndex(2);
}

public void setMotionTmplEnable(boolean enable) {
Expand All @@ -168,6 +172,10 @@ public void setCurrentFilterIndex(int index) {
mBeauty.setCurrentFilterIndex(mBeautyInfo, index);
}

public void setCurrentBeautyIndex(int index) {
mBeauty.setCurrentBeautyIndex(mBeautyInfo, index);
}

public ItemInfo getFilterItemInfo(int index) {
return mBeauty.getFilterItemInfo(mBeautyInfo, index);
}
Expand Down Expand Up @@ -237,7 +245,15 @@ public void onTabChange(TabInfo tabInfo, int position) {
private void createItemList(@NonNull final TabInfo tabInfo, @NonNull final int tabPosition) {
setBeautyTitle(tabInfo.getTabName());
ItemAdapter itemAdapter = new ItemAdapter(mContext);
itemAdapter.setData(tabInfo);
if (tabInfo.getTabType() == BeautyConstants.TAB_TYPE_FILTER) {
// 滤镜默认选中白皙
itemAdapter.setData(tabInfo, 3);
} else if(tabInfo.getTabType() == BeautyConstants.TAB_TYPE_BEAUTY) {
// 美颜默认选中P图
itemAdapter.setData(tabInfo, 2);
} else {
itemAdapter.setData(tabInfo);
}
mScrollItemView.setAdapter(itemAdapter);
mScrollItemView.setClicked(mCurrentItemPosition[tabPosition]);
itemAdapter.setOnItemClickListener(new ItemAdapter.OnItemClickListener() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Android/Demo/beautysettingkit/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<string-array name="beauty_filter_type">
<item>无</item>
<item>标准</item>
<item>自然</item>
<item>白皙</item>
<item>樱红</item>
<item>云裳</item>
<item>纯真</item>
Expand Down
2 changes: 2 additions & 0 deletions Android/Demo/beautysettingkit/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
<string name="beauty_panel_faceshape">脸型</string>

<string name="beauty_panel_filter_standard">标准</string>
<string name="beauty_panel_filter_ziran">自然</string>
<string name="beauty_panel_filter_baixi">白皙</string>
<string name="beauty_panel_filter_cheery">樱红</string>
<string name="beauty_panel_filter_cloud">云裳</string>
<string name="beauty_panel_filter_pure">纯真</string>
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
| iOS | [下载](http://liteavsdk-1252463788.cosgz.myqcloud.com/TXLiteAVSDK_UGC_iOS_latest.zip) | [DOC](https://cloud.tencent.com/document/product/584/11638) |
| Android | [下载](http://liteavsdk-1252463788.cosgz.myqcloud.com/TXLiteAVSDK_UGC_Android_latest.zip) | [DOC](https://cloud.tencent.com/document/product/584/11631) |

### Version 7.6 @ 2020.08.24
- iOS&Android:AI美颜优化,修复唇彩遮挡问题,提高人脸检测追踪精确度,优化侧脸妆容效果;
- iOS&Android:SDK事件及错误回调信息国际化;
- Android:短视频自定义预处理回调提前到添加贴纸之前;
- Android:短视频修复bitmap被释放导致的偶现Crash问题;
- Android:短视频修复特定机型合唱持续loading的问题;
### Version 7.7 @ 2020.09.08
- Android:P图基础美颜优化,新增白皙和自然两种滤镜;
- iOS:短视频iOS14系统兼容性问题f

## 问题反馈
为了更好的了解您使用 UGSVSDK 所遇到的问题,方便快速有效定位解决 UGSVSDK 问题,希望您按如下反馈指引反馈issue,方便我们尽快解决您的问题
Expand Down
4 changes: 4 additions & 0 deletions 版本历史.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Version 7.7 @ 2020.09.08
- Android:P图基础美颜优化,新增白皙和自然两种滤镜;
- iOS:短视频iOS14系统兼容性问题f

### Version 7.6 @ 2020.08.24
- iOS&Android:AI美颜优化,修复唇彩遮挡问题,提高人脸检测追踪精确度,优化侧脸妆容效果;
- iOS&Android:SDK事件及错误回调信息国际化;
Expand Down

0 comments on commit 37416a3

Please sign in to comment.