Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- SPC
- MSSQL
- vaadin
- 공정능력
- xPlatform
- IntelliJ
- NPM
- tomcat
- hadoop
- es6
- Python
- Android
- 보조정렬
- mybatis
- Express
- R
- table
- mapreduce
- SQL
- Kotlin
- Java
- plugin
- Spring
- JavaScript
- react
- SSL
- GIT
- Eclipse
- window
- Sqoop
Archives
- Today
- Total
DBILITY
WindowMetrics 화면 크기 등 본문
반응형
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
WindowMetrics windowMetrics = getWindowManager().getCurrentWindowMetrics();
Log.e(TAG, windowMetrics.getBounds().width() + " : " + windowMetrics.getBounds().height());
} else {
Display display = getWindowManager().getDefaultDisplay();
DisplayMetrics displayMetrics = new DisplayMetrics();
display.getRealMetrics(displayMetrics);
Log.e(TAG, displayMetrics.widthPixels + " : " + displayMetrics.heightPixels);
}
반응형
'android > java' 카테고리의 다른 글
android downloded apk file version check and install (0) | 2024.05.09 |
---|---|
android loading indicator example (0) | 2024.05.08 |
android shortcut (0) | 2024.05.02 |
android.nonFinalResIds=false (0) | 2024.04.17 |
Didn't find class "androidx.core.app.CoreComponentFactory" (0) | 2024.04.16 |
Comments