WEB开发网
开发学院手机开发Android 开发 android控件自定义TabHost 阅读

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) {

上一页  1 2 3 4  下一页

Tags:android 控件 定义

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接