customization

Styling Search View on Android (min21)

白昼怎懂夜的黑 提交于 2019-11-29 12:58:07
I'm trying to customize my search bar on Android Studio for my application. The result I'd like to achieve is the one here: My Search bar and the Quora's one I'm trying to follow G's documentation ( https://developer.android.com/guide/topics/search/search-dialog.html ) without results. Here's my code: Styles.xml <style name="CustomSearchViewStyle" parent="Widget.AppCompat.SearchView"> <item name ="voiceIcon">@drawable/ic_flag</item> <item name="searchIcon">@drawable/ic_search</item> <item name="queryBackground">@color/DarkYellow</item> <item name="android:background">@color/MainYellow</item>

Create a custom shaped windows form instead of 'default' rectangle?

拟墨画扇 提交于 2019-11-29 12:36:33
I am looking to create a custom shaped form in c#. I have a background image (png) that has is transparent in some places. Is there anyway of making the form shape to be the shape of this image instead of the 'usual' rectangle? I am only asking this as I wish to design a custom skin for my PC (a bit like rainmeter/rocketdock combined, but in a 'compressed' way). I have heard of using a 'transparency key', but this would remove a colour from the background (I will be using a colour picker in a later stage, and so if the user chose that specific colour, it would not show). As always, any help

KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer

我的未来我决定 提交于 2019-11-29 11:32:59
I want to build my own analyzer that uses both filters/tokenizers. I mean, the same field is Keyword (entire stream as a single token) and lowercase If KeywordAnalyzer use only, the value of field keeps the case-insensitive. If I use LowerCaseTokenizer or LowerCaseFilter I have to combine them with other analyzers that do the same thing KeywordAnalyzer (separated by no letter, by spaces, remove stop-words, etc.) The question is : Is there any way to make that field as Keyword (entire stream as a single token) and that lowercase using filters or analyzers Lucene or tokenizers? (google

Change ListView's text color on click

我们两清 提交于 2019-11-29 11:17:11
I have a customized ListView that each row of the list is composed by an ImageView and two TextView 's. I want to change the text's color to white when a list's item is clicked (only in the clicked item). Also, I want to change back the color to black when the item is "unclicked" (when the "press" is released). I already made the item's background color change when it was clicked with the following list_item_bg.xml : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="false" android:state_pressed="false"

python matplotlib colorbar setting tick formator/locator changes tick labels

本小妞迷上赌 提交于 2019-11-29 10:43:36
users, I want to customize the ticks on a colorbar. However, I found the following strange behavior. I try to change the tick formator to the default formator (I thought this should change nothing at all) but I end up with different labels. Does anybody know what I am doing wrong? Or is this a bug? I use matplotlib from git (v1.0.1-961-gb516ae0 , git describe). The following code produces the two plots: #http://matplotlib.sourceforge.net/examples/pylab_examples/griddata_demo.html from numpy.random import uniform, seed from matplotlib.mlab import griddata import matplotlib.pyplot as plt import

Can I use SPACE as mapleader in VIM?

偶尔善良 提交于 2019-11-29 10:30:41
问题 From http://items.sjbach.com/319/configuring-vim-right I got that you were supposed to be able to use Space as the mapleader in vim. I've tried but it does not seem to work. Anyone who have made it work? Tried: let mapleader = <space> 回答1: Try the following instead: let mapleader=" " 回答2: Mapleader is a Vim string variable. To use space as leader, you must escape the special character. let mapleader = "\<Space>" For more info see, http://vimdoc.sourceforge.net/htmldoc/eval.html#expr-quote

Actionbar spinner customisation

半城伤御伤魂 提交于 2019-11-29 09:24:39
问题 I am trying to customise the android actionbar spinner to something that like the google currents application. Basically, only the 'subtitle' should reflect what i choose from the spinner while the 'title' remains the same. I understand that a custom spinner needs to be created and I have to override the getView() and getDropDownView() method. But I am very confused here on how to override these methods properly. Can some please nudge me in the right direction. I hope I made my question clear

Print an error message without printing a traceback and close the program when a condition is not met

若如初见. 提交于 2019-11-29 09:21:17
I've seen similar questions to this one but none of them really address the trackback. If I have a class like so class Stop_if_no_then(): def __init__(self, value one, operator, value_two, then, line_or_label, line_number): self._firstvalue = value_one self._secondvalue = value_two self._operator = operator self._gohere = line_or_label self._then = then self._line_number = line_number def execute(self, OtherClass): "code comparing the first two values and making changes etc" What I want my execute method to be able to do is if self._then is not equal to the string "THEN" (in allcaps) then I

Creating a custom checkbox with CSS & Bootstrap

牧云@^-^@ 提交于 2019-11-29 07:10:03
问题 I have the following mark-up using the bootstrap framework. <div class="col-md-4"> <div class="custom-container"> <img class="center-block img-responsive img-circle invite-contact-trybe" src="{$img}" alt="Contact Image"> <input class="invite-contact-checkbox" type="checkbox"> </div> </div> I would like to achieve the following: Is there anyway to do this using CSS? I would obviously need 3 states: Initial: .custom-container input[type=checkbox]{} Some form of hover state: .custom-container

Twitter Bootstrap Custom CSS inclusion

我是研究僧i 提交于 2019-11-29 04:17:21
问题 When using custom css along with Twitter Bootstrap that overwrites some styles is it better to place the custom css link before or after the bootstrap-responsive css? <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap-responsive.min.css"> <!-- Your custom css --> <link rel="stylesheet" href="css/style.css"> or <link rel="stylesheet" href="css/bootstrap.min.css"> <!-- Your custom css --> <link rel="stylesheet" href="css/style.css"> <link rel=