尺寸级Android上的Java [英] Class Dimension for java on android

查看:117
本文介绍了尺寸级Android上的Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是类的等价形式 java.awt.Dimension中的为Android?

What is the equivalent form of class java.awt.Dimension for android?

推荐答案

您可以使用的 对<整数,整数GT; 这是Android通用的元组类。 (您将需要更换的getWidth()的getHeight()第一第二,虽然。)在Android API的Andr​​oid团队似乎使用即席类用于此目的,例如的 Camera.Size

You could use Pair<Integer, Integer> which is Android's generic tuple class. (You would need to replace getWidth() and getHeight() with first and second, though.) In other places of the Android API the Android team seems to use ad-hoc classes for this purpose, for instance Camera.Size.

这篇关于尺寸级Android上的Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆