ScrollView:
size_hint_x:None
size_hint_y:None
background_color:[.2,.4,.4,1]
pos_hint:{'center_x':.97,'center_y':.55}
size_hint:.45,.5
GridLayout:
id:selecteditem
height: self.minimum_height
bar_width:3
cols:1
padding:1
spacing:3
size_hint:.45, .5
this is the .kv file code.
for i in range(100):
btn = Button(text=str(i), size=(250, 30),
size_hint=(None, None))
self.othroot.ids.selecteditem.add_widget(btn)
this is the code that i used as sample to create a 100 list of button.
Thank you in advance if anyone can help me on this.
This is the image regarding the issue
Related
Is there a way to give a custom space/padding in between x-axis Labels in React-Native-Chart-Kit? Example if we have labels from Jan-Dec, x-axis labels in the chart gets very compact. And even if we give a custom space between x-axis Labels then how do we give a Horizontal scroll feature for the full chart since it overflows onto the right side. Tried with following. Didn't work. Please help. Thanks.
propsForLabels: {
fontSize: "14",
fill: "rgba(10, 10, 10, 1)",
fontWeight: 500,
padding: 5
},
You can try horizontalOffset or check this issue looks like you can use patch or fork from this issue https://github.com/indiespirit/react-native-chart-kit/issues/538 to resolve your problem.
I have the following problem: I'm trying to animate a QLabel, more specifically to make it fadeIn using QPropertyAnimation. It animates successfully, but when I'm trying to resize the window, the label breaks out of the layout that's in, making it overlap with the other items.
The code:
self.label = QtWidgets.QLabel(self.frame)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setStyleSheet("color: #fc8102;\n"
"font-weight: bold;\n"
"font-size: 18px;")
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.opacity_effect = QtWidgets.QGraphicsOpacityEffect(self.label)
self.opacity_effect.setOpacity(0)
self.label.setGraphicsEffect(self.opacity_effect)
self.anim = QtCore.QPropertyAnimation(self.opacity_effect, b'opacity')
self.anim.setDuration(800)
self.anim.setStartValue(0)
self.anim.setEndValue(1)
self.anim.start()
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.verticalLayout.addWidget(self.label)
Image with what's happening:
Image with how it's supposed to look:
Thanks in advance.
After the user does some action I want to scroll to a particular section within a ScrollView, which I'm doing using this code:
this.refs.detailsView.measure((x, y, width, height, pageX, pageY) => {
this.refs.homeScrollView.scrollTo({ x: 0, y: pageY - 64, animated: true });
});
The problem is the "detailsView" View is near the bottom of the ScrollView and on the largest iPhones, scrollTo() ends up scrolling past the bottom of ScrollViews "natural" max scroll point and you can see the ScrollViews background colour (dary grey) as though you over-scrolled using touch gestures...the components in the ScrollView have the green background colour.
Does anyone have a suggestion for how to prevent this "over-scrolling" when using the ScrollView.scrollTo() function?
react-native: v0.36
This disables the scrollview from bouncing past its limit
bounces={false}
i have a class that extend: JSQLoadingPhotoMediaItem, all works fine expected that in my chat i do not use image for bubble, but i have a background color and radius for textView inside the bubble, if i use the class i obtain this:
The first one is the textView of the cell with a color background, the second one is a view that i return from class with this code:
view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: 38))
view!.backgroundColor = UIColor(red:0.89, green:0.98, blue:0.78, alpha:1)
view!.layer.cornerRadius = CGFloat(9)
view!.layer.masksToBounds = true
in a function
override func mediaView() -> UIView!
How can i give the same right margin to my custom class? or if for example would like to have a view of custom class aligned center?
Thanks!
I also had the same problem. To get the same margin for my bubbles I resorted to using the same JSQMessagesMediaViewBubbleImageMasker from JSQMessagesMediaViewBubbleImageMasker.h in my custom media view
//apply mask to your view
[JSQMessagesMediaViewBubbleImageMasker applyBubbleImageMaskToMediaView:view isOutgoing:self.appliesMediaViewMaskAsOutgoing];
You can create a category of JSQMessagesMediaViewBubbleImageMasker and extend it however you wish, there was a particular case where I needed a specific color for the border of the bubble.
Thanks! i found a solutions, i have a clear background for the main view, and inside another subview with right or left margin based on sender, backgroundColor and corner radius!
I am working on a mobile application and using sencha touch charts. By default horizontal bar chart is fitting exactly into screen. If there are more number of bars,then bars are appearing very thin and looking odd. I want to fix bar width to have uniform look and feel irrespective of number of bars being displayed. No matter even user need to scroll down to see entire chart. I have tried below option in series configuration, but it did not work.
style : {
size : 30
}
Please help me.
Thanks,
Nag.
am able to change the bar width by setting barWidth option in touchcharts-debug.js by refering to the following link
http://docs.sencha.com/touch-charts/1-0/source/Bar.html
but the axis labels are not rendering properly labels are fitting into screen
I tried this code in my interactions to render the labels, it's working fine
{
type: 'panzoom',
showOverflowArrows: false,
//axes: ['bottom'],
axes: {
bottom: false,
left: {
startZoom: 2
}
}
}