مشکل در ایجاد TabHost

ساخت وبلاگ
سلام خدمت دوستان

من یک TabHost میخوام ایجاد کنم ، برنامه نصب میشه ولی اجرا نمیشه و برنامه رو متوقف میکنه!

[تصویر: xjkf59xjcqplahs7dkbu.jpg]

این هم کدهای جاوا هستش
مشکل وقتی پیش میاد که کدهای خط 16 تا 28 رو مینویسم:

[تصویر: we5gf7zslkfpnm7sez3k.jpg]

کدهای  xml:

کد:

<?xml version="1.0" encoding="utf-8"?>
<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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.user.collection.Tabhost">

<TabHost
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tabHost3"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<TabWidget
android:layout_width="match_parent"
android:layout_height="wrap_content"></TabWidget>

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"></LinearLayout>

<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"></LinearLayout>

</FrameLayout>
</LinearLayout>
</TabHost>
</RelativeLayout>

[تصویر: fwvtrwxmgh4boch61xsf.jpg]

لطفا راهنمایی کنید.


یه سوال دیگه اینکه چرا خط 17 در کدهای جاوا رنگ قهوه ای شده؟
و همچنین بعضی خطوط در xml؟

روید باکس...
ما را در سایت روید باکس دنبال می کنید

برچسب : نویسنده : کاوه محمدزادگان roid بازدید : 142 تاريخ : جمعه 15 مرداد 1395 ساعت: 23:44