diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimViewHolder.java index 748542fd0..9b099352d 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimViewHolder.java @@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh; import android.view.View; import android.widget.ImageView; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -20,6 +21,8 @@ public class AnimViewHolder extends BaseViewHolder { public AnimViewHolder(@NonNull View itemView) { super(itemView); icon = itemView.findViewById(R.id.iv_control); + TextView title = itemView.findViewById(R.id.tv_control); + title.setVisibility(View.GONE); icon.setBackgroundResource(R.drawable.bg_control_square_selector); itemView.setOnClickListener(v -> { adapter.getAnimojiDataFactory().onFilterSelected((AnimationFilterBean) itemView.getTag()); diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimojiViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimojiViewHolder.java index 090198748..a8350ce76 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimojiViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/AnimojiViewHolder.java @@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh; import android.view.View; import android.widget.ImageView; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -17,10 +18,13 @@ import java.util.List; */ public class AnimojiViewHolder extends BaseViewHolder { ImageView icon; + TextView title; public AnimojiViewHolder(@NonNull View itemView) { super(itemView); icon = itemView.findViewById(R.id.iv_control); + title = itemView.findViewById(R.id.tv_control); + title.setVisibility(View.GONE); itemView.setOnClickListener(v -> { adapter.getAnimojiDataFactory().onAnimojiSelected((AnimojiBean) itemView.getTag()); setSelectPosition(getLayoutPosition()); diff --git a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/BigHeadViewHolder.java b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/BigHeadViewHolder.java index a79337fbc..3621f53b0 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/BigHeadViewHolder.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/adapters/vh/BigHeadViewHolder.java @@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh; import android.view.View; import android.widget.ImageView; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -21,6 +22,8 @@ public class BigHeadViewHolder extends BaseViewHolder { public BigHeadViewHolder(@NonNull View itemView) { super(itemView); icon = itemView.findViewById(R.id.iv_control); + TextView title = itemView.findViewById(R.id.tv_control); + title.setVisibility(View.GONE); itemView.setOnClickListener(v -> { PropBean bean = (PropBean) itemView.getTag(); adapter.getPropDataFactory().setPropType(FunctionEnum.BIG_HEAD); 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 52d5c613f..82194c694 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 @@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh; import android.view.View; import android.widget.ImageView; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -24,6 +25,8 @@ public class FineStickerViewHolder extends BaseViewHolder implements StickerDown public FineStickerViewHolder(@NonNull View itemView) { super(itemView); icon = itemView.findViewById(R.id.iv_control); + TextView title = itemView.findViewById(R.id.tv_control); + title.setVisibility(View.GONE); itemView.setOnClickListener(view -> { FineStickerDataFactory.getInstance().downloadSticker((FineStickerEntity.DocsBean) itemView.getTag()); setSelectPosition(getAdapterPosition()); 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 edc5ba70f..43c00c48d 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 @@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh; import android.view.View; import android.widget.ImageView; +import android.widget.TextView; import androidx.annotation.NonNull; @@ -20,6 +21,8 @@ public class StickerViewHolder extends BaseViewHolder{ public StickerViewHolder(@NonNull View itemView) { super(itemView); icon =itemView.findViewById(R.id.iv_control); + TextView title = itemView.findViewById(R.id.tv_control); + title.setVisibility(View.GONE); itemView.setOnClickListener(v -> { PropBean bean= (PropBean) itemView.getTag(); adapter.getPropDataFactory().setPropType(FunctionEnum.STICKER); 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 33dc80941..ad7d6ee83 100644 --- a/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java +++ b/FaceUnity/src/main/java/com/yunbao/faceunity/ui/FaceUnityView.java @@ -4,11 +4,13 @@ import android.content.Context; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.LayoutInflater; +import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.Nullable; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -54,6 +56,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper private ImageView menu2Back, back, close, contrast; private DiscreteSeekBar seekBar; private IFaceUnityInter iFaceUnityInter; + private ConstraintLayout titleLayout; public FaceUnityView(Context context) { super(context); @@ -97,6 +100,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper menuDiy = findViewById(R.id.menu_diy); seekBar = findViewById(R.id.item_seekBar); contrast = findViewById(R.id.item_contrast); + titleLayout = findViewById(R.id.titleLayout); initMenuGroup(); setContainerRecycler(new ArrayList<>()); initViewClick(); @@ -157,6 +161,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper private void goBackMainMenu() { setContainerRecycler(new ArrayList<>()); title.setText("美顏特效選擇"); + titleLayout.setVisibility(VISIBLE); title.setVisibility(VISIBLE); menu2.setVisibility(GONE); menuGroup.setVisibility(VISIBLE); @@ -402,6 +407,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper containerRecycler.setLayoutManager(new GridLayoutManager(mContext, 2)); containerRecycler.setAdapter(containerAdapter); } + titleLayout.setVisibility(title.getVisibility()==GONE?INVISIBLE:VISIBLE); containerAdapter.setList(list); containerAdapter.notifyDataSetChanged(); } diff --git a/FaceUnity/src/main/res/layout/layout_faceunity.xml b/FaceUnity/src/main/res/layout/layout_faceunity.xml index 214756890..d591b4d19 100644 --- a/FaceUnity/src/main/res/layout/layout_faceunity.xml +++ b/FaceUnity/src/main/res/layout/layout_faceunity.xml @@ -8,9 +8,8 @@ + android:layout_gravity="center"> + > diff --git a/FaceUnity/src/main/res/layout/list_item_face_config_big_head.xml b/FaceUnity/src/main/res/layout/list_item_face_config_big_head.xml index fe0f3350a..f1b0c0c44 100644 --- a/FaceUnity/src/main/res/layout/list_item_face_config_big_head.xml +++ b/FaceUnity/src/main/res/layout/list_item_face_config_big_head.xml @@ -1,7 +1,7 @@ + android:layout_height="wrap_content"> diff --git a/FaceUnity/src/main/res/layout/list_item_menu_group.xml b/FaceUnity/src/main/res/layout/list_item_menu_group.xml index 2c2947a81..05d23495f 100644 --- a/FaceUnity/src/main/res/layout/list_item_menu_group.xml +++ b/FaceUnity/src/main/res/layout/list_item_menu_group.xml @@ -1,16 +1,16 @@ + android:text="@string/beauty" + android:textColor="#FFFFFF" + android:textSize="12sp" /> \ No newline at end of file