<LinearLayout
android:id="@+id/sound_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal">
<ImageView
android:id="@+id/speck_image"
android:layout_width="50px"
android:layout_height="50px"
android:layout_marginRight="24px"
android:src="@mipmap/voice" />
<TextView
android:id="@+id/sound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="[eeuag]"
android:textColor="#666666"
android:textSize="40px" />
</LinearLayout>
LinearLayout mSoundLayout = (LinearLayout) findViewById(R.id.sound_layout);对这里的sound_layout在代码中进行设置View.GONE可是没有作用
原因:出现在你在这个LinearLayout中设置了动画效果
解决:清除动画效果, mSoundLayout.clearAnimation();
最后
以上就是风中金针菇最近收集整理的关于Android 对LinearLayout进行设置View.GONE可是里面的子控件还是会显示的全部内容,更多相关Android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复