关于manifest占位符

作者: Ad大成 | 来源:发表于2022-04-22 11:48 被阅读0次

占位符 可以帮助我们设置一些不同项目中 不同属性的值
比如最近遇到有的项目中需要取消多屏模式 有的项目需要多屏模式
那么我们可以这么设置

  <activity
            android:name=".MainActivity"
            android:alwaysRetainTaskState="true"
            android:excludeFromRecents="true"
            android:exported="true"
            android:launchMode="singleTop"
            android:resizeableActivity="${resizeable}"
            android:screenOrientation="landscape"
            android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

在gradle中 
  productFlavors {

         s202h {
             dimension "program"
             buildConfigField("String", "CHANNEL_ID", "\"000302\"")
             buildConfigField("String", "APP_ID","\"\"")
             manifestPlaceholders.put("resizeable","true")
         }
         s302ica {
             dimension "program"
             buildConfigField("String", "CHANNEL_ID", "\"000302\"")
             buildConfigField("String", "APP_ID","\"c7d8cc46cf755998719d0c353297c4cfe803ccf5\"")
             buildConfigField("String", "APP_ID_USER","\"c7d8cc46cf755998719d0c353297c4cfe803ccf5\"")
             manifestPlaceholders.put("resizeable","false")
         }
}

相关文章

  • 关于manifest占位符

    占位符 可以帮助我们设置一些不同项目中 不同属性的值比如最近遇到有的项目中需要取消多屏模式 有的项目需要多屏模式那...

  • 莹莹

    占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符...

  • 莹莹

    占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符...

  • 第五节: 格式化输出

    关于占位符有:

  • 及时止损哪有那么容易

    占位符占位符占位符占位符占位符占位符占位符占位符占位符占位符 晚上清理微博时,发现了我以前发的微博 心情如同标题 ...

  • golang fmt

    占位符 普通占位符 布尔占位符 整数占位符 指针 其它标记

  • 占位符

    占位符占位符

  • 插槽slot

    插槽,占位符slot具名插槽,指定占位符slot、name作用域插槽,子组件占位符向父组件占位符通信。slot、s...

  • 语言元素及列表学习

    语言元素 占位符 %d是整数的占位符,%f是小数的占位符,%%表示百分号(因为百分号代表了占位符,所以带占位符的字...

  • 随笔

    1.占位符% %s表示占位符类型是str字符串类型%d表示占位符类型是digital数字类型使用占位符的时候,还需...

网友评论

    本文标题:关于manifest占位符

    本文链接:https://www.haomeiwen.com/subject/betnertx.html