android:layout_width=“match_parent”
android:layout_height=“match_parent”
tools:context=“.MainActivity”>
<ImageView
android:id=“@+id/image1”
android:src=“@drawable/bac1”
android:layout_width=“match_parent”
android:layout_height=“match_parent”/>
<ImageView
android:id=“@+id/image2”
android:src=“@drawable/bac2”
android:layout_width=“match_parent”
android:layout_height=“match_parent”/>
3.修改MainActivity。
public class MainActivity extends Activity {
ImageView image1;
ImageView image2;
FrameLayout frameLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
image1 = findViewById(R.id.image1);
image2 = findViewById(R.id.image2);
frameLayout = findViewById(R.id.frameLayout);
showA();
final ScaleAnimation scale1 = new ScaleAnimation(1, 0, 1, 1, Animation.RELATIVE_TO_PARENT, 0.5f, Animation.RELATIVE_TO_PARENT, 0.5f);
final ScaleAnimation scale2 = new ScaleAnimation(0, 1, 1, 1, Animation.RELATIVE_TO_PARENT, 0.5f, Animation.RELATIVE_TO_PARENT, 0.5f);
scale1.setDuration(1000);
scale2.setDuration(1000);
scale1.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
if (image1.getVisibility() == View.VISIBLE) {
image1.setAnimation(null);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级安卓工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Android移动开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Android)
最后
考虑到文章的篇幅问题,我把这些问题和答案以及我多年面试所遇到的问题和一些面试资料做成了PDF文档,如果有需要的朋友可以私信我【面试】免费领取
试资料汇总](https://bbs.csdn.net/topics/618156601)**
[外链图片转存中…(img-OoeeJ7j0-1710853052865)]
[外链图片转存中…(img-95TUaUtw-1710853052865)]
喜欢的朋友可以关注、转发、点赞 感谢!