Load Activity and/or Application Logo Programmatically from Manifest

前端 未结 4 1806
南旧
南旧 2021-01-04 04:27

I am trying to load the logo associated with the current activity and/or its parent application from the definition in the manifest. This technique has already worked succes

4条回答
  •  日久生厌
    2021-01-04 05:04

    If you take a look at the code in android.app.ContextImpl.ApplicationPackageManager (here), you will find that eventually it uses the method

    public Drawable getDrawable(String packageName,int resid,ApplicationInfo appInfo)
    

    (lines 2131 to 2173 in 2.3).

    There are several Log.w calls there that you can use to follow what is going on through adb (i.e., Failure retrieving resources for...)

提交回复
热议问题