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

可否支持收起 展开的按钮在最右边,文字在按钮左边啊 #1

Closed
tianshaokai opened this issue Aug 26, 2016 · 1 comment

Comments

@tianshaokai
Copy link

我们的需求是这样的
image
image

@freecats
Copy link
Owner

可以支持,只要改变一下布局即可,将layout_textview_expand_animation.xml修改为:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ll_text_expand_animation_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/tv_expand_text_view_animation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/color_gray_light_content_text"
        android:textSize="@dimen/sp_txt_size_content"
        android:layout_toLeftOf="@+id/rl_expand_text_view_animation_toggle_layout"
        tools:text="@string/tips" />

    <RelativeLayout
        android:id="@+id/rl_expand_text_view_animation_toggle_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:visibility="visible">

        <ImageView
            android:id="@+id/iv_expand_text_view_animation_toggle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            />

        <TextView
            android:id="@+id/tv_expand_text_view_animation_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:textColor="@color/colorPrimary"
            android:textSize="@dimen/sp_txt_size_content"
            android:visibility="invisible"
            tools:text="全部" />
    </RelativeLayout>

</RelativeLayout>

效果如图:
qq 20160829164644
qq 20160829164708

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