Click here to Skip to main content
15,916,371 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello everybody!
First question is about how to pass java file(not xml) like attribute through xml?
For example:

MSIL
<com.ares.tabhost.TabPage
       android:id="@+id/textView4" android:text="Tab 2"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
         android:background="@drawable/background_states"
         customAttrs:TabHost_textColor="#C0F"
        //Need to pass MYACTIVITY.java 
         customAttrs:TabHost_LinkToActivity="@src/MYACTIVITY.java" 
        //if I pass @layout/someXMLfile - it works great!
        />


And second question is how to locate Activity into ViewGroup? I found solution, but it doesn't work!

void createInnerActivity(ViewGroup container, Class<?> activityClass)
{
        if (container.getChildCount() != 0) {
            container.removeViewAt(0);
        }
android.app.ActivityGroup ag = new ActivityGroup(true);
        final Intent intent = new Intent(this, activityClass);
        final Window window =ag.
getLocalActivityManager().startActivity(activityClass.toString(),
intent); //Error occured (activities can't be added until the containing group has been created)
        container.addView(window.getDecorView(), new
ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));

} 

Help me, please!
Posted
Updated 18-May-11 19:22pm
v2
Comments
Peter_in_2780 19-May-11 19:41pm    
while (question.contains('!'))
{
answer.priority--;
}
_Ares!!! 20-May-11 7:08am    
Are you kidding me?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900