diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/ContainerRecyclerAdapter.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/ContainerRecyclerAdapter.java index 6d3a46ecb..d3d230199 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/ContainerRecyclerAdapter.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/ContainerRecyclerAdapter.java @@ -96,7 +96,7 @@ public class ContainerRecyclerAdapter extends RecyclerView.Adapter setSelectPosition(getAdapterPosition())); } @Override public void setData(BaseBean data) { icon.setImageResource(data.getImageRes()); title.setText(data.getDesRes()); + icon.setSelected(getSelectPosition()==getAdapterPosition()); + title.setSelected(getSelectPosition()==getAdapterPosition()); + } } diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/FineStickerViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/FineStickerViewHolder.java index be7698a9b..6eab87195 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/FineStickerViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/FineStickerViewHolder.java @@ -9,12 +9,16 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.faceunity.R; import com.yunbao.faceunity.entity.BaseBean; +/** + * 精品贴纸 + */ public class FineStickerViewHolder extends BaseViewHolder { ImageView imageView; public FineStickerViewHolder(@NonNull View itemView) { super(itemView); imageView = itemView.findViewById(R.id.iv_control); + itemView.setOnClickListener(view -> setSelectPosition(getAdapterPosition())); } @Override @@ -24,5 +28,6 @@ public class FineStickerViewHolder extends BaseViewHolder { } else { ImgLoader.display(imageView.getContext(), data.getImageUrl(), imageView); } + imageView.setSelected(getSelectPosition() == getAdapterPosition()); } } diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/MakeupViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/MakeupViewHolder.java index 36786d2c3..20133fb24 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/MakeupViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/MakeupViewHolder.java @@ -9,6 +9,9 @@ import androidx.annotation.NonNull; import com.yunbao.faceunity.R; import com.yunbao.faceunity.entity.BaseBean; +/** + * 美妆 + */ public class MakeupViewHolder extends BaseViewHolder { private ImageView icon; private TextView title; diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StickerViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StickerViewHolder.java index 9f2fc194e..e55f2b315 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StickerViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StickerViewHolder.java @@ -8,6 +8,9 @@ import androidx.annotation.NonNull; import com.yunbao.faceunity.R; import com.yunbao.faceunity.entity.BaseBean; +/** + * 普通贴纸 + */ public class StickerViewHolder extends BaseViewHolder{ ImageView imageView; public StickerViewHolder(@NonNull View itemView) { diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StyleViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StyleViewHolder.java index c3e675100..ffba0565b 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StyleViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/StyleViewHolder.java @@ -24,5 +24,6 @@ public class StyleViewHolder extends BaseViewHolder{ icon.setImageResource(data.getImageRes()); title.setText(data.getDesRes()); icon.setSelected(getSelectPosition()==getAdapterPosition()); + title.setSelected(getSelectPosition()==getAdapterPosition()); } } diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/entity/FineStickerDataFactory.java b/FaceUnity/src/main/java/com/yunbao/faceunity/data/FineStickerDataFactory.java similarity index 99% rename from FaceUnity/src/main/java/com/yunbao/faceunity/entity/FineStickerDataFactory.java rename to FaceUnity/src/main/java/com/yunbao/faceunity/data/FineStickerDataFactory.java index 2c6000065..d5b53256e 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/entity/FineStickerDataFactory.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/data/FineStickerDataFactory.java @@ -1,4 +1,4 @@ -package com.yunbao.faceunity.entity; +package com.yunbao.faceunity.data; import android.util.Log; import android.view.MotionEvent; @@ -17,7 +17,6 @@ import com.faceunity.core.model.antialiasing.Antialiasing; import com.faceunity.core.model.prop.sticker.FineSticker; import com.faceunity.core.utils.FileUtils; -import com.yunbao.faceunity.data.FaceBeautyDataFactory; import com.yunbao.faceunity.entity.net.FineStickerEntity; import com.yunbao.faceunity.entity.net.FineStickerTagEntity; import com.yunbao.faceunity.infe.AbstractFineStickerDataFactory; diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/repo/FineStickerSource.java b/FaceUnity/src/main/java/com/yunbao/faceunity/repo/FineStickerSource.java index 77517be2a..eba259dc4 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/repo/FineStickerSource.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/repo/FineStickerSource.java @@ -1,14 +1,5 @@ package com.yunbao.faceunity.repo; -import com.yunbao.faceunity.entity.FineStickerDataFactory; -import com.yunbao.faceunity.entity.net.FineStickerEntity; -import com.yunbao.faceunity.entity.net.FineStickerTagEntity; -import com.yunbao.faceunity.utils.net.StickerDownloadHelper; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; - public class FineStickerSource { } diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java b/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java index eb25b258e..38313c369 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java @@ -19,7 +19,7 @@ import com.yunbao.faceunity.adapters.MenuGroupRecyclerAdapter; import com.yunbao.faceunity.data.FaceParam; import com.yunbao.faceunity.data.FaceUnityDataFactory; import com.yunbao.faceunity.entity.BaseBean; -import com.yunbao.faceunity.entity.FineStickerDataFactory; +import com.yunbao.faceunity.data.FineStickerDataFactory; import com.yunbao.faceunity.entity.FunctionEnum; import com.yunbao.faceunity.entity.MenuGroupBean; import com.yunbao.faceunity.entity.net.FineStickerEntity; @@ -110,6 +110,8 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper } private void goBackMainMenu(){ setContainerRecycler(new ArrayList<>()); + title.setText("美顏特效選擇"); + title.setVisibility(VISIBLE); menu2.setVisibility(GONE); menuGroup.setVisibility(VISIBLE); } diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/utils/SeekBarUtils.kt b/FaceUnity/src/main/java/com/yunbao/faceunity/utils/SeekBarUtils.kt index 6047488a4..c24ac78f2 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/utils/SeekBarUtils.kt +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/utils/SeekBarUtils.kt @@ -23,6 +23,10 @@ class SeekBarUtils { } bar.visibility = View.VISIBLE } + fun seekToValue(range:Double,value:Int,seekBarMin:Int):Double{ + val valueF: Double = 1.0 * (value - seekBarMin) / 100 + return range*valueF; + } } diff --git a/FaceUnity/src/main/res/drawable/bg_control_square2_selector.xml b/FaceUnity/src/main/res/drawable/bg_control_square2_selector.xml new file mode 100644 index 000000000..a9b68b517 --- /dev/null +++ b/FaceUnity/src/main/res/drawable/bg_control_square2_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/bg_shape_rect2_theme.xml b/FaceUnity/src/main/res/drawable/bg_shape_rect2_theme.xml new file mode 100644 index 000000000..f06b2bd46 --- /dev/null +++ b/FaceUnity/src/main/res/drawable/bg_shape_rect2_theme.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_1_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_1_selector.xml index 6e6c49955..e9f3c0614 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_1_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_1_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_2_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_2_selector.xml index 948076d08..39acf826a 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_2_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_2_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_3_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_3_selector.xml index 059f1038e..5e023ce8a 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_3_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_3_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_4_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_4_selector.xml index dc26d6db9..316c1337e 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_4_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_4_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_5_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_5_selector.xml index 4a80098ed..7f3dfd3d0 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_5_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_5_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_6_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_6_selector.xml index 977e13236..ce3cff002 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_6_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_6_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/drawable/icon_beauty_style_7_selector.xml b/FaceUnity/src/main/res/drawable/icon_beauty_style_7_selector.xml index 4f19a5bac..d2b1ab3ca 100644 --- a/FaceUnity/src/main/res/drawable/icon_beauty_style_7_selector.xml +++ b/FaceUnity/src/main/res/drawable/icon_beauty_style_7_selector.xml @@ -1,5 +1,4 @@ - \ No newline at end of file diff --git a/FaceUnity/src/main/res/layout/layout_faceunity.xml b/FaceUnity/src/main/res/layout/layout_faceunity.xml index 575d129b1..b74d9dfc5 100644 --- a/FaceUnity/src/main/res/layout/layout_faceunity.xml +++ b/FaceUnity/src/main/res/layout/layout_faceunity.xml @@ -4,12 +4,13 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/bg_live_tota" + android:background="@drawable/bg_live_tota2" android:orientation="vertical"> diff --git a/FaceUnity/src/main/res/layout/list_item_face_config_fine_sticker.xml b/FaceUnity/src/main/res/layout/list_item_face_config_fine_sticker.xml new file mode 100644 index 000000000..a23a14060 --- /dev/null +++ b/FaceUnity/src/main/res/layout/list_item_face_config_fine_sticker.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + diff --git a/FaceUnity/src/main/res/layout/list_item_face_config_style.xml b/FaceUnity/src/main/res/layout/list_item_face_config_style.xml index 5e4fb32b4..d47a8685e 100644 --- a/FaceUnity/src/main/res/layout/list_item_face_config_style.xml +++ b/FaceUnity/src/main/res/layout/list_item_face_config_style.xml @@ -12,6 +12,7 @@ diff --git a/common/src/main/res/drawable/bg_live_tota2.xml b/common/src/main/res/drawable/bg_live_tota2.xml new file mode 100644 index 000000000..046aaa665 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_tota2.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/config.gradle b/config.gradle index d133ebae4..e2b3f1fcf 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveFaceUnityDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveFaceUnityDialogFragment.java index 10d6f4e36..4f27fe06a 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveFaceUnityDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveFaceUnityDialogFragment.java @@ -46,7 +46,7 @@ public class LiveFaceUnityDialogFragment extends AbsDialogFragment { @Override protected boolean canCancel() { - return false; + return true; } @Override