ApplicationFramework层

ActivityManager

PackageManager

WindowManager

TelphonyManager

ContentProvider

ResourceManager

ViewSystem

LocationManager

NotificationManager

XMPPService


获取LinearLayout的长宽

View view = getLayoutInflater().inflate(R.layout.main, null);

LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.linearLayout);

linearLayout.measure(0, 0);

int width = linearLayout.getMeasuredWidth();

int height = linearLayout.getMeasuredHeight();


获取按钮在屏幕上的坐标

View view = findViewById(R.id.button1);

int[] locations = new int[2];

view.getLocationOnScreen(locations);

int x = locations[0];

int y = locations[1];

更多相关文章

  1. Android判断网络是否连接
  2. android Button的应用
  3. iOS的Alerts与Android的Dialogs
  4. 给Android标题栏加上返回按钮
  5. android编译时报错
  6. cocos2d-x获取设备信息
  7. android请求权限
  8. Android第十五天 ContentProvider之ContentResover
  9. Android--fragment从activity中获取数据

随机推荐

  1. 我的Android进阶之旅------>Android视频
  2. Tip of the Day(Android(安卓)Studio)
  3. android listview 设置点击效果selector
  4. Activity com.avcit.conference.MainActi
  5. Android(安卓)自定义progressDialog
  6. android获取应用名称,判断应用是否安装
  7. Android改变Spinner弹出框的位置
  8. RelativeLayout用到的一些重要的属性
  9. Banner
  10. ubuntu android交叉编译c程序 ndk