<! -- Set activity to transparent --> <style name = "translucent"> <item name = "android: windowBackground"> @ color/translucent </item> <item name = "android: using wistranslucent "> true </item> <item name =" android: theme "> @ android: style/Theme. noTitleBar </item> <item name = "android: windowAnimationStyle"> @ + android: style/Animation. translucent </item> </style> <! -- Set the EditText style --> <style name = "edittext_style"> <item name = "android: background"> @ drawable/edittext_bg </item> <item name = "android: textSize "> 12sp </item> <item name =" android: layout_marginLeft "> 20dip </item> <item name =" android: layout_marginRight "> 20dip </item> <item name =" android: layout_marginTop "> 10dip </item> <item name =" android: layout_height "> 35dip </item> <item name =" android: textColor "> @ color/black </Item> </style> <! -- Set the style of the switch button TextView --> <style name = "textview_btn_switch"> <item name = "android: layout_width"> 120dip </item> <item name = "android: layout_height "> wrap_content </item> <item name =" android: gravity "> center </item> <item name =" android: paddingBottom "> 5dip </item> <item name =" android: paddingLeft "> 10dip </item> <item name =" android: paddingRight "> 10dip </item> <item name =" android: paddingTop "> 8dip </item> <item name = "Android: textColor"> @ color/black </item> <item name = "android: textSize"> 15sp </item> </style> <! -- Set the Button style --> <style name = "button_btn_switch"> <item name = "android: layout_width"> 120dip </item> <item name = "android: layout_height "> 35dip </item> <item name =" android: background "> @ drawable/button_selector </item> <item name =" android: textColor "> @ color/black </item> <item name =" android: textSize "> 14sp </item> </style> <! -- Set the RadioButton style --> <style name = "radio_btn_switch"> <item name = "android: layout_width"> wrap_content </item> <item name = "android: layout_height "> wrap_content </item> <item name =" android: layout_marginLeft "> 10dip </item> <item name =" android: textColor "> @ color/black </item> <item name =" android: textSize "> 14sp </item> </style>
edittext_bg.xml:
<? Xml version = "1.0" encoding = "UTF-8"?> <Shape xmlns: android = "http://schemas.android.com/apk/res/android"> <! -- Width and color of the edge line --> <stroke android: width = "1px" android: color = "#96AAD8"/> <! -- Intermediate gradient, angle 0 from left to right, positive value is counter-clockwise, 270 degrees from top to bottom --> <gradient android: angle = "270" android: centerColor = "# E9F2FC" android: endColor = "# E9F2FC" android: startColor = "# E9F2FC"/> <! -- Set padding --> <padding android: bottom = "5dp" android: left = "5dp" android: right = "5dp" android: top = "5dp"/> </shape>
<! -- Dialog box style --> <style name = "MyDialogStyle" parent = "@ android: style/Theme. dialog "> <item name =" android: windowBackground "> @ android: color/transparent </item> <item name =" android: windowFrame "> @ null </item> <item name =" android: windowNoTitle "> true </item> <item name =" android: incluwisfloating "> true </item> <item name =" android: javaswistranslucent "> true </item> <item name =" android: windowContentOverlay "> @ null </item> <item name =" android: windowAnimationStyle "> @ android: style/Animation. dialog </item> <item name = "android: backgroundDimEnabled"> true </item> </style>