当前位置:网站首页>Layout of code setting constraintlayout_ constraintDimensionRatio
Layout of code setting constraintlayout_ constraintDimensionRatio
2022-06-11 07:56:00 【tinyvampirepudge】
Set... In the code layout_constraintDimensionRatio:
ConstraintSet constraintSet = new ConstraintSet();
constraintSet.clone(mRlContent);
constraintSet.setDimensionRatio(R.id.iv,"h,9:16");
constraintSet.applyTo(mRlContent);
Corresponding layout :
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@null"
app:layout_constraintTop_toTopOf="parent"
tools:background="@drawable/ic_launcher" />
...
</androidx.constraintlayout.widget.ConstraintLayout>
Reference resources :
https://www.jianshu.com/p/16e34f919e1a
边栏推荐
- Alchemy experience (model training of deep learning) the necessity of timely adjusting training parameters for some situations (the adjustment of learning rate LR is the primary) summarizes some metho
- 自定义ViewGroup的知识点总结-持续更新
- How to output the percent sign "%" in printf function in C language
- 【 史上最全的ENSP【安装图解】!】
- Sort - select sort
- Image processing operation record
- Tidb cloud launched Google cloud marketplace, empowering global developers with a new stack of real-time HTAP databases
- multi-sig SC
- Label the mask image not obtained through labelme
- 使用特殊字符拼接字符串“+“
猜你喜欢

The solution of "no startup device" after running Bochs

如何做好空状态设计?来看这份全面总结

Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version

Getting started with bladed tutorial (video)

TiDB Cloud 上线 Google Cloud Marketplace,以全新一栈式实时 HTAP 数据库赋能全球开发者

C- print 99 multiplication table
![[codeforces1019e] raining season](/img/8e/4a96954ee7dae5f81eaae05b5a075b.png)
[codeforces1019e] raining season

Scrape captures 51job Recruitment Information (static page)

图数据库无缝集成Tushare接口

2022.6.7 special student simulation
随机推荐
学习《缠解论语》
How to output the percent sign "%" in printf function in C language
Closure and minimum dependency in database
TypeScript-枚举
放大镜子效果图
TypeScripy-类的基本使用
A detailed explanation of one of the causes of dead loop caused by array out of bounds in C language
Understanding of Poisson distribution and Poisson process and Erlang distribution and their relations (important theories in queuing theory and operational research)
Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version
Using Tkinter to realize guessing numbers game
C language - Growth Diary -01- count primes and sum
Return in foreach and break in for
[software testing] 90% of the interviewers have been brushed out of such resumes
Summary of evaluation index knowledge points in target detection: summary of IOU cross overlap unit and map/ap/tp/fp/np
E regression test of this featured app
Label the mask image not obtained through labelme
C language to achieve a simple game - minesweeping
远程办公经验 | 社区征文
134. 加油站
Tutoriel de démarrage bladed (vidéo)