jjzjj

BackgroundColor

全部标签

ios - 有没有办法为 RadioGroup 设置 BackgroundColor?

我正在使用MonoTouch.Dialog创建一个类似设置的页面。下面的linq创建了一组RootElements,每个RootElements的一个部分都有一组RadioEventElements(我为了添加OnSelected事件而创建的RadioElement的子类)。//initializeotherphonesettingsbycreatingaradioelementlistforeachphonesettingvarelements=(frompsinPhoneSettings.Settings.Keysselect(Element)newRootElement(ps,n

ios - react native :Strange Behaviour backgroundColor in ListView running in iphone6Plus

我在使用ReactNative的ListView时遇到了一些问题,奇怪的是设置行的背景颜色会在iPhone6和iPhone6plus之间执行不同的结果我在render()函数中的代码render:function(){return();},样式:varstyles=StyleSheet.create({list:{flexDirection:'row',flexWrap:'wrap',},row:{backgroundColor:'white',width:w.width/3,height:w.width/3,borderWidth:0.5,borderColor:'#f3f3f3',

Android objectAnimator 动画 Layout 的 backgroundColor

我有一个问题。我想使用ObjectAnimator为LinearLayout的背景色设置动画。问题是它有动画,但它既不关心持续时间也不关心valueFrom和valueTo。这是我的xml文件:在Java中我这样调用:ObjectAnimatorobjAnim=(ObjectAnimator)AnimatorInflater.loadAnimator(getActivity(),R.animator.animator_bkg);objAnim.setTarget(view);objAnim.start();请注意,当我为布局的alpha设置动画时,它会按预期工作。这是Android错误

objective-c - UILabel 的 backgroundColor 是不可动画的吗?

我有一个gridView,我用来显示几个GridViewCell:UIView。GidViewCell将一个UILabel添加到自身,并将一个UITapGestureRecognizer附加到自身。UITapGestureRecognizer*gestureRecognizer=[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(tapped:)];[selfaddGestureRecognizer:gestureRecognizer];[gestureRecognizerrelease];在tapped:

ios - 将 UIView backgroundColor 设置为透明的更好方法是什么?

我知道您可以将UIView的backgroundColor设置为透明,如下所示:UILabel*aLabel=[[UILabelalloc]init];aLabel.backgroundColor=[UIColorclearColor];但是根据一些文章说,[UIColorclearColor]没有很好的性能,那么,将UIView的backgroundColor设置为透明的更好的方法是什么? 最佳答案 原因[UIColorclearColor]很慢是因为它是透明的。您所做的任何需要系统计算图层混合的事情都会比不透明慢。如果你需要它是

ios - cell.backgroundColor 问题

我在互联网上找到了这个方便的代码,-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{cell.backgroundColor=(indexPath.row%2)?[UIColorgrayColor]:[UIColorclearColor];}我知道它使每一行都变成灰色,然后清晰,然后变成灰色。但我想在浅灰色和深灰色之间切换。我该如何修改上面的代码,以便在这两种颜色之间切换?谢谢!

ios - react-native-elements 按钮 backgroundColor 不工作

我是ReactNative的新手。在我的简单测试应用程序中,我想尝试使用react-native-elementsbutton但是,我无法显示我的按钮背景颜色。我按照文档并尝试添加这样的按钮:importReact,{Component}from'react';import{Text,View}from'react-native';import{Button}from'react-native-elements';exportdefaultclassloginFormextendsComponent{render(){return()}}在App.js中,我这样导入它:importRe

ios - UIPopoverController backgroundColor 在 iOS 8 上旋转后返回默认值

当将backgroundColor设置为[UIColorblackColor]并设置为UIPopoverController时,一切正常并在iOS7和iOS8上正确呈现。我通过[aPopoverpresentPopoverFromBarButtonItem:self.navigationItem.rightBarButtonItempermittedArrowDirections:UIPopoverArrowDirectionAnyanimated:YES];设备旋转后,弹出框backgroundColor重置为默认颜色(在本例中为白色)。这在iOS7中不会发生。仅在iOS8中发生我已

ios - 如何在 NSUserDefaults 中存储和加载 backgroundColor

商店--(IBAction)setMyColor:(id)sender{if(sender==yellowButton){[colorViewsetBackgroundColor:[UIColoryellowColor]];}NSUserDefaults*userDefaults=[NSUserDefaultsstandardUserDefaults];UIColor*strColor=[colorViewbackgroundColor];[userDefaultssetObject:strColorforKey:@"myColor"];[userDefaultssynchronize

ios - 如果在 tableView :cellForRowAtIndexPath 设置 cell.backgroundColor 不响应

我想用红色给某些表格行上色,所以我尝试添加-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{...initCodeherecell.backgroundColor=[UIColorredColor];cell.accessoryType=UITableViewCellAccessoryCheckmark;}出现了附属的复选标记,但没有出现红色。后来我发现将它放在tableView:willDisplayCell中就可以了。这是设计使然吗?为什