欢迎光临成都祈钰瑶科技有限公司网站!祝您生活愉快!
热线电话: 18982081108
✕

成都服务器托管,成都GPU服务器租用,成都高防BGP宽带租用,成都机柜租用托管

自定义控件

1,XML布局

超过十年行业经验,技术领先,服务至上的经营模式,全靠网络和口碑获得客户,为自己降低成本,也就是为客户降低成本。到目前业务范围包括了:网站制作、成都做网站,成都网站推广,成都网站优化,整体网络托管,重庆小程序开发,微信开发,手机APP定制开发,同时也可以让客户的网站和网络营销和我们一样获得订单和生意!

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <com.eduask.demo3.ui.UiTextView
        android:marqueeRepeatLimit="marquee_forever"
        android:ellipsize="marquee"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:text="@string/hello_world" />
</RelativeLayout>

2,Java代码

public class UiTextView extends TextView {

    public UiTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        // TODO Auto-generated constructor stub
    }

    public UiTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        // TODO Auto-generated constructor stub
    }

    public UiTextView(Context context) {
        super(context);
        // TODO Auto-generated constructor stub
    }
    
    @Override
    public boolean isFocused() {
        // TODO Auto-generated method stub
        return true;
    }

}