I use IGListKit in my project. Everything was fine until the task of adding a UITextView to one of the cells arrived. When editing, the UITextView should increase in height depending on the number of rows. I know how to do this with a UITableView, but what about IGListKit. I read a lot of material and did not find anything else. Is this really a dead end? Sorry for my english .
Related
i am working on a app and in 1 option i can load a photo to display when you scroll through items.
The permissions and loading all works fine.
Now my photo is bigger than the imageview so i want that the user can "move" the photo to display the section he/she wants to show.
Again implementing the onTouchListerner and scrolling the photo works fine.
The problem is where to stop the moving of the photo.
I the picture above the grey part is my photo. In my case 2560x1920.
The red part is my imageview (match_parent x 85dp => 1368x255)
I have my scaletype set to CENTER_CROP resulting in a scalefactor of 0.534375
when i scroll in the image ( scrollBy(x,y) ) i can see my Y moves between -390..390 (or close by, hard to see). But that is of course only the case for this specific photo. But no matter which adding/substracting/dividing/... is do i can not seem to find out how the get this limit becuause what is absolutly do not want is the right situation in the picture above.
Does anybody have an idea to figure this out.
I found some (not a lot) examples that are suppose to work but they do not.
Mostly they work by keeping to total somewhere but still having a total is not of much use if you do not no the min/max.
ps. if possible at all (please please) a java example and not kotlin
I have a system where if you walk by a sign it will create a popup dialogue which is fine (just the popup part) but when I try to make it to where it can be adjusted based on how much text is displayed (Content Size Fitter) then I get something that literally does not make any sense to me whatsoever. When using World Space my font on Text components has to be 0 (also makes no sense) so that 1 letter isn't the size of 100 units and the combination of these 2 issues has almost made me go mad but that is the reason why I am here so you all can save me!
My setup for my sign :
Now this is the dialogue that is spawned viewed from the inspector (Not shown in the scene/game view yet) :
Now this is when the player walks near the sign with all the components you see in the screenshots :
As you can see the height of my dialoguePanel for some reason keeps going to 321 and New Years isn't close so this countdown I am not happy with. It should be adjusting to how much text is in it. I mean I just did a tooltip almost 100% identical except that the Canvas isn't World Space but Screen Space - Overlay. On top of all this it seems any text I use in World Space HAS to be font 0. Please help I am about to lose my mind.
World space canvas is a bit tricky. And guess what is even more tricky: content size fitter. One of solutions is that you add your dialog UI element manually in the scene at desired location and tweak its RectTransform values in inspector to get what you want to see in scene view and then save it as prefab.
Read more about How Content Size Fitter works and there is one more thing about UI when working with world space canvas. UI is way too bigger than your other scene elements. To solve this problem you have to scale it down as instructed in section Specify the size of the Canvas in the world.
Hope it helps :)
I have a CodenameOne application which has a TextArea that should display a multi-line text.
When I run the app in the simulator and click on the text-area, the spacing between the lines and possibly also between the characters change so that the area that the text occupies shrinks a bit.
Why is this?
What should I do to prevent it?
That is due to the switch from our drawing to the native editing which will always render things slightly differently. E.g. things like line spacing are really hard to get accurately for every native device.
TextArea has a setRowsGap method that allows you to specify the spacing between rows in pixels but since this differs between OS's its probably not ideal.
I'm putting the final touches on an application that Ive been working on for quite a while and while I understand how to restyle existing components by using inheritance Im coming up blank in my search on how to accomplish this last thing.
I want to apply a custom color/image behind the text or icon representing the current activity I am in. This would be similar to how the tabs have the highlight underneath them while selected. I am already using the tabs and have figured out how to change the image resource that is the little underline in the tab bar. Now I just need to accomplish the same look for the action items.
Ive overlooked the actionbarsherlock library for the past day and a half but I dont see anywhere that I could do what I want to accomplish. I have to imagine that such a thing can be done but like I said before so far Im coming up short. Any help would be much appreciated.
I figured out a simple way to do what I asked earlier. I just created a square shape in xml, put text over it, assigned it the gradient and color I wanted and assigned it to that action item I wanted highlighted in the activity i was in.
Yes, you read right - my UITextField has multiple lines for some reason and it is driving me crazy.
I have an app where users can edit content directly in a UITableViewCell. When they tap the cell, the text in the cell's label is put into a UITextField that is then added to the UITableViewCell. Once the UITextField hits a certain amount of characters (not sure exactly what the magic number is), it splits onto multiple lines and looks terrible - the first row is clear, but the second row is clipped by the bottom border of the UITextField.
I do not want to use a UITextView as I prefer the single line in my situation. Has anybody seen this behavior before? Is there a way to prevent it?
Oh, I am using iOS 4.1 as my base SDK.
Found it - the clipsToBounds property of the UITextField needs to be set to YES. If using Interface Builder, the "Clip Subviews" box needs to be checked.