We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在根布局中使用 match_parent 无效,使用比重参数(android:layout_weight)也是无效的,导致部分UI很难做适配。
<TextView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
The text was updated successfully, but these errors were encountered:
同问 兄弟解决了吗
Sorry, something went wrong.
public View getView(LayoutInflater inflater) { ConstraintLayout cl = (ConstraintLayout) inflater.inflate(R.layout.bookdetail_detail_item_review_guide_view, null, false); ConstraintLayout.LayoutParams layoutParams = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT); layoutParams.width = ScreenUtils.getScreenWidth(); cl.setLayoutParams(layoutParams); LinearLayout ll = new LinearLayout(inflater.getContext()); LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); ll.setOrientation(LinearLayout.VERTICAL); param.width = ScreenUtils.getScreenWidth(); ll.setLayoutParams(param); ll.addView(cl); return ll; }
这样好像有点用处
No branches or pull requests
在根布局中使用 match_parent 无效,使用比重参数(android:layout_weight)也是无效的,导致部分UI很难做适配。
The text was updated successfully, but these errors were encountered: