亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

單擊時展開/折疊不正確的 CardView

單擊時展開/折疊不正確的 CardView

慕容708150 2021-09-29 13:35:21
出于某種原因,項目 C CardView是唯一一個動畫 - 即使在單擊項目 B或項目 A 時 CardView也是如此。在法國元音 CardView,因為它工作正常不適用。有誰知道如何解決這個問題,以便正確的 CardView 動畫?GridView 的 GridViewCustom 類public class GridViewCustom extends GridView {    public GridViewCustom(Context context) {        super(context);    }    public GridViewCustom(Context context, AttributeSet attrs) {        super(context, attrs);    }    public GridViewCustom(Context context, AttributeSet attrs, int defStyle) {        super(context, attrs, defStyle);    }    @Override    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {        int heightSpec;        if (getLayoutParams().height == AbsListView.LayoutParams.WRAP_CONTENT) {            heightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);        }        else {            //Any other height should be respected as is.            heightSpec = heightMeasureSpec;        }        super.onMeasure(widthMeasureSpec, heightSpec);    }}基于 Nikhil 的建議
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 251 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

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

公眾號

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