from the tools palette I inserted the android native button widget, how can I change the background color?
in the propety inspector it is possible to change only the color of the text.
thank you
The LiveCode forum is a great place to get your questions answered. That said, if you need to change the background color of a button, you may need to reproduce an Android looking button by using a regular LC push button. Think UI design from scratch. It isn't really that difficult to emulate a Material Design button.
There is an interesting LC forum discussion with some varied techniques for Android Buttons here:
Styling Android Buttons in LiveCode
Related
In Android Studio, we have color picker when developing in Java/Kotlin (natively) like this.
But while developing for Flutter, I can't see any options to pick my own color. Is there some plugin required to do that?
The color picker is not clickable in Android Studio running Flutter( Dart code), see picture below. But i found a work around using the Color class and manually opening color picker. Then pick a color and copy/paste it like this:
Here is how i do it:
1. Double tap shift to run search
2. Type Color or Picker
3. Open Color Picker from the search list
4. Copy/paste the HEX color code into your color class.
Expert tip:
Add color picker to a keyboard shortcut. You can find the settings for Keymap, under File > Settings > Keymap
You must have heard of the materials.io website from google, which provides many materials like designs, icons, tools, resources and components for easy developing. Now Color Tool is also available. You must add the website to your browsers shortcut if you are a developer. Here's the link for chosing color : https://www.material.io/resources/color/#!/?view.left=0&view.right=0&primary.color=E91E63
Another way I found is :
Type 'Colors.' and press control+space to see the available colors.
Select the color using arrow or mouse.
Press control+Q for the quick documentation.
And on the documentation windows, click on the edit button which opens the
'colors.dart' file.
Here all the colors with all shades are available. These shortcuts are for windows.
Once you open the file, you can always come back here to chose the next shade. But will not be the comfortable method like android project.
Hope a easier way to do this will come with the later update.
The background around the Layout Editor in Android Studio is dark grey. I think it used to be white. Anyway, I would like to make it white again, but I can't find the setting. The reason I want to change it is so that I can make nicer looking print screen images to use on StackOverflow or app descriptions.
Note: I'm not talking about changing the theme or the code editor colors. These questions have already been answered here:
How to change or add theme to Android Studio?
How do I change Android Studio editor's background color?
how to change Android Studio terminal background color
Updated Answer
Android Studio 3.0 has a Screenshot menu item. Right click the design area and choose Save Screenshot.
From there you can make a screenshot with a transparent background.
How do I place two icons on a WPF button, one in the middle (static icon) and one on the top left (based on a condition)? Also need to Flash the same WPF Button based on a condition?
(While flasing it switches between two background colors, the icons remains same).
Not sure if anyone will want to help you develop super annoying flashing advertising ad style buttons :)
But to point you in the right direction the answer is in learning how to override default control template for the button then for flashing - work on Animation. Once you try that and encounter problems, then post your code and someone will help.
P.S. 'Adam Nathan's WPF Unleashed' is a good start. Good luck!
I'm having a bit of trouble with custom action buttons in the honeycomb+ action bar. I'm adding a menu item that uses a custom layout (using the android:actionLayout attribute). The reason for the custom layout is that I want a button that has two lines of text that can be updated dynamically.
However, I still want this action button to operate like the other standard buttons. By this I mean that the background fades in when the button is selected, and fades out again if it is unselected, all in the style of the platform (the colour seems to differ between different platforms/devices - I've seen both grey and blue versions)
I've tried using the action button style for the custom layout:
style="#android:style/Widget.ActionButton"
and I've tried setting the background for the custom layout to:
android:background="?android:attr/actionBarItemBackground"
but to no avail, and I'm kind of trying things fairly randomly as I can't find any documentation on how to do this (or if indeed it is even possible).
I know I can approximate this behaviour myself by setting the background, but it would be nice if I could just set the item to behave like a normal action button in terms of how it appears when the user interacts with it.
Anyone have any ideas?
Thanks in advance!
Ah, sorry to answer my own question but I have just stumbled upon a way to do this. I was halfway there - you need your custom layout's style to inherit from ActionButton:
#android:style/Widget.ActionButton
but then you also need to make the layout clickable:
android:clickable="true"
for it to work. Using both of these makes the custom action buttons look just like the regular ones when you press them.
Hopefully that'll help someone trying to do this!
i want be able to select any color i want, just like the attached pic.
yes i want to learn this c++ or mfc . I find it more powerfull . Could u explain to me exactly how to add it to my project. I also want the color iteslf and it code appers in picture box and textbox.
Thanks
Use CColorDialog class in mfc is used to pick the color from mfc
// Get the selected color from the CColorDialog.
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
COLORREF color = dlg.GetColor();
}
This sample will popup dialog to select the color and after selecting the color and click ok button then color variable will contain the selected color.
Use this color in your application.
EDIT
You can customize your combo box or list box to add the color pick tool.
Refer this link : CodeProjectSample
CMFCColorDialog is what you seem to be looking for. To make it act like a drop-down, you'll need to position it below the down-arrow button (e.g., using MoveWindow).
Since you don't seem to have the MFC Feature Pack, check the Ultimate Toolbox at http://www.codeproject.com/KB/MFC/UltimateToolbox.aspx. Its Graphical User Interface classes have a Color Picker.
For Visual Studio versions prior 2008, you can use BCGSoft's color pikcer (http://www.bcgsoft.com). MFC color dialog is based on this one.
I had a similar problem with CMFCColorButton. I added the graphic resource with the ToolBox on my dialog design, but I could't assign a control variable because it did not recognize CMFCColorButton.
The answer was to include afxcolorbutton.h in the header of stdafx.h. Maybe you can fix it in the same way.
I hope this helps