如何在视图元素之间添加TextView/Button。在Android中的其他视图元素之间插入/删除视图元素
我m从服务器获取评论和它的回复,如果评论有回复,那么它将显示查看回复按钮,当用户触摸按钮时,它将获取该评论的回复并仅显示下方的评论。用户再次按下按钮的答复,它会得到消失
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/commentScrollLayout"
>
</LinearLayout>
</ScrollView>
取出的评论在LinearLayout- ID-commentScrollLayout添加,所以我的问题是我如何可以插入/删除回复,请对此有何评论?
感谢Nikita,会被压制评论,它会评论textview编号? – SML
@SunilLohar不,它将是实际的'View'代表评论。我想你可以通过'onClickListener'获取它。 –
非常感谢,它工作。 – SML