custom-controls

Setting multiple custom elements to MultiAutoCompleteTextView : Android

元气小坏坏 提交于 2019-11-29 00:07:39
Continuing from my previous post, I was able to set multiple elements to the MultiAutoCompleteTextView but I was not able to wrap those items with custom background and close button as in that link picture. I was able to do the same with single element but for multiple, ran out of luck. This is what I tried. // set text to MultiAutoCompleteTextView private void setTextSample(String contactName) { final SpannableStringBuilder sb = new SpannableStringBuilder(); TextView tv = (TextView) LayoutInflater.from(this).inflate(R.layout.textview, null); tv.setText(contactName); BitmapDrawable bd =

What are the differences between User Controls, Server Controls & Custom Controls?

强颜欢笑 提交于 2019-11-28 23:23:18
I thought I had reasonable answers for this question at a recent interview, but I bombed it. :( What are the major differences between the three? If not obvious by the answer to the previous bullet, when would you choose one over the other? User Controls are controls built with a designer within a web project. They typically are only private to a web application (Although there are ways you can make them available to other projects). Server Controls are controls that are also known as Web Controls. These are reusable controls that render their html without the aid of a designer, they are

Controlling Soundcloud HTML5 Widget Player with custom buttons

谁说胖子不能爱 提交于 2019-11-28 22:35:05
问题 I wanted to do something similar to what I saw on SoundClouds HTML5 Widget API PLayground page where they have external buttons that control the player : http://w.soundcloud.com/player/api_playground.html Eventually I'll be hiding the player widget itself and using those buttons as the music controller. Any suggestions or tips would be awesome, I posted it here: http://jsfiddle.net/alexsethalex/qcKed/1/ 回答1: Have you checked out the Widget API documentation? Here's a super simple example: <

Having custom controls still apply when go fullscreen on a HTML5 video?

本小妞迷上赌 提交于 2019-11-28 21:44:20
I've made custom controls for my HTML5 video but I don't know how to have that CSS still apply when I go fullscreen. Here's the [website] I've based my controls on. On this site, you'll notice that when you click the fullscreen button the custom controls get lost and the video reverts to the default <video> controls. Does anyone know how to have these custom controls styling/CSS still apply when you go fullscreen? i answered my own question, the key is that the custom controls are inside the <div> that includes the video that you want to take full screen. In my code below, this <div> is called

WPF Best Practices: Do custom controls work well with the MVVM design?

时光毁灭记忆、已成空白 提交于 2019-11-28 19:35:28
I was looking at creating a common control that I will be able to reuse on my pages: an AddressControl which has Address1, Address2, City, State, Zip, etc... Originally I just created a class ( AddressEntity ) that contained all these items and implemented INotifyPropertyChanged . I included that class as a DependencyProperty in my Code-Behind for the AddressControl and used it as the DataContext for the bindings to its properties. Then, someone said my code was ugly and I should look into MVVM. Looking at it, I assume that: AddressEntity.cs will just be a container of data (i.e. Address1,

IE & Firefox - custom drop down could not remove native arrows

不羁的心 提交于 2019-11-28 18:14:06
I'm trying create a custom drop down control and I need to hide the arrows from the native controls. I'm using the following CSS , which is working for Chrome and Safari, but not in Mozilla and IE. select.desktopDropDown { appearance: none; -moz-appearance:none; /* Firefox */ -webkit-appearance:none; /* Safari and Chrome */ } Here is a [jsfiddle][1]. Ahmed Na. Use this it will work but with IE10+ and for FF : Your css should look like this: select.desktopDropDown::-ms-expand { display: none; } More about ::ms-expand . Then for the rest : select.desktopDropDown { outline : none; overflow :

Radial menu android with button click? [closed]

两盒软妹~` 提交于 2019-11-28 16:34:10
I want to design menu like this. I have tried animation but it does not retains position of buttons. if any one have done this type of menu please guide me. Any help will be appreciated. I recently created this circular menu to add up in my recent project. It looks like What you need is to create a new View and draw this view, check for the user inputs (where he is touching), design a feedback mechanism, for example, in my view, if user touches any of the 5 arcs, background color changes to skyblue. Here is my code for onDrawMethod. protected void onDraw(Canvas canvas) { // TODO Auto-generated

How to set a custom view's intrinsic content size in Swift?

社会主义新天地 提交于 2019-11-28 16:05:38
Background I am making a vertical label to use with traditional Mongolian script. Before I was just rotating a UILabel but there were some performance issues and other complications with this. Now I am working on making a label from scratch. However, I need the vertical label to tell auto layout when its height adjusts (based on string length). What I have read I read the Intrinsic Content Size and Views with Intrinsic Content Size documentation. These were more about how to use it, though, and not how to define it in a custom view. Searching for "ios intrinsic content size for a custom view"

Custom Composite Control not rendering correctly for only 0.5-1 sec after being added back into a VGROUP

天涯浪子 提交于 2019-11-28 14:44:34
I am moving away from MXML and have built a custom component control within ActionScript . I have the control displaying correctly. The problem comes after I remove it from the display list and add it back in again with the .addElement(control) method. Here is the code that adds it back in again. private function displayParameters(parameters:ArrayCollection):void{ for(var index:int = 0; index<parameters.length; index++){ if(parameters[index] is ReportControl){ var control:ReportControl = parameters[index] as ReportControl; control.percentWidth = 100; vgParameters.addElement(control); } } }

Custom View not responding to touches

≯℡__Kan透↙ 提交于 2019-11-28 13:51:25
I've created a custom view which should change it's background image when pressed, highlighted or disabled. The app runs but the button doesn't change it's background. here's my code: public class CustomImageButton extends View { public CustomImageButton(Context context) { super(context); setFocusable(true); setClickable(true); } public CustomImageButton(Context context, AttributeSet attrs) { super(context, attrs); setFocusable(true); setClickable(true); } public CustomImageButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); setFocusable(true);