摘要:
很多时候,android提供的组件并不能满足我们的需求,于是我们不得不按需求开发自定义控件。Step 1. 写好自定义控件的内部布局文件。 Step 2: 写好自定义的控件类并继承LinearLayout,并写好相关方法,用于控制自定义控件的内容。 package org.hjw.mybutton;import android.content.Context;import android.util.AttributeSet;import android.view.LayoutInflater;import android.widget.ImageView;import ... 阅读全文