第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

addView(View, LayoutParams) is not supported in AdapterView

在打開ChooseMsgActivity時報異常,代碼檢查過了,基本上按照步驟一步一步來的

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gavin.festval_sms/com.gavin.festval_sms.ChooseMsgActivity}: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

正在回答

2 回答

AdapterView的子類比如ListView不能在layout中添加子布局,或者在代碼中添加子布局。

請檢查activity_choose_msg.xml,應該是把FloatingActionButton放在ListView里面了,要把FloatingActionButton放在ListView外面。

<ListView
? ?android:id="@+id/id_lv_msgs"
? ?android:layout_width="match_parent"
? ?android:layout_height="match_parent"/>

? ?<android.support.design.widget.FloatingActionButton
? ? ? ?android:id="@+id/id_fab_toSend"
? ? ? ?android:layout_width="wrap_content"
? ? ? ?android:layout_height="wrap_content"
? ? ? ?android:layout_alignParentBottom="true"
? ? ? ?android:layout_centerHorizontal="true"
? ? ? ?android:src="@drawable/icon_to_send"
? ? ? ?app:backgroundTint="@color/main_color"
? ? ? ?app:borderWidth="0dp"
? ? ? ?android:layout_marginBottom="@dimen/fab_margin"
? ? ? ?/>

http://img1.sycdn.imooc.com//56a88f1a0001b6f312800720.jpg


1 回復 有任何疑惑可以回復我~

activity 注冊過了嗎,檢查一下

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Android-節(jié)日短信送祝福(UI篇)
  • 參與學習       21604    人
  • 解答問題       56    個

帶領大家實現一個節(jié)日短信的群發(fā)app以及監(jiān)聽短信的發(fā)送狀態(tài)等

進入課程

addView(View, LayoutParams) is not supported in AdapterView

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號