我想实现一个可折叠的视图,就像Google Play市场一样.它显示内容中的多个行和箭头,并点击箭头显示整个内容.这是使用ExpandableListView实现的还是有其他解决方案?
屏幕截图附上突出显示我正在寻找的东西.谢谢.
任何人都可以指向解决方案如何在Android Market动画中制作描述TextView的扩展动画?将TextView包装到FrameLayout中,单击"更多"标签后会扩展.
我在stackoverflow上发现了自定义LinearLayout的这个例子,但是当我尝试运行它时会抛出错误,有人可以找到它的错误吗?
自定义LinearLayout:
package com.example.androidapp.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.LinearLayout;
public class ExpandablePanel extends LinearLayout {
private final int mHandleId;
private final int mContentId;
private View mHandle;
private View mContent;
private boolean mExpanded = true;
private int mCollapsedHeight = 0;
private int mContentHeight = 0;
public ExpandablePanel(Context context) {
this(context, null);
}
public ExpandablePanel(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.ExpandablePanel, 0, 0);
// How high …Run Code Online (Sandbox Code Playgroud) android exception custom-controls inflate android-linearlayout