Thursday, April 11, 2013

[android help] Using ViewGroup within custom component


I've created a custom Card widget for use in my Android application, as shown here:




android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/CardBaseTheme"
android:orientation="vertical">
android:textIsSelectable="true"
android:id="@+id/cardTitle"
style="@style/CardTitleTheme"/>
android:textIsSelectable="true"
android:id="@+id/cardContent"
style="@style/CardTextTheme"/>



Now i would like to make this widget more generic by replacing the second TextView with a ViewGroup component, so that I can define cards using:



android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:card_title="@string/about_header1">





However, this doesn't seem to work. LogCat only states error inflating class android.view.ViewGroup, which doesn't really help me either.


What would be the correct way to do this?


UPDATE:


LogCat stacktrace here



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...