我想知道当用户长按列表项并激活操作模式时,我们可以更改底线颜色吗?在屏幕截图中,您可以看到动作模式中的底线颜色为蓝色。我想将其更改为橙色,以便与我的布局颜色相匹配。我试过这个:
<item name="android:actionmodebackground">@color/orange</item>
但它将整个背景更改为橙色,但我只想更改底线颜色。可能吗?任何链接或代码段将不胜感激。
答案 0 :(得分:0)
你试过吗?
extension NotesTableViewController: UICollectionViewDelegate, UICollectionViewDataSource , UICollectionViewDelegateFlowLayout {
func collectionView(collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int {
pagerControll.numberOfPages = attachedImgUrlDict[collectionView.tag]!.count
return attachedImgUrlDict[collectionView.tag]!.count
}
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let newSize = CGSizeMake(collectionView.frame.size.width , collectionView.frame.size.height)
return newSize
}
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets {
return UIEdgeInsetsMake(0, 0, 0, 0)
//t,l,b,r
}
override func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
if scrollView != tableView {
if scrollView.contentOffset.x >= 320 && scrollView.contentOffset.x < 640{
pagerControll.currentPage = 1
}else if scrollView.contentOffset.x >= 600 {
pagerControll.currentPage = 2
}
//pagerControll.currentPage = Int(scrollView.contentOffset.x / self.view.frame.size.width)
print(scrollView.contentOffset)
}
}
}
答案 1 :(得分:0)
尝试此功能:
var picker = SPClientPeoplePicker.SPClientPeoplePickerDict[pickerId + "_TopSpan"];
picker.OnValueChangedClientScript = function (elementId, userInfo) {
for (var x = 0; x < userInfo.length; x++) {
console.log(userInfo[x].Key);
}
alert("Total number of " + userInfo.length + " users is selected")
};
答案 2 :(得分:0)
这对我有用:
<item name="android:actionModeBackground">@android:color/white</item>