android控件自定义TabHost
2012-10-12 11:15:56 来源:WEB开发网核心提示::button="@null"android:textColor="@color/xct_lthj_back"/></RadioGroup></LinearLayout><!-- android:layout_weight="1&qu
:button="@null"
android:textColor="@color/xct_lthj_back"/>
</RadioGroup>
</LinearLayout>
<!-- android:layout_weight="1" -->
<TabWidget android:id="@android:id/tabs" android:visibility="gone"
android:layout_weight="0.0" style="@style/xct_lthj_layout_width_height_wf" />
<TextView android:layout_height="@dimen/xct_lthj_space_twozeroone" android:layout_width="fill_parent"
android:background="@color/xct_lthj_historyback" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="@dimen/xct_lthj_space_zero"
android:layout_weight="1.0" />
</LinearLayout>
</phonestock.exch.ui.ResizeTabHost>
ResizeTabHost的代码
package phonestock.util;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TabHost;
public class ResizeTabHost extends TabHost{
private OnResizeListener mListener;
public interface OnResizeListener {
void OnResize(int w, int h, int oldw, int oldh);
}
public void setOnResizeListener(OnResizeListener l) {
mListener = l;
}
public ResizeTabHost(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
android:textColor="@color/xct_lthj_back"/>
</RadioGroup>
</LinearLayout>
<!-- android:layout_weight="1" -->
<TabWidget android:id="@android:id/tabs" android:visibility="gone"
android:layout_weight="0.0" style="@style/xct_lthj_layout_width_height_wf" />
<TextView android:layout_height="@dimen/xct_lthj_space_twozeroone" android:layout_width="fill_parent"
android:background="@color/xct_lthj_historyback" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="@dimen/xct_lthj_space_zero"
android:layout_weight="1.0" />
</LinearLayout>
</phonestock.exch.ui.ResizeTabHost>
ResizeTabHost的代码
package phonestock.util;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TabHost;
public class ResizeTabHost extends TabHost{
private OnResizeListener mListener;
public interface OnResizeListener {
void OnResize(int w, int h, int oldw, int oldh);
}
public void setOnResizeListener(OnResizeListener l) {
mListener = l;
}
public ResizeTabHost(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {