小编Mic*_*aci的帖子

打开故事板时xcode 9崩溃

打开故事板时,XCode 9 GM Candidate 1正在崩溃.

ProductBuildVersion:9A235

UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Could not find class named UIImage
UserInfo: (null)
Hints: 
  0: Replacement view is installing: <IBStoryboardCanvasViewController: 0x7fdf6d7f7d70 representing: (null)>
Run Code Online (Sandbox Code Playgroud)

xcode ios

31
推荐指数
5
解决办法
7333
查看次数

具有水平线性布局的 Android 水平滚动视图。怎么才能填满整个宽度?

我正在做一些练习来学习 android 编程。

我希望这个水平布局中的每个按钮都是全宽的。

所以用户可以滚动它。

这是我的 xml:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="140dp">

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal">

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="Button1" />

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="0"
                android:text="Button2" />

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="Button3" />

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="Button4" />

            <Button
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:text="Button5" />

        </LinearLayout>
    </HorizontalScrollView>

</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

所以按钮 1 和其他所有按钮都必须在画廊中滚动行

java android android-linearlayout

1
推荐指数
1
解决办法
7076
查看次数

标签 统计

android ×1

android-linearlayout ×1

ios ×1

java ×1

xcode ×1