JessYanCoding / JessYanCoding/AndroidAutoSize
重写了getResources与generateLayoutparams,依旧会出现局部适配失效的问题
- 主要語言
- Java
- 星號
- 13.7k
- 分支
- 2k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
作者你好,我在activity的getResources方法中重新设置了density,也重写了generateLayoutParams方法重新设置density值,但是依旧会出现局部适配失效的问题,如下图,输入框部分异常变大,且该问题非必现:


变大部分的xml中,最上层标签是merge,然后就是我自定义的父布局,重写了generateLayoutParams方法重新设置density值。

请问下,是否是我使用的方式不对,需要在每一个viewGroup都重写generateLayoutParams方法?或者有没有其他的方式来避免这个问题
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start with the Activity getResources override and the custom parent layout's generateLayoutParams implementation described in the issue. Reproduce the intermittent sizing failure using the merge-root XML and affected input field, then trace which layout path does not receive the intended density. Done means identifying the supported adaptation path and documenting or fixing the case without requiring every ViewGroup to be overridden.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, java
- 領域
- mobile-dev
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100