For one of my project I am working on a custom seekbar, I need a seekbar like this .
I am almost close to my destination with a great library two thumb seekbar,I have followed the custom Drawable class which draws the ranged seekbar . In the library the value text has been drawn using paintText method . As I am not experienced in android,
I don´t know how to draw these two range value text like the requirement and a bubble image with them . Can anyone help me or give me some hints how to get this effect .
thnks in advance
You can find RangeSeekBar class from the link. You can customize the view further.
Related
I have displayed a list of direction routes on map, using "draw Routes()" method of Navigation "Mapbox Map" class. I have added start navigation method after it and providing it with first route in list. The navigation route is displayed in blue color and rest all other routes are in gray color, acting as alternative route.
My Query is, as soon as I click on gray color alternative route or nearby position from alternative routes on map, the alternative routes get disappeared. I want to keep displaying the alternative route or else want to disable the click listener on alternative route, so that they don't disappear. Is there a way to achieve this functionality?
Please help me out with the same.
Note: added spaces in words mentioned in quotes to avoid typing errors.
I see you are new here and i would like to help you!
Could you please share the code in which you implement the example you describe? It is very helpful for other developers if they can reproduce the behaviour.
This would help a lot, and saves time when trying to answer your question! As a nice side effect, you would not receive negative votes!
I need to add sliding functionality to the togglebutton of gwt-bootstrap api. Currently I am having two images(upImage and downImage) which flips on click. I want them to slide.
How can I achieve it? Any idea is appreciated. Thanks in advance.
I don't really know about sliding if you are able to do it with css why not just use a label with a button class onto it and try? Or else here is another option that i would prefer use gwt bootstrap icons along with the newly added spin functionality. Docs is here
Example :
<b:Icon type="ROTATE_RIGHT" size="FOUR_TIMES" spin="true" rotate="ROTATE_180"/>
You can probably call the rotate and spin on click? Helps you?
I have a form where a certain field is a radio selector with 3 options. Let's say this represents Good, More-or-Less, and Bad.
I managed to put them in the same line with InlineRadio, like this:
self.helper.layout = Layout(InlineRadio(field_name))
Now, I need to 2 things:
1) replace each option, that is rendered as a radio-button and its label with a pre-defined image.
2) Add 2 images, one to the left and one to the right of the radio buttons. So, at the end, I'll have 5 images in a row. From left to right: Image of Smile (just the image) - Image of selector (Good) - Image of selector (More-or-Less) - Image of selector (Bad) - Image of Sad face (just the image)
Is it possible to achieve them with django-crispy? If not, how can I achieve this?
Thanks in advance.
I'm the lead developer of crispy-forms. You could do this using Field layout object and using a custom template.
Field('field_name', template="custom_inline_radio.html")
Other option you have is to create your own layout object subclassing InlineRadio. That way you would only have to do:
CustomInlineRadio('field_name')
Actually, what you try to do is basically override the output of a default widget in Django and that probably makes more sense if you use a custom widget in your Django form, crispy-forms will play great with it. I wrote an article on widgets and Django forms that might interest you.
This sounds like a pretty simple thing to do but I havent been able to find an easy way to do this. How do I create a panel with a title and a border which can contain my widgets? I have seen the SectionStack class which provides this. But I dont want to create a section stack.
Window can be added to a layout and drawn. But is it the only way or is there a container class that I am missing?
Also, how does one center things? Say a textfield and a button at the center of the page. How is this achieved?
If you are using a DynamicForm, you can give it a border and title with
form.setIsGroup(true);
form.setGroupTitle(title);
This actually works for Canvas, too (which is the superclass of most widgets and layouts in SmartGWT).
(I just had the same problem, and found this question, as well as the thread Is there a "titled Border" on the SmartGWT Forums, which gave this answer. I tried and it seems to work.)
To do form-related tasks, look into DynamicForm. To set the inputs in the form, you use setItems(Item...). A text field is a TextItem. You set it's title to control the label that SmartGWT will build. To get a title for the form, the best I've come up with is to use a container canvas that will contain both the title (probably a Label element) and the DynamicForm. To center the inputs, I believe you'd need to use setAlignment on the DynamicForm.
You could create an object that is actually a VLayout that contains a Label (the tile), has a border as you need and includes a Canvas (the generic stuff you want included).
In my experience, I noticed that very often I have a DynamicForm visible, so I just add a BlurbItem control to diplay the tile and a small explanation.
What I am trying to do is create tooltip functionality so that certain words in my instructional app can be tapped and the definition pops up. For the popup part I plan on using code from “AFInformationView” which provides bubbles on the iPhone.
The part I'm struggling with is how to associate A particular word's location with the bubble. Currently I have the text on a UILabel that is on a custom UITableCell. Since I calculate the row height on the fly with:
[textToUse sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:CGSizeMake(stop-start, 500)];
I'm not sure what the coordinates for a specific word will be. I was thinking that if I created a custom DataDetectorType that could be the fix.
If anyone knows how to do this or has any other ideas I would be happy to hear them.
Thanks,
Andrew
I didn't create a custom UIDataDetectorTypes but Craig Hockenberry did something like it with his TwitterrificTouch.
He uses regular expressions to detect links and other things. I provide it with my keywords and then they become tappable. He places buttons on top of the matching text from the underlying labels. You can google a lot of posts that talk about "putting transparent buttons on top" of various things but Craig's code is the only example/working code I could find.
Here is the link:
http://furbo.org/2008/10/07/fancy-uilabels/
I don't think this is possible. The (few) Data Detector types that the iPhone currently supports are hard-coded with a integer type id. There does not seem to be a mechanism to extends that list of types.
File a feature request in their bug tracker. I will do the same.
AFAIK, you can't create custom data detectors.
The best approach for this sort of thing seems to be using UIWebViews. At least that's what I did. However, you shouldn't use a UIWebView inside a UITableViewCell. In fact, no subview of a UITableViewCell should respond to user input. So I think the best approach would be to display a UIWebView when the cell is tapped.
UIWebViews could be a possible approach but on scrolling you should consider that the whole text should be parsed to detect the words.You could use HTMl tags to make them blue and provide the links.But how could i then assign a custom behavior then opening in safari?
If you want custom data detector you could write an extractor method to primarly patch the links with help of NSregularExpression. For example
NSString regex = #"(http|https|fb)://((\w)|([0-9]*)|([-|_]))+(\.|/)"; to patch alll the links including Facebook URLs inside text like fb://friends.
Then you could use NSattributedString yo mark the links with different colors etc.
ThreeTwenty has a great library called TTTAttributedLabel where you could assign links to certain parts of a text. I also scrolls quite fast if you use it in tableviews
https://github.com/mattt/TTTAttributedLabel