安卓:是用来做什么android.R.id.content? [英] Android: What is android.R.id.content used for?

查看:746
本文介绍了安卓:是用来做什么android.R.id.content?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以解释android.R.id.content?

Anybody could explain the meaning of "android.R.id.content" ?

它是如何被使用的?

http://developer.android.com 没有任何解释。

公共静态最终诠释内容 自:API级别1

public static final int content Since: API Level 1

常量值:16908290(0x01020002)

Constant Value: 16908290 (0x01020002)

推荐答案

转换菲利普Reichart的评论到一个答案:

Converting Philipp Reichart's comment into an answer:

android.R.id.content为您提供了一个视图的根元素,而不必知道它的实际名称/类型/ ID。请了解一下当前的活动获得root视图

android.R.id.content gives you the root element of a view, without having to know its actual name/type/ID. Check out Get root view from current activity

这篇关于安卓:是用来做什么android.R.id.content?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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