Date picker in Android

Use the DatePicker http://developer.android.com/reference/android/widget/DatePicker.html It is availible since API Level 1 Here a example how to use the DatePickerDialog. First add a TextView and a Button to your layout.xml <Button android:id=”@+id/myDatePickerButton” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”Choose Date”/> <TextView android:id=”@+id/showMyDate” android:layout_width=”fill_parent” android:layout_height=”wrap_content”/> Next you have to initialize the Button and TextView in the onCreate Method of your layout. … Read more

How to set ringtone with RingtoneManager.ACTION_RINGTONE_PICKER?

You must implement onActivityResult() to receive result from user’s pick, then save it. if (resultCode == RESULT_OK) { Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); if (uri != null) { String ringTonePath = uri.toString(); } Here an example: http://www.ceveni.com/2009/07/ringtone-picker-in-android-with-intent.html EDIT: update RingtoneManager.setActualDefaultRingtoneUri( myActivity, RingtoneManager.TYPE_RINGTONE, uri); You must call this 🙂

How do you shrink a UIPickerView on the iPhone?

Actually, you can slightly shrink the whole UIPickerView by applying an affine transform to an enclosing view. For example: CGSize pickerSize = [pickerView sizeThatFits:CGSizeZero]; pickerTransformView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, pickerSize.width, pickerSize.height)]; pickerTransformView.transform = CGAffineTransformMakeScale(0.75f, 0.75f); [pickerTransformView addSubview:pickerView]; [self.view addSubview:pickerTransformView]; [pickerTransformView release]; will scale a picker to 75% of its original size by placing it … Read more

Multiple DatePickers in same activity

I have a solution that allows for an unlimited number of date fields without adding new dialog types. When the user clicks one of the buttons, I register which TextView and Calendar is currently being modified before launching the DatePickerDialog. The dialog’s OnDateSetListener then updates the registered TextView and Calendar. import java.util.Calendar; import android.app.Activity; import … Read more

ASP.NET DateTime Picker

The answer to your question is that Yes there are good free/open source time picker controls that go well with ASP.NET Calendar controls. ASP.NET calendar controls just write an HTML table. If you are using HTML5 and .NET Framework 4.5, you can instead use an ASP.NET TextBox control and set the TextMode property to “Date”, … Read more

Choosing CoreData Entities from form picker

As written you are not matching the types of the array the picker and the FetchResult. See the comments import SwiftUI @available(iOS 15.0, *) struct LearnView: View { //This is optional Language @State private var selectedLanguage: Language? //I commented out variables that are not part of the reproducible body provided //@State private var selectedCategory: SubCategory? … Read more

Wrong color in Interface Builder

Apple thinks it is much more important that colors look the same everywhere than that colors have the same RGB values everywhere. See, the same RGB values will not look the same on different screens, because every screen has different display characteristics. So when you take a screenshot, Apple does not just store a RGB … Read more