如何在Android中调整按钮填充

时间:2018-06-05 15:18:58

标签: nativescript nativescript-angular

我正在尝试使用Android中的按钮填充,但似乎我在styles.xml文件中缺少一些代码,我想删除所有按钮的填充并能够使用CSS来玩它。

这就是styles.xml的样子:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- theme to use FOR launch screen-->
    <style name="LaunchScreenThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>

        <item name="colorPrimary">@color/ns_primary</item>
        <item name="colorPrimaryDark">@color/ns_primaryDark</item>
        <item name="colorAccent">@color/ns_accent</item>

        <item name="android:windowBackground">@drawable/splash_screen</item>

        <item name="android:windowActionBarOverlay">true</item>  
        <item name="android:windowTranslucentStatus">true</item>
    </style>

    <style name="LaunchScreenTheme" parent="LaunchScreenThemeBase">
    </style>

    <!-- theme to use AFTER launch screen is loaded-->
    <style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>

        <item name="colorPrimary">@color/ns_primary</item>
        <item name="colorPrimaryDark">@color/ns_primaryDark</item>
        <item name="colorAccent">@color/ns_accent</item>
    </style>

    <style name="AppTheme" parent="AppThemeBase">
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </style>

    <!-- theme for actioon-bar -->
    <style name="NativeScriptToolbarStyleBase" parent="Widget.AppCompat.Toolbar">
        <item name="android:background">@color/ns_primary</item>
        <item name="theme">@style/ThemeOverlay.AppCompat.ActionBar</item>
        <item name="popupTheme">@style/ThemeOverlay.AppCompat</item>
    </style>

    <style name="NativeScriptToolbarStyle" parent="NativeScriptToolbarStyleBase">
    </style>
</resources>

请帮忙吗?谢谢!

0 个答案:

没有答案