picker

Google Places API for Android - PlacePikcer without search option

二次信任 提交于 2019-11-30 02:06:14
I am building an application, where the user has to select a Place he wants. For that, I am using the PlacePicker dialog, as the Google Places API for Android is teaching in the API reference site. However, when the user click the button and open the Place Picker Dialog, it does not have any button where the user can type the name of the place he wants to select. So, the user will have to select a place just dragging on the map; this is horrible for the user, specially if he wants to choose a specific location far from his location or he doesn't know where is the place on the map. So, I've

How to disable future date picker in android

核能气质少年 提交于 2019-11-29 18:25:10
I'm new to android How to do disable future date in date picker, I tried many codes in stack over flow but it couldn't help.can anybody help me pleas. Have a look Code public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.daty); click=(ImageView)findViewById(R.id.click); hdate=(TextView)findViewById(R.id.hdate); timeStamp = new SimpleDateFormat("dd/MM/yyyy").format(new Date(System.currentTimeMillis())); hdate.setText(timeStamp); final Calendar myCalendar = Calendar.getInstance(); // listener for date picker final DatePickerDialog

SwiftUI : Picker does not update correctly when changing datasource

非 Y 不嫁゛ 提交于 2019-11-29 15:04:03
问题 I have just started learning SwiftUI and got stuck somewhere! I am trying to change segment styled picker datasource when changing value of another segment. But somehow it is not working as expected! Or else I might have coded something wrong. Can anyone figure it out please? Here is my piece of code: import SwiftUI struct ContentView: View { @State var selectedType = 0 @State var inputUnit = 0 @State var outputUnit = 1 let arrTypes = ["Temperature", "Length"] var arrData: [String] { switch

How to make a color gradient in a SeekBar?

一曲冷凌霜 提交于 2019-11-29 02:45:18
I want to use a SeekBar (i.e. old school Java Slider) into a color gradient picker. I have seen some examples like this but they all require making new classes and such. There has got to be a way to modify or override the original classes. Or just replace the background with a gradient. JPM I figured it out here is how you do it. You create a standard seekbar in your XML. <SeekBar android:id="@+id/seekbar_font" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10px" android:layout_below="@id/color_font_text" android:max="100" android:progress="50"><

Custom UIPickerView with Custom Background color

巧了我就是萌 提交于 2019-11-28 20:48:52
I have created a sample picker-view which will display some details. Setting the Background color using: _pickerView.backgroundColor = [UIColor redColor]; doesn't seems to be working . But I wish I could create a picker view like the below image What I was trying to do is , the entire PickerView background color should not be white, it should fill with the UIColor which I am giving. Is that possible?? How it can be done ?? Addition to Nina's answer, below are some of the good custom Picker view controls which will be good to use in terms of performance and customizable. http://www

Paging UIScrollView with different page widths

。_饼干妹妹 提交于 2019-11-28 19:33:32
I would like to have a horizontal scrolling UIScrollView with paging enabled. The pages in this scrollview have different widths, so the scrolling distance differs from page to page. The goal is to make a picker for different points in time, e.g.: | Now | Yesterday evening | Last Week | Last Month | ^ ^ ^ ^ <- stopps here Here | Now | has a smaller width than | Yesterday evening | . When paging through this values, the scrollview should stop at the center of the according value. Is that possible? it's surely possible, but not so automatically... i guess you should implement the

How to disable future date picker in android

血红的双手。 提交于 2019-11-28 13:03:03
问题 I'm new to android How to do disable future date in date picker, I tried many codes in stack over flow but it couldn't help.can anybody help me pleas. Have a look Code public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.daty); click=(ImageView)findViewById(R.id.click); hdate=(TextView)findViewById(R.id.hdate); timeStamp = new SimpleDateFormat("dd/MM/yyyy").format(new Date(System.currentTimeMillis())); hdate.setText(timeStamp); final

How can I change text font in UIPickerView in iOS 7?

安稳与你 提交于 2019-11-28 09:36:07
I was able to change my font color but I also need to change font size, how can I accomplish that? Here's my code for chaning the color, - (NSAttributedString *)pickerView:(UIPickerView *)pickerView attributedTitleForRow:(NSInteger)row forComponent:(NSInteger)component { NSString *title = _currencyName[row]; NSAttributedString *attString = [[NSAttributedString alloc] initWithString:title attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}]; return attString; } UPDATE: this didn't work: NSAttributedString *attString = [[NSAttributedString alloc] initWithString:title attributes:@

Android image picker for local files only

扶醉桌前 提交于 2019-11-28 08:24:02
I'm using the built in Android image picker as follows: Intent photoPickerIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); m_activity.startActivityForResult(photoPickerIntent, PHOTO_PICKER_ID); Is there any way to restrict this to show only locally available files. On my device it is currently picking up Picasa thumbnails and I'd like to exclude all images that are not actually present on the device. Adding intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true); will allow for local files only. It will exclude picasa images. Hope this helps.

Using qnx.ui.picker.Picker in mobile Flex Hero project for Blackberry Playbook

一笑奈何 提交于 2019-11-28 01:45:46
there is a Picker example for usage in an ActionScript project. It works well in simulator. But how do you use that component in a Mobile Flex Project (with Burrito Flash Builder)? How do you add a qnx.ui.picker.Picker to a spark.components.View ? The latter seems to expect a mx.core.UIComponent , but the former is a qnx.ui.core.UIComponent . The ActionScript project I've mentioned above works ok, because the Picker is added to the Sprite. But adding it to a View in a Mobile Flex project fails for me. Thank you! Alex UPDATE: I've found this page today: http://corlan.org/2011/03/28/creating