当前位置:网站首页>Picture rotation move zoom gradient
Picture rotation move zoom gradient
2022-06-25 01:05:00 【I am at odds with C】
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="yidong" android:text=" Move "/> <Button android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="suofang" android:text=" The zoom "/> <Button android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="xuanzhuang" android:text=" rotate "/> <Button android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:onClick="jianbian" android:text=" The gradient "/> </LinearLayout> <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="10dp" android:src="@drawable/ab" /> </LinearLayout> java package com.commerce.my; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; public class MainActivity extends AppCompatActivity { ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView =findViewById(R.id.imageView); } public void yidong(View view) { Animation translate= AnimationUtils.loadAnimation(this,R.anim.translate_animation); imageView.startAnimation(translate); } public void suofang(View view) { Animation scale= AnimationUtils.loadAnimation(this,R.anim.scale_animation); imageView.startAnimation(scale); } public void xuanzhuang(View view) { Animation rotate= AnimationUtils.loadAnimation(this,R.anim.rotate_animation); imageView.startAnimation(rotate); } public void jianbian(View view) { Animation alpha= AnimationUtils.loadAnimation(this,R.anim.alpha_animation); imageView.startAnimation(alpha); } } translation <?xml version="1.0" encoding="utf-8" ?><translate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="3000" android:fromXDelta="0" android:fromYDelta="0" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:toXDelta="100" android:toYDelta="300"> </translate> The zoom <?xml version="1.0" encoding="utf-8" ?><scale xmlns:android="http://schemas.android.com/apk/res/android" android:duration="3000" android:fromXScale="0.5" android:fromYScale="0.5" android:interpolator="@android:anim/accelerate_interpolator" android:pivotX="50%" android:pivotY="50%" android:toXScale="2.0" android:toYScale="2.0" > </scale> rotate <?xml version="1.0" encoding="utf-8" ?><rotate xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY="50%" android:repeatCount="1" android:repeatMode="reverse" android:duration="1000" > </rotate> The gradient <?xml version="1.0" encoding="utf-8" ?><alpha xmlns:android="http://schemas.android.com/apk/res/android" android:duration="1000" android:fromAlpha="1.0" android:repeatMode="reverse" android:repeatCount="infinite" android:interpolator="@android:anim/linear_interpolator" android:toAlpha="0.0" />
边栏推荐
- 2021-02-15
- ImageView展示网络图片
- 【无标题】
- Rich text tables, lists, pictures
- If the order has not been paid for 30 minutes, it will be automatically cancelled. How can I achieve this?
- 百公里加速仅5.92秒,威兰达高性能版以高能产品实力领跑
- 我想问一下兴业证券怎么开户?通过链接办理股票开户安全吗
- Uniapp encapsulated incentive advertisement, screen insert advertisement and banner advertisement
- Mobile security tool jarsigner
- The interview questions and answers for the high-frequency software test of Dachang help you prepare for the golden nine silver ten
猜你喜欢

Use of file class filenamefilter & filefilter in io

QT(35)-操作EXCEL-QXlsx-QAxObject

2022 simulated 100 questions of safety officer-c certificate examination and online simulated examination

How to quickly open traffic master for wechat applet

2022熔化焊接与热切割复训题库模拟考试平台操作

Tiktok wallpaper applet v1.0.2 function, new arrival function

ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’

2022安全员-C证考试模拟100题及在线模拟考试

2022R1快开门式压力容器操作考题及答案

LLVM TargetPassConfig
随机推荐
Default methods for Scala sample classes
改造一下 BeanUtils,优雅的实现 List 数据拷贝
【Redis实现秒杀业务②】超卖问题的解决方案
JS Chapter 1 Summary
Scala template method pattern
Redis + Lua implementation of distributed interface current limiting
最新QQ微信域名防红PHP程序源码+强制跳转打开
C# 闭包的垃圾回收
大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十
Punch smart spirit 1. The brand is attractive. What is the strength of the product?
Can communication experiment between C and C
Scala IO reads by lexical units and numbers
Golang示例续期锁:Redis+Channel+sync.Mutex
Text editor for QT project practice - Episode 12
2022安全员-C证考试模拟100题及在线模拟考试
丹麥技術大學首創將量子計算應用於能源系統潮流建模
Xcode preview displays a bug in the content of the list view and its solution
2021-02-15
Working principle analysis of kubernetes architecture core components
热力图展示相关矩阵