TabActivity in library project, android.R.id.tabhost not found error -


i trying create template/baseactivity class other developers use, part of framework.

i extended class tabactivity, , xml looks this/

<tabhost xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@android:id/tabhost" android:layout_width="match_parent"     android:layout_height="match_parent">     <linearlayout android:orientation="vertical"         android:layout_width="fill_parent" android:layout_height="fill_parent">         <view android:layout_width="fill_parent" android:layout_height="0dip"             android:background="#000" />         <tabwidget android:id="@android:id/tabs"             android:layout_width="fill_parent" android:layout_height="wrap_content"             android:layout_marginleft="0dip" android:layout_marginright="0dip" />         <view android:layout_width="fill_parent" android:layout_height="2dip"             android:background="#696969" />         <view android:layout_width="fill_parent" android:layout_height="1dip"             android:background="#fff" />         <framelayout android:id="@android:id/tabcontent"             android:layout_width="fill_parent" android:layout_height="fill_parent" />     </linearlayout> </tabhost> 

when use activity extending in other project, error stating, not able android.r.id.tabhost , necessary.

this happens, if call gettabhost() or findviewbyid() both scenarios.

please note : tried without extending tabactivity, use of views in tab. works fine. want use activities tab content.

i think issue when make library project , include it.

please let me know if need more explanation or if know workarounds, please suggest.

i got around issue. provided library class requires user pass current activity instance templatelibrary.

it calls sets conetnt 1 of layout file containing android tab. tab host.

let me know if wants more details on this. if developing framework providing layout user.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -