MyTextView.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //package xn.hxp.weidith;
  2. //
  3. //import android.annotation.SuppressLint;
  4. //import android.content.Context;
  5. //import android.util.AttributeSet;
  6. //import android.view.View;
  7. //import android.widget.TextView;
  8. //
  9. //import androidx.annotation.Nullable;
  10. //
  11. //import com.blankj.utilcode.util.ClickUtils;
  12. //import com.lxj.xpopup.XPopup;
  13. //
  14. //@SuppressLint("AppCompatCustomView")
  15. //public class MyTextView extends TextView {
  16. // public MyTextView(Context context, @Nullable AttributeSet attrs) {
  17. // super(context, attrs);
  18. // }
  19. //
  20. // public MyTextView(Context context) {
  21. // super(context);
  22. // setOnClickListener(new ClickUtils.OnDebouncingClickListener() {
  23. // @Override
  24. // public void onDebouncingClick(View v) {
  25. // new XPopup.Builder(getContext())
  26. // .hasShadowBg(false)
  27. // .isTouchThrough(true)
  28. // .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
  29. // .atView(v)
  30. // .isCenterHorizontal(true)
  31. // .hasShadowBg(false) // 去掉半透明背景
  32. // .asCustom(new CustomBubbleAttachPopup(context, getText().toString()))
  33. // .show();
  34. // }
  35. // });
  36. // }
  37. //
  38. //
  39. //
  40. //}