I am trying to find the color code for the bright light blue color used by the Android framework in some of their widgets. I understand that the framework uses 9 patch images to draw these widgets, so the color code would theoretically not be stored in the framework code.
But is there a way to find what was the color code used in the SeekBar or the ToggleButton(the small blue line when Checked)?
I generally use #33B5E5 for the color.
Take a screenshot of the image and upload it to this site and click the color you want to know about.
http://html-color-codes.info/colors-from-image/
In Android-Studio you can do it in the Program itself too. To do that, follow this steps:
Put the Item in your view that you wish to know the color from or have a picture or screenshot ready and open on the PC
Select an item (Button, View, etc) in the "Component-Tree" on right side and go to the "Color-Property" or the prop "Backgroud" of the selected item (one has to be in Design-Mode to see the Component-Tree).
Then click the "..." behind the Property-Edittextfield and a menu opens up where you can choose a color, by either go to the System-Tab and choose a predefined Android-System Color (you see all the different greens here for example). After select a color you see the value of it in the value window below.
You can also go to the Color-Tab and click the little color-selector item, then hover it over the Layout-item that you draged to the view in step 1 and try to hover the spot where the needed color is. You can have also a screenshot open, or the android emulator or something. The color-picker lets you hover also over outside program views, not only insde Androidstudio.
Voila, there you have all system colors.
Related
I have an FMX Android project compiled with Delphi 10.1 Berlin. The user needs to select from 19 values to run it and I use a TPopupBox component to display 19 TRadioButtons that show in 3 columns of 7+7+5 buttons for that selection.
The default is for a transparent popup window which is useless, so I edited the style to add a white TRectangle to the background of the popup window which works, but only if I size the rectangle to match the size of the popup. Aligning the rectangle to client or contents only sets an opaque background to the first row of radio buttons. I have 2 questions:
How can I auto size the rectangle rather than fixing it at design time to match what I calculate will be set for popup.bounds?
Is adding a TRectangle to the style background the best way to get an opaque control?
I have tried all obvious align options and searched the internet. Somebody suggested deleting 'background' from the style list but that did not work. Somebody else suggested editing the manifest but my manifest just gets overwritten when I compile.
I believe you wrote erroneously TPopupBox and probably meant to write TPopup. That is anyway what you should use for popup windows.
You may want to create a new project, for testing purposes. Add a button near top left. This will show and hide the popup window.
Add a TPopup and size it as you wish, and set Visible := True.
Add a rectangle inside the popup and set its Align property to Contents. Set its Fill.Color property as you wish. Add TRadiobuttons as you wish, on the rectangle.
Finally, the code to toggle the popup visibility (but see notes in Help):
Popup1.IsOpen := not Popup1.IsOpen;
Please note! There are many properties that jointly affect the placement of the TPopup: Placement, PlacementRectangle, PlacementTarget. As I don't know your needs, I leave it to you to decide what to use.
A sample test case:
Here PlacementTarget is Button1 and Placement is Bottom.
I create an Android app with FireMonkey (10.2.2), but I don't understand why I have a top and right white border. I never added that to my app.
I started to create an example app, just a black form with a black TRectangle without sides.
I don't have to code anything, just design. When I compile for Windows, it's OK. I have this border only on Android.
I get this result:
You can download the example project here : Click Here to Download
I was having the exact same problem when adding a TStyleBook, but I found a workaround. The steps are the following:
Click on the form (I've done it in the Master view, of course)
Go to the Properties tab, then open Fill > Color
Choose your desired color, you can copy it from the style you imported for the TStyleBook (In my case it was: #FF2B3840 from the backgroundstyle setting in the style)
Within Fill also change the Kind to the value Solid
Basically, this workaround is about manually overriding the inherited style from TStyleBook. I know this is not ideal because it's a hardcoded value you'll have to keep track of if you ever change styles at runtime in your app.
Source link #1: Click here.
Source link #2: Click here.
Source link #3: Click here.
The app itself works completely fine. My question is that on the launching of the app itself, the screen is the Unity default blue for a quick second or so before changing to the black of my first scene.
How do I change this color to be black on startup?
You can change this by going to File --> Build Settings --> Player Settings --> Splash Image --> Background --> Background Color.
From there you can change the background color. You can also change the image, animation type and overlay opacity from there.
Note that there are things you may not be able to change there unless you have Pro license.
EDIT:
Updated to be more detailed of where to change stuff
First change the Splash Image:
There are more options for iOS platform but this settings can still be found in the menu I mentioned above.
If iOS, select iOS as your platform and you can change your Background Color from there:
You should then change the Lunch Screen type from there. Set it to None if you want it to be gone.
If the color does not still change, you can create a Texture with a color of your choice and add it to the Mobile Splash Screen slot:
I believe the OP was looking for the Background Color of the Launch Screens as indicated in these screenshots.
This is taken from an iOS build setting panel. We've observed odd behavior with no textures at all (even though that is what we want), so we use single-pixel, solid-color images as well as a background color to match.
These fields are not made available in the PC/Android build windows, so not 100% sure what the equivalent would be - beyond using flat-colored images. Either way, it is these elements that are used prior to loading your scenes.
I think you are talking about the camera background color. You can set it up in your main camera to black. You can find the camera documentation here.
Hi I would like to know is it possible to make a memo transparent? If so, how is it done? I want the user to be able to see the text displaced as well as the background image instead of the just the white background of the memo.
I'm using Embarcadero RAD Studio XE5
Thank you
Just set the Opacity property to a value lower than 1. I haven't tested this component for Android but buttons, toolbars, images, etc. do work. I tested the TMemo for windows and that too works.
I have XE2, so editing the style may be a little different in XE5. In XE2, you can right-click the TMemo and choose "Edit Custom Style..." from the popup menu.
Find the style for the memo (not the scroll bar), then expand the style down to the background TRectangle.
Set the Fill color and the stroke color for the TRectangle to Null, then click the "Apply and Close" button, and the TMemo will now be "Transparent".
If the steps are different for editing the style in XE5, please let us know. Also, if this isn't what you're looking for, please provide an image demonstrating what you're going for.
I would like to change the default orange color that appears when someone press an Android button. I have done many searches but all I found was the use of selectors.
I understand the principle, but I don't want to modify the grey aspect of the normal button (not pressed). But using selectors force to define all characteristics of all aspects (pressed or not).
I don't know how to obtain the default aspect of buttons in the light theme, so can anyone tell me where I can find the original parameters of the light theme or at least give me another means to simply change the color of the button when clicked?
You can copy the Android's selector into your project, the one that Android sets it by default to buttons, and modify only the state when the button is pressed by just changing one single drawable.
You could find the file in \android-sdk\platforms\android-10\data\res\drawable\btn_default.xml
Sorry bro...........
i guess only selector will help you......
You must go with selector.....
and selector are reusable xmls you can use in all buttons.....:)
You can refer below link.
:)
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
I tried to find a solution to this problem, but did not succeed.
Maybe this will help:
How to modify the default button state in Android without affecting the pressed and selected states?
Standard Android Button with a different color