【问题标题】:Android material design glitchAndroid材料设计故障
【发布时间】:2015-01-10 02:21:19
【问题描述】:

在这个安卓材料设计库中使用RectangleButton时出现问题:https://github.com/navasmdc/MaterialDesignLibrary 当我触摸按钮并滚动它时,如果你不点击按钮,它就会留下一些不会走的东西 图片:http://imgur.com/sZHShFP

xml代码

<com.gc.materialdesign.views.ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:materialdesign="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="false"
android:focusableInTouchMode="false"
tools:context=".MainActivity$PlaceholderFragment">
<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <view
        class="com.it.university.lbu.ecogallery.EcoGallery"
        android:layout_width="fill_parent"
        android:layout_height="140dp"
        android:id="@+id/gallery"
        android:scaleType="fitXY"
        android:visibility="visible"/>
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:focusable="false">

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view"
                android:layout_weight="1"
                android:background="#ff5146ff"
                android:textSize="25dp"
                android:text="General&#10;   Blog"/>

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view2"
                android:layout_weight="1"
                android:textColor="@color/material_blue_grey_800"
                android:background="#ff67ce00"
                android:padding="0dp"
                android:textSize="25dp"
                android:text="Branch&#10;  Blog" />
        </LinearLayout>

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

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view3"
                android:layout_weight="1"
                android:background="#ff0aff00"
                android:padding="0dp"
                android:textColor="@color/material_blue_grey_800"
                android:textSize="25dp"
                android:text="Personal&#10;    Blog"  />

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view4"
                android:layout_weight="1"
                android:background="#ff007ad4"
                android:padding="0dp"
                android:textSize="25dp"
                android:text="My Friend"  />
        </LinearLayout>

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

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view5"
                android:layout_weight="1"
                android:background="#ffff0000"
                android:padding="0dp"
                android:textSize="25dp"
                android:text="My Teacher"  />

            <view
                class="com.gc.materialdesign.views.ButtonRectangle"
                android:layout_width="fill_parent"
                android:layout_height="150dp"
                android:id="@+id/view6"
                android:layout_weight="1"
                android:background="#ffc1ff00"
                android:padding="0dp"
                android:textSize="25dp"
                android:text="Last News"
                android:textColor="@color/material_blue_grey_800"
                />

        </LinearLayout>
    </LinearLayout>
</LinearLayout>

【问题讨论】:

    标签: android button material-design


    【解决方案1】:

    我有两个解决方案给你!

    现在,如您所见,这个库已经得到了很大的发展,而且现在,即使是 Demo 项目也没有更新到它的库。

    那么,你可以做什么:

    1. 使用适合您的旧库版本。更新演示应用时更新。

    2. 等到这一切结束 - 所有控件都将起作用。并且暂时没有错误报告。

    我已通过电子邮件向开发者发送了有关滚动问题的电子邮件,但无法确定何时会解决此问题,因为他还没有回复。

    .

    更新

    这个库是高度开发的 - 有时它不工作,但它会 :)

    .

    我回答你的问题了吗?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-06
    • 2014-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多