提交 b7dc9a71 编写于 作者: C chaychan

修改expandableTextView,使用对齐的TextView(alignTextView)

上级 383f06fc
......@@ -31,6 +31,5 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'me.codeboy.android:align-text-view:2.3.0'
compile project(':AliagnTextView')
}
......@@ -24,4 +24,5 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile project(':viewlib')
compile project(':ExpandableTextView')
}
......@@ -10,6 +10,8 @@ import android.widget.Toast;
import com.chaychan.viewlib.ExpandableLinearLayout;
import com.chaychan.viewlib.PowerfulEditText;
import jaydenxiao.com.expandabletextview.ExpandableTextView;
public class MainActivity extends AppCompatActivity {
@Override
......@@ -28,6 +30,9 @@ public class MainActivity extends AppCompatActivity {
}
});
ExpandableTextView etv = (ExpandableTextView) findViewById(R.id.tv_intro);
etv.setText("啊哈可接受的看哈市的哈数据库和的看就好撒看就好将卡上的空间哈看就好啊数据库和的空间哈市科空间哈市科技很多借口撒谎的健康哈数据库空间哈市科技很多借口撒谎的健康哈数据库空间哈市科技很多借口撒谎的健康哈数据库空间哈市科技很多借口撒谎的健康哈数据库技很多借口撒谎的健康哈数据库将撒谎的健康哈啊市科技哈看就好啊数据库的哈看将撒谎空间的哈市科技哈看将");
View view1 = View.inflate(this, R.layout.item_expandable_linear_layout, null);
View view2 = View.inflate(this, R.layout.item_expandable_linear_layout, null);
View view3 = View.inflate(this, R.layout.item_expandable_linear_layout, null);
......
......@@ -28,4 +28,24 @@
app:hideText="查看更多"
/>
<jaydenxiao.com.expandabletextview.ExpandableTextView
android:id="@+id/tv_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="10dp"
android:ellipsize="end"
android:textColor="#666"
app:animDuration="200"
app:collapseDrawable="@drawable/icon_green_arrow_down"
app:collapseExpandGrarity="right"
app:collapseExpandTextColor="@color/main_color"
app:contentTextSize="12sp"
app:expandDrawable="@drawable/icon_green_arrow_up"
app:maxCollapsedLines="3"
app:textCollapse="@string/collapse"
app:textExpand="@string/expand"/>
</LinearLayout>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册