是否有可能在AndroidManifest.xml中标记的自定义属性

2025-03-11 14:01:23
推荐回答(1个)
回答(1):

Yes. Here's an example. The custom tag is ContentVersion.
android:icon="@drawable/icon"
android:label="@string/app_name">



android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:screenOrientation="sensor"
android:label="@string/app_name">

To access it:
ApplicationInfo ai = _context.getPackageManager().getApplicationInfo(_context.getPackageName(),PackageManager.GET_META_DATA);
ai.metaData.get("ContentVersion")