我知道我们可以将Activity的主题更改为:
startActivityForResult( AuthUI.getInstance(this).createSignInIntentBuilder() // ... .settheme(R.style.AppthemeWithActionbar) .build());
但无论如何我们可以改变被叫活动的布局吗?
解决方法 有很多方法可以改变布局,它们为那些样式提供了覆盖.所以添加这样的样式,例如:<style name="AppthemeWithActionbar" parent="firebaseui"> <item name="androID:windowBackground">@drawable/firebaseui_bg_image</item> <item name="windowActionbar">true</item> <item name="windowNoTitle">true</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="colorbuttonnormal">@color/colorAccent</item> <item name="colorControlnormal">@color/white</item> <item name="colorControlActivated">@color/white</item> <item name="colorControlHighlight">@color/white</item> <item name="androID:textcolorTertiary">@color/white</item> </style> <style name="firebaseui.Text"> <item name="androID:layout_wIDth">match_parent</item> <item name="androID:layout_height">wrap_content</item> <item name="androID:textcolor">@androID:color/white</item> </style> <style name="firebaseui.CountrySpinner"> <item name="androID:layout_wIDth">wrap_content</item> <item name="androID:layout_height">wrap_content</item> <item name="androID:textcolor">@color/white</item> </style> <style name="firebaseui.TextinputEditText.EmailFIEld"> <item name="androID:inputType">textEmailAddress</item> <item name="androID:textcolor">@color/white</item> </style> <style name="firebaseui.TextinputEditText"> <item name="androID:textSize">18sp</item> <item name="androID:layout_wIDth">match_parent</item> <item name="androID:layout_height">wrap_content</item> </style> <style name="firebaseui.TextinputEditText.PhoneFIEld"> <item name="androID:layout_wIDth">match_parent</item> <item name="androID:layout_height">wrap_content</item> <item name="androID:textcolor">@color/white</item> </style>
运行程序,看到布局已更改.同样在androID studio中点击firebaseui,同时按住命令键或alt键可能在windows中(不确定),你可以看到所有的覆盖.
总结以上是内存溢出为你收集整理的android – 在FirebaseUI中更改startActivityForResult的布局全部内容,希望文章能够帮你解决android – 在FirebaseUI中更改startActivityForResult的布局所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)