Homework Help Question & Answers

In Android Studio, how can I make a shape change color based on information read from...

In Android Studio, how can I make a shape change color based on information read from a database? (Java and xml code would be most helpful)

0 0
Add a comment
Answer #1

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid
android:color="#FFFF00" />
<padding android:left="8dp"
android:top="8dp"
android:right="8dp"
android:bottom="8dp" />
</shape>

<TextView
android:background="@drawable/test"
android:layout_height="50dp"
android:layout_width="110dp"
android:text="Moderate"
/>


so now you want this shape to change colors based on the information that you get back from web service call so that it may be red or yellow whatever it may be depending on the color i receivrd from web service call

Add a comment
Know the answer?
Add Answer to:
In Android Studio, how can I make a shape change color based on information read from...
Your Answer:

Post as a guest

Your Name:
What's your source?

Earn Coin

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
Free Homework App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.