Android Question B4A Bridge - component colors don't match

D_Child123

Member
Licensed User
Longtime User
Hi,

I installed the bridge, and the Android components last night. Very confusing; the Android SDK installation involves a list of android images that I don't understand. I picked just one of them, at random, in order to connect to the device.

I can't get the USB debugging connection working, so I'm using the B4A Bridge Wireless connection.

Everything's connected, and when you move objects in the Designer, you can see them moving on the Nexus 7 tablet.

The problem is, when I change colors, they don't reflect in either the designer or the tablet.

For example, the color for the Activity was grey. I changed it to yellow, but it's still grey on the Designer. However, it's yellow on the tablet, as it should be.

For the components, the situation is worse. So e.g., if I change a label color, it doesn't change at all, in the tablet; in fact, you can barely see the labels or the edit boxes. In the Designer, you can see the components, but the colors don't change.

An exception to this, are the text colors. The text colors on both the tablet, and the designer, seem to reflect the properties reasonably well.

In the case of the buttons, there doesn't seem to be any color properties, other than the Text Color. So I can't even try to change the button colors.
 

klaus

Expert
Licensed User
Longtime User
In the case of the buttons, there doesn't seem to be any color properties, other than the Text Color. So I can't even try to change the button colors.
Backgrounds for Views are Drawables.
There exist different drawable types:
ColorDrawable
GradientDrawable
BitmapDrawable
And then you have StateDrawable which allows to set different Drawables for different states of the View.
This is used for Buttons.


You may have a look at chapter 11.1 View Drawables in the B4A User's Guide.
 

Attachments

  • upload_2015-12-31_11-52-51.png
    5.7 KB · Views: 113
Upvote 0

D_Child123

Member
Licensed User
Longtime User
The abstract designer only shows an "abstract" view of the layout. You need to connect to the device (press on F2) to start the WYSIWYG designer.

Understood about the abstract layout, thanks.

But I am connected, through Wysiwig Designer/Connect. It shows up on the tablet, when a change is made. But it doesn't seem to be reflecting the colors specified on the Designer.

Also, I don't see the wysiwig version on the PC. There's the abstract version that you're talking about. And it's being reflected on the tablet, at the same time. But there's no image of the tablet, on the PC.

What am I missing?
 
Last edited:
Upvote 0

D_Child123

Member
Licensed User
Longtime User

Klaus, I'll just run through the tutorials, to understand the designer and components colors better. The only help I need right now is, in making the wysiwig work as expected.
 
Upvote 0

D_Child123

Member
Licensed User
Longtime User
Note that this is still unresolved. I'm working through some of the tutorials, but am not able to see the wysiwyg version of the tablet.

It's clearly connected, the bridge is clearly on, because I can see some of the changes on the tablet, when components are moved around or text is changed. But I see only the Abstract version of the tablet, on the PC (Windows 8.1).
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
There is no WYSIWYG Viewer on the PC.
The WYSIWYG Viewer is on your device.
If your device is connected with the IDE you see the Abstract Deigner on the device.
To see it in WYSIWYG, you need to click on Connect in the WYSIWYG Designer menu.

 
Upvote 0

D_Child123

Member
Licensed User
Longtime User
Klaus,

So you're saying that I see the Wysiwig only on the tablet, not in a separate window on the PC?

Ok. Then I already have everything set.

The only thing to resolve are the colors not matching, and I'll just have to learn that, through the tutorials.

Ok, thanks chief.

Thanks, Erel.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…