customizing

UINavigationBar with solid color iOS 5

此生再无相见时 提交于 2020-01-13 05:13:45
问题 I'm using the category to customize nav bar. My code is: - (void) drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColor(context, CGColorGetComponents([self.tintColor CGColor])); CGContextFillRect(context, rect); } It works well, but not in iOS 5. I need nav bar color to be solid without any gradient. How should I do this? As I know, for iOS 5 the only way to replace drawRect method is to make a subclass, but is there any way to make all navigation

custom Toast at screen top

强颜欢笑 提交于 2019-12-07 03:05:45
问题 Please read the question before answering with your standard routine to print a Toast :) I'd like to display a Custom Toast at the top left corner of the screen. I use this code to create the Toast: Toast mFixedToast = new Toast(getApplicationContext()); mFixedToast.setDuration(timeout); mFixedToast.setView(myInflatedLayout); mFixedToast.setGravity(Gravity.TOP|Gravity.FILL_HORIZONTAL, 0, 0); mFixedToast.setMargins(0,0); However, in some devices , for example Samsung Galaxy S4, the toast is

UINavigationBar with solid color iOS 5

安稳与你 提交于 2019-12-04 13:20:06
I'm using the category to customize nav bar. My code is: - (void) drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColor(context, CGColorGetComponents([self.tintColor CGColor])); CGContextFillRect(context, rect); } It works well, but not in iOS 5. I need nav bar color to be solid without any gradient. How should I do this? As I know, for iOS 5 the only way to replace drawRect method is to make a subclass, but is there any way to make all navigation controllers to use UINavigationBar subclass instead of original class? In iOS 5 you can use the

Customizing the layout of a PreferenceScreen

懵懂的女人 提交于 2019-12-03 09:24:48
问题 My requirements Note: I need to support Android API 15 and onwards. In my PreferenceFragment I am dynamically adding PreferenceScreen's to a PreferenceCategory. PreferenceScreen as = mgr.createPreferenceScreen(context); as.setTitle(name); myCategory.addPreference(as); When the settings Activity renders these PreferenceScreens are rendered with just a title in it's row, see the image below. I want to customize what is shown in this row. Ideally I would like to have a title with a summary below

Customizing Android Lock Screen functionality?

蓝咒 提交于 2019-11-30 22:40:09
I will like to develop an App which modifies LockScreen of Android. I have read in some forums that it is not supported as yet in the SDK but there are some applications available that does exactly that. One can surf Screen Suite Lock Screen Can someone let me know is it actually possible to customize LockScreen and implement our own way of Lock Screen? Regards Sunil Taiko It is possible to have views displayed above the lock screen and to make it dismiss the lock screen. It's a dirty solution, but the only one as long as there is no api to replace the lock screen. Android activity over

Customizing Android Lock Screen functionality?

早过忘川 提交于 2019-11-30 17:50:26
问题 I will like to develop an App which modifies LockScreen of Android. I have read in some forums that it is not supported as yet in the SDK but there are some applications available that does exactly that. One can surf Screen Suite Lock Screen Can someone let me know is it actually possible to customize LockScreen and implement our own way of Lock Screen? Regards Sunil 回答1: It is possible to have views displayed above the lock screen and to make it dismiss the lock screen. It's a dirty solution

Customizing OpenFileDialog

不羁的心 提交于 2019-11-27 04:52:36
I am working on winforms application in C#. What I want to achieve is to get a file from user for which I am using the following code: OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { string sFileName = dlg.FileName; //my code goes here } Now, everything is working fine but I want to put 3 radio buttons in the same dialog box, meaning I would now get two things from this dialog box string sFileName = dlg.FileName; //same as in case of traditional dialog box //some thing like this which tells which radio button is selected: dlg.rbTypes.Selected How do I

Customizing OpenFileDialog

早过忘川 提交于 2019-11-26 11:22:28
问题 I am working on winforms application in C#. What I want to achieve is to get a file from user for which I am using the following code: OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { string sFileName = dlg.FileName; //my code goes here } Now, everything is working fine but I want to put 3 radio buttons in the same dialog box, meaning I would now get two things from this dialog box string sFileName = dlg.FileName; //same as in case of traditional dialog