1. 修改TipToast背景为渐变
2. 增加左侧带图片的TipToast
This commit is contained in:
@@ -55,6 +55,8 @@ import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
import com.mogo.utils.LaunchUtils;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.TipDrawable;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.glide.GlideApp;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -595,6 +597,19 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
tv.setText("entrance add");
|
||||
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
|
||||
});
|
||||
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功"));
|
||||
|
||||
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
|
||||
TipDrawable drawable =
|
||||
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head), 150, 150);
|
||||
TipToast.tip("分享成功",drawable);
|
||||
});
|
||||
|
||||
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
|
||||
TipDrawable drawable =
|
||||
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
|
||||
TipToast.tip("分享成功",drawable);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDebugCtrlTopView"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -210,11 +211,37 @@
|
||||
app:layout_constraintBottom_toTopOf="@id/btnDebugCtrlNaviView"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnShowTextTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="显示文字tip"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/btnDebugAddBottomLayerView"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnShowDrawableTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="显示图文tip"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/btnShowTextTip"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
<Button
|
||||
android:id="@+id/btnShowDrawableTipNoSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="显示图文tip,没有大小"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/btnShowDrawableTip"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupTopViewDebug"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
||||
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -94,6 +94,7 @@ import com.mogo.service.module.MogoAction;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.TipDrawable;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
Reference in New Issue
Block a user