Xamarin.android 重写axml控件

https://www.cnblogs.com/lonelyxmas/p/5632694.html

 

 <Laco: 用来用引指定的控件
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:text="已扫描数量:"
            android:textSize="15sp" />

 

 <TextView xmlns:Load="JyApp\JyApp\Resources\layout\Marqueetextview"
             android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:text="已扫描数量:"
            android:textSize="15sp" />

 

 public class Marqueetextview : TextView
    {
        public Marqueetextview(Context context) : base(context)
        {
        }

        public Marqueetextview(Context context, IAttributeSet attrs) : base(context, attrs)
        {
        }

        public Marqueetextview(Context context, IAttributeSet attrs, int defStyleAttr) : base(context, attrs, defStyleAttr)
        {
        }

        public Marqueetextview(Context context, IAttributeSet attrs, int defStyleAttr, int defStyleRes) : base(context, attrs, defStyleAttr, defStyleRes)
        {
        }

        protected Marqueetextview(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
        {
        }
        public override bool IsFocused => true;
    }

posted @ 2017-12-21 12:04  LuoCore  阅读(590)  评论(0编辑  收藏  举报