Skip to content
New issue

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

第一子控件无法隐藏 #26

Closed
weibindev opened this issue Dec 26, 2018 · 4 comments
Closed

第一子控件无法隐藏 #26

weibindev opened this issue Dec 26, 2018 · 4 comments

Comments

@weibindev
Copy link

No description provided.

@qyxxjd
Copy link
Owner

qyxxjd commented Dec 27, 2018

把布局文件贴出来看看

@weibindev
Copy link
Author

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_F9FBFB">

<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay"
    app:elevation="0dp">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="24dp"
        android:background="@drawable/sporttype_top" />

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@drawable/sporttype_top"
        app:contentInsetStart="0dp"
        app:popupTheme="@style/AppTheme.PopupOverlay">

        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="@dimen/teaching_management_45dp"
            android:layout_height="match_parent"
            android:padding="@dimen/teaching_management_16dp"
            android:src="@drawable/ic_top_back" />

        <TextView
            android:id="@+id/toolbar_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="锻炼方式选择"
            android:textColor="@android:color/white"
            android:textSize="16sp" />

    </android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

<com.classic.common.MultipleStatusView
    android:id="@+id/multipleStatusView"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:emptyView="@layout/layout_empty_view"
    app:errorView="@layout/layout_error_view"
    app:layout_constraintBottom_toTopOf="@id/bottom"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@id/app_bar_layout"
    app:loadingView="@layout/layout_loading_view"
    app:noNetworkView="@layout/layout_network_view">

    <net.crigh.library.widget.ShadowLayout
        android:id="@+id/geographic_range"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/rel_10dp"
        android:visibility="gone"
        app:sl_shadow_angle="45"
        app:sl_shadow_color="#ECECEC"
        app:sl_shadow_distance="4dp"
        app:sl_shadow_radius="4dp">

        <net.crigh.library.widget.SuperTextView
            android:id="@+id/tv_geographic_range"
            android:layout_width="match_parent"
            android:layout_height="@dimen/rel_55dp"
            app:sLeftIconMarginLeft="@dimen/rel_15dp"
            app:sLeftIconRes="@drawable/sporttype_location"
            app:sLeftTextString="区域范围"
            app:sRightIconHeight="@dimen/rel_12dp"
            app:sRightIconMarginRight="@dimen/rel_15dp"
            app:sRightIconRes="@drawable/next_sporttype"
            app:sRightIconWidth="@dimen/rel_12dp" />

    </net.crigh.library.widget.ShadowLayout>

    <net.crigh.library.widget.ShadowLayout
        android:id="@+id/free_movement"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/geographic_range"
        android:layout_marginTop="@dimen/rel_10dp"
        android:visibility="gone"
        app:sl_shadow_angle="45"
        app:sl_shadow_color="#ECECEC"
        app:sl_shadow_distance="4dp"
        app:sl_shadow_radius="4dp">

        <net.crigh.library.widget.SuperTextView
            android:id="@+id/tv_free_movement"
            android:layout_width="match_parent"
            android:layout_height="@dimen/rel_55dp"
            app:sLeftIconMarginLeft="@dimen/rel_15dp"
            app:sLeftIconRes="@drawable/sporttype_sport"
            app:sLeftTextString="自由运动"
            app:sRightIconHeight="@dimen/rel_12dp"
            app:sRightIconMarginRight="@dimen/rel_15dp"
            app:sRightIconRes="@drawable/next_sporttype"
            app:sRightIconWidth="@dimen/rel_12dp" />

    </net.crigh.library.widget.ShadowLayout>

    <net.crigh.library.widget.ShadowLayout
        android:id="@+id/campus_road"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/free_movement"
        android:layout_marginTop="@dimen/rel_10dp"
        android:visibility="gone"
        app:sl_shadow_angle="45"
        app:sl_shadow_color="#ECECEC"
        app:sl_shadow_distance="4dp"
        app:sl_shadow_radius="4dp">

        <net.crigh.library.widget.SuperTextView
            android:id="@+id/tv_campus_road"
            android:layout_width="match_parent"
            android:layout_height="@dimen/rel_55dp"
            app:sLeftIconMarginLeft="@dimen/rel_15dp"
            app:sLeftIconRes="@drawable/randomroute"
            app:sLeftTextString="校内道路"
            app:sRightIconHeight="@dimen/rel_12dp"
            app:sRightIconMarginRight="@dimen/rel_15dp"
            app:sRightIconRes="@drawable/next_sporttype"
            app:sRightIconWidth="@dimen/rel_12dp" />

    </net.crigh.library.widget.ShadowLayout>

    <net.crigh.library.widget.ShadowLayout
        android:id="@+id/fixed_line"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/campus_road"
        android:layout_marginTop="@dimen/rel_10dp"
        android:visibility="gone"
        app:sl_shadow_angle="45"
        app:sl_shadow_color="#ECECEC"
        app:sl_shadow_distance="4dp"
        app:sl_shadow_radius="4dp">

        <net.crigh.library.widget.SuperTextView
            android:id="@+id/tv_fixed_line"
            android:layout_width="match_parent"
            android:layout_height="@dimen/rel_55dp"
            app:sLeftIconMarginLeft="@dimen/rel_15dp"
            app:sLeftIconRes="@mipmap/ic_fixedline"
            app:sLeftTextString="固定线路"
            app:sRightIconHeight="@dimen/rel_12dp"
            app:sRightIconMarginRight="@dimen/rel_15dp"
            app:sRightIconRes="@drawable/next_sporttype"
            app:sRightIconWidth="@dimen/rel_12dp" />

    </net.crigh.library.widget.ShadowLayout>

</com.classic.common.MultipleStatusView>


<View
    android:id="@+id/bottom"
    android:layout_width="0dp"
    android:layout_height="@dimen/teaching_management_96dp"
    android:background="@drawable/sporttype_buttom"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>
image

@qyxxjd
Copy link
Owner

qyxxjd commented Dec 27, 2018

你的布局结构和 示例Demo:RefreshActivity 比较相似,参考以下几个文件:

@weibindev
Copy link
Author

多谢,已经使用
view.post(() -> {
view.setVisibility(View.GONE);
});
解决问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants