在我的一项活动中,我的 EditText 视图曾经看起来像这样
但现在它们看起来像这样
我需要帮助把它改回来:从矩形到下划线。
背景
因为我需要创建一个自定义 ActionBar,所以我必须更改相关活动的主题YesterdayActivity
,使用以下内容
风格:
<style name="CustomWindowTitleBackground">
<item name="android:background">#323331</item>
</style>
<style name="CustomTheme" parent="android:Theme">
<item name="android:windowTitleSize">40dip</item>
<item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
</style>
显现:
<activity
android:name="com.example.YesterdayActivity"
android:theme="@style/CustomTheme">
</activity>
创建:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_yesterday);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.yesterday_title_bar);
…
}