美颜UI调整
This commit is contained in:
parent
04f0953cfa
commit
2fdc4001f4
@ -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());
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -8,9 +8,8 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
android:layout_gravity="center">
|
||||
|
||||
|
||||
<com.yunbao.faceunity.seekbar.DiscreteSeekBar
|
||||
@ -57,10 +56,11 @@
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/titleLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/menu_back"
|
||||
@ -161,6 +161,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_faceunity_menu1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/x132"
|
||||
android:layout_height="@dimen/x180">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -24,9 +24,9 @@
|
||||
android:visibility="invisible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/x30"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/recover"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:textColor="@color/tv_main_color_selector"
|
||||
android:textSize="@dimen/text_size_20" />
|
||||
</LinearLayout>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_icon"
|
||||
android:layout_width="40dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@mipmap/ico_home_animoji" />
|
||||
|
||||
<TextView
|
||||
@ -19,8 +19,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/beauty" />
|
||||
android:text="@string/beauty"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user