【发布时间】:2017-07-04 23:05:40
【问题描述】:
我在 XML 中的很多工作都有很多颜色可供选择,我似乎找不到可以从我自己选择的图像源中选择一种颜色并将其应用到我的代码中的 Android Studio 扩展程序或插件.我目前正在使用 Photoshop,但不幸的是,它降低了我的计算机速度。
我一直在使用原生颜色,而不是我自己的颜色。例如:
<< ? xml version = "1.0"
encoding = "utf-8" ? >
<
RelativeLayout xmlns : android = "http://schemas.android.com/apk/res/android"
xmlns: tools = "http://schemas.android.com/tools"
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: background = "@color/color_bg"
tools: context = "com.transcendencetech.juliospizzaprototype.SignInActivity" >
<
include
android: id = "@+id/header"
layout = "@layout/header"
android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_alignParentTop = "true"
android: layout_alignParentLeft = "true"
android: layout_alignParentStart = "true" / >
<
RelativeLayout
android: id = "@+id/my_tabs"
android: layout_width = "match_parent"
android: layout_height = "40dp"
android: layout_below = "@id/header"
android: background = "@android:color/black" >
<
View
android: id = "@+id/divider_view"
android: layout_width = "1dp"
android: layout_height = "match_parent"
android: layout_centerInParent = "true"
android: layout_margin = "2dp"
android: background = "@android:color/white" / >
<
Button
android: id = "@+id/pizza_list_bt"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_alignParentLeft = "true"
android: layout_alignParentStart = "true"
android: layout_toLeftOf = "@id/divider_view"
android: layout_toStartOf = "@id/divider_view"
android: background = "@android:color/black"
android: inputType = "textPersonName"
android: text = "List of Pizzas"
android: textColor = "@android:color/white" / >
<
Button
android: id = "@+id/deals_list_bt"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_alignParentEnd = "true"
android: layout_alignParentRight = "true"
android: layout_toEndOf = "@id/divider_view"
android: layout_toRightOf = "@id/divider_view"
android: background = "@android:color/black"
android: inputType = "text"
android: text = "List of Deals"
android: textColor = "@android:color/white" / >
<
/RelativeLayout>
<
ImageView
android: id = "@+id/pizza_list_iv"
android: layout_width = "match_parent"
android: layout_height = "150dp"
android: layout_below = "@id/my_tabs"
android: scaleType = "fitXY"
android: src = "@drawable/list_pizza_header" / >
<
ListView
android: id = "@+id/list_view"
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: layout_below = "@id/pizza_list_iv"
android: divider = "@color/color_divider"
android: focusable = "true"
android: dividerHeight = "2dp"
android: layout_margin = "15dp" / >
<
include
layout = "@layout/footer"
android: layout_width = "match_parent"
android: layout_height = "wrap_content"
android: layout_alignParentBottom = "true"
android: layout_alignParentLeft = "true"
android: layout_alignParentStart = "true" / >
<
/RelativeLayout>
【问题讨论】:
标签: android android-studio android-xml