1
我有一個自定義的RelativeLayout並希望使用它內部的android支持設計庫(因此我可以使用CoordinatorLayout)。我試着加入在自定義視圖上使用Android支持設計庫
android:theme="@style/Theme.AppCompat.Light"
,但我仍然收到此錯誤:
Caused by: java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.
這是否意味着我不能使用它的自定義視圖,只有一個活動裏面? 因爲我不能在這裏使用活動。我將這個視圖添加到WindowManager。 任何幫助是高度讚賞。謝謝!
請複製您的自定義RelativeLayout代碼。 –
我不認爲這是一個問題。它的構造正確,就像[here](http://stackoverflow.com/a/22780035/5712208) –