美颜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.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -20,6 +21,8 @@ public class AnimViewHolder extends BaseViewHolder {
|
|||||||
public AnimViewHolder(@NonNull View itemView) {
|
public AnimViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
icon = itemView.findViewById(R.id.iv_control);
|
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);
|
icon.setBackgroundResource(R.drawable.bg_control_square_selector);
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
adapter.getAnimojiDataFactory().onFilterSelected((AnimationFilterBean) itemView.getTag());
|
adapter.getAnimojiDataFactory().onFilterSelected((AnimationFilterBean) itemView.getTag());
|
||||||
|
@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh;
|
|||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -17,10 +18,13 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class AnimojiViewHolder extends BaseViewHolder {
|
public class AnimojiViewHolder extends BaseViewHolder {
|
||||||
ImageView icon;
|
ImageView icon;
|
||||||
|
TextView title;
|
||||||
|
|
||||||
public AnimojiViewHolder(@NonNull View itemView) {
|
public AnimojiViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
icon = itemView.findViewById(R.id.iv_control);
|
icon = itemView.findViewById(R.id.iv_control);
|
||||||
|
title = itemView.findViewById(R.id.tv_control);
|
||||||
|
title.setVisibility(View.GONE);
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
adapter.getAnimojiDataFactory().onAnimojiSelected((AnimojiBean) itemView.getTag());
|
adapter.getAnimojiDataFactory().onAnimojiSelected((AnimojiBean) itemView.getTag());
|
||||||
setSelectPosition(getLayoutPosition());
|
setSelectPosition(getLayoutPosition());
|
||||||
|
@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh;
|
|||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -21,6 +22,8 @@ public class BigHeadViewHolder extends BaseViewHolder {
|
|||||||
public BigHeadViewHolder(@NonNull View itemView) {
|
public BigHeadViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
icon = itemView.findViewById(R.id.iv_control);
|
icon = itemView.findViewById(R.id.iv_control);
|
||||||
|
TextView title = itemView.findViewById(R.id.tv_control);
|
||||||
|
title.setVisibility(View.GONE);
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
PropBean bean = (PropBean) itemView.getTag();
|
PropBean bean = (PropBean) itemView.getTag();
|
||||||
adapter.getPropDataFactory().setPropType(FunctionEnum.BIG_HEAD);
|
adapter.getPropDataFactory().setPropType(FunctionEnum.BIG_HEAD);
|
||||||
|
@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh;
|
|||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -24,6 +25,8 @@ public class FineStickerViewHolder extends BaseViewHolder implements StickerDown
|
|||||||
public FineStickerViewHolder(@NonNull View itemView) {
|
public FineStickerViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
icon = itemView.findViewById(R.id.iv_control);
|
icon = itemView.findViewById(R.id.iv_control);
|
||||||
|
TextView title = itemView.findViewById(R.id.tv_control);
|
||||||
|
title.setVisibility(View.GONE);
|
||||||
itemView.setOnClickListener(view -> {
|
itemView.setOnClickListener(view -> {
|
||||||
FineStickerDataFactory.getInstance().downloadSticker((FineStickerEntity.DocsBean) itemView.getTag());
|
FineStickerDataFactory.getInstance().downloadSticker((FineStickerEntity.DocsBean) itemView.getTag());
|
||||||
setSelectPosition(getAdapterPosition());
|
setSelectPosition(getAdapterPosition());
|
||||||
|
@ -2,6 +2,7 @@ package com.yunbao.faceunity.adapters.vh;
|
|||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
@ -20,6 +21,8 @@ public class StickerViewHolder extends BaseViewHolder{
|
|||||||
public StickerViewHolder(@NonNull View itemView) {
|
public StickerViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
icon =itemView.findViewById(R.id.iv_control);
|
icon =itemView.findViewById(R.id.iv_control);
|
||||||
|
TextView title = itemView.findViewById(R.id.tv_control);
|
||||||
|
title.setVisibility(View.GONE);
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
PropBean bean= (PropBean) itemView.getTag();
|
PropBean bean= (PropBean) itemView.getTag();
|
||||||
adapter.getPropDataFactory().setPropType(FunctionEnum.STICKER);
|
adapter.getPropDataFactory().setPropType(FunctionEnum.STICKER);
|
||||||
|
@ -4,11 +4,13 @@ import android.content.Context;
|
|||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
@ -54,6 +56,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper
|
|||||||
private ImageView menu2Back, back, close, contrast;
|
private ImageView menu2Back, back, close, contrast;
|
||||||
private DiscreteSeekBar seekBar;
|
private DiscreteSeekBar seekBar;
|
||||||
private IFaceUnityInter iFaceUnityInter;
|
private IFaceUnityInter iFaceUnityInter;
|
||||||
|
private ConstraintLayout titleLayout;
|
||||||
|
|
||||||
public FaceUnityView(Context context) {
|
public FaceUnityView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@ -97,6 +100,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper
|
|||||||
menuDiy = findViewById(R.id.menu_diy);
|
menuDiy = findViewById(R.id.menu_diy);
|
||||||
seekBar = findViewById(R.id.item_seekBar);
|
seekBar = findViewById(R.id.item_seekBar);
|
||||||
contrast = findViewById(R.id.item_contrast);
|
contrast = findViewById(R.id.item_contrast);
|
||||||
|
titleLayout = findViewById(R.id.titleLayout);
|
||||||
initMenuGroup();
|
initMenuGroup();
|
||||||
setContainerRecycler(new ArrayList<>());
|
setContainerRecycler(new ArrayList<>());
|
||||||
initViewClick();
|
initViewClick();
|
||||||
@ -157,6 +161,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper
|
|||||||
private void goBackMainMenu() {
|
private void goBackMainMenu() {
|
||||||
setContainerRecycler(new ArrayList<>());
|
setContainerRecycler(new ArrayList<>());
|
||||||
title.setText("美顏特效選擇");
|
title.setText("美顏特效選擇");
|
||||||
|
titleLayout.setVisibility(VISIBLE);
|
||||||
title.setVisibility(VISIBLE);
|
title.setVisibility(VISIBLE);
|
||||||
menu2.setVisibility(GONE);
|
menu2.setVisibility(GONE);
|
||||||
menuGroup.setVisibility(VISIBLE);
|
menuGroup.setVisibility(VISIBLE);
|
||||||
@ -402,6 +407,7 @@ public class FaceUnityView extends LinearLayout implements StickerDownloadHelper
|
|||||||
containerRecycler.setLayoutManager(new GridLayoutManager(mContext, 2));
|
containerRecycler.setLayoutManager(new GridLayoutManager(mContext, 2));
|
||||||
containerRecycler.setAdapter(containerAdapter);
|
containerRecycler.setAdapter(containerAdapter);
|
||||||
}
|
}
|
||||||
|
titleLayout.setVisibility(title.getVisibility()==GONE?INVISIBLE:VISIBLE);
|
||||||
containerAdapter.setList(list);
|
containerAdapter.setList(list);
|
||||||
containerAdapter.notifyDataSetChanged();
|
containerAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,8 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
>
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
|
||||||
<com.yunbao.faceunity.seekbar.DiscreteSeekBar
|
<com.yunbao.faceunity.seekbar.DiscreteSeekBar
|
||||||
@ -57,10 +56,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/titleLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="10dp">
|
>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/menu_back"
|
android:id="@+id/menu_back"
|
||||||
@ -161,6 +161,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_faceunity_menu1"
|
android:id="@+id/layout_faceunity_menu1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="@dimen/x132"
|
android:layout_width="@dimen/x132"
|
||||||
android:layout_height="@dimen/x180">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -24,9 +24,9 @@
|
|||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="@dimen/x30"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="@string/recover"
|
android:text="@string/recover"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
android:textColor="@color/tv_main_color_selector"
|
android:textColor="@color/tv_main_color_selector"
|
||||||
android:textSize="@dimen/text_size_20" />
|
android:textSize="@dimen/text_size_20" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="40dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/item_icon"
|
android:id="@+id/item_icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="wrap_content"
|
||||||
android:scaleType="fitCenter"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
app:srcCompat="@mipmap/ico_home_animoji" />
|
app:srcCompat="@mipmap/ico_home_animoji" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -19,8 +19,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
android:textColor="#FFFFFF"
|
android:layout_marginBottom="15dp"
|
||||||
android:textSize="12sp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/beauty" />
|
android:text="@string/beauty"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user