textcolor

How to change UISearchBar Font Size & Color?

这一生的挚爱 提交于 2020-01-02 08:49:32
问题 I've google fews hours how to change my UISearchBar font size & color, but I cannot any documents related to it. This is what I've done so far on swift 4: searchBar = UISearchBar(frame: CGRect(x: 0, y: 0, width: view.frame.width - (menuImage.frame.width + iconImage.frame.width + 55), height: 30)) searchBar.placeholder = "SEARCH BAR" searchBar.tintColor = UIColor.gray searchBar.delegate = self searchBar.font = [UIFont fontWithName:@"Oswald" size:11]; but it gave me an error. Could you tell me

Change textcolor of UIWebView

别等时光非礼了梦想. 提交于 2020-01-02 02:24:07
问题 I am making an epub reader, into which I am loading HTML pages in my webview : [_webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:_pagesPath]]]; Now I want to change background color and and text color of my the HTML pages. I changed background color of my webview using, self._webview.backgroundColor = [UIColor blackColor]; self._webview.opaque = NO; That's working, but I also want to change the text color of my webview. How do I do this? 回答1: In this this code color:

Android: Access TextView inside Child of ExpandableListViewActivity

懵懂的女人 提交于 2019-12-25 03:32:53
问题 I am using an ExpandableList via ExpandableListViewActivity. Now, I would like to change the text colour of a certain TextView inside each ChildView. I don't want them all to be the same, rather something like "ok" in green and "error" in red etc. I did stumble across getExpandableListAdapter().getChildView(...), but I'm unsure what the last parameters (View convertView, ViewGroup parent) are supposed to be. Also I don't quite know if I need to cast the return value (View) into something?

Making a Color Toast in Android

此生再无相见时 提交于 2019-12-25 03:05:13
问题 I have seen sometimes a Blue toast showing up when i connect my Samsung phone with wifi network. Can anyone help for customising the colour of the toast. For example: 回答1: Try This:- SpannableString text = new SpannableString("Please Wait !!!!! "); text.setSpan(new ForegroundColorSpan(Color.BLUE), 0, 41, 0); Toast.makeText(c.getApplicationContext(),text , Toast.LENGTH_LONG).show(); Another Way:- Make an xml / customToast.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res

Android CheckBoxPreference title color

試著忘記壹切 提交于 2019-12-25 01:19:05
问题 I am using the code in this answer. But instead of setting the android:textColor for the Text View i use style="?background_text_color_theme" which has to set the text color depending on the theme of the application ( white text color for black theme and vice versa). This works in all other places except for CheckBoxPreference. Changes I made to the link I gave: <TextView android:id="@+android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android

How to change label color inside table cell with swift 3?

試著忘記壹切 提交于 2019-12-24 09:38:03
问题 I put label inside table cell. I changed the text color into "White" in Attributes inspector. I also changed the label background color into "Green". When I run the app, the text color does not change into white color but background changed to green. I also put the code. cell.lblName.textColor = UIColor.white I declare this @IBOutlet weak var lblAllowAutoRenew: UILabel! in MediaPackListCell.swift file. In TableView.swift , func tableView(_ tableView: UITableView, cellForRowAt indexPath:

Color of the text is not changing when style including textColor is applied to textAppearance of textView

一笑奈何 提交于 2019-12-23 18:03:21
问题 I want to reduce my xml code repetition. So I made some standard styles for text in textView. We can apply styles under 'style' attribute as well as 'android:textAppearance' attribute in textView. Below are some styles I made for text appearance- <style name="Grey"> <item name="android:textColor"> #333333 </item> </style> <style name="CodeFont" parent="@android:style/TextAppearance.Medium"> <item name="android:textColor"> #00FF00 </item> <item name="android:typeface">monospace</item> <item

how to change switch imput text color in xml?

牧云@^-^@ 提交于 2019-12-23 16:18:00
问题 My text in my switch defined in a xml file won't to change it's color stay black as the activity background. I tried with the textcolor option without any success. Any ideas? My xml file <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000"> <LinearLayout android:orientation="horizontal" android

changing title text color and size of menu android action bar

送分小仙女□ 提交于 2019-12-22 09:24:58
问题 I am developing android application and in my application I am using Sherlock action bar. I am using some menu into my action bar. <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/card_menu" android:title="C123" android:showAsAction="always"> <menu> <item android:id="@+id/C0" android:title="C0"/> <item android:id="@+id/c1" android:title="c1" /> <item android:id="@+id/c2" android:title="c2" /> </menu> </item> <item android:id="@+id/notification" android

How to set TextColor using setTextColor(ColorsStateList colors)

非 Y 不嫁゛ 提交于 2019-12-20 08:37:14
问题 I need to change text color when state change(pressed, focus)... How to set the text color of a TextView using ColorsStateList ? edit, solved: textView.setTextColor(new ColorStateList( new int [] [] { new int [] {android.R.attr.state_pressed}, new int [] {android.R.attr.state_focused}, new int [] {} }, new int [] { Color.rgb (255, 128, 192), Color.rgb (100, 200, 192), Color.White } )); solution 2 textView.setTextColor(getResources().getColorStateList(R.color.your_colors)) Change Background