Show individual lines of text sequentially from the textView in android - android-animation

i'm creating a transition for a text view in android. onswipe the current textView is moved and the next textview is shown,with a bounce animation.
i'm presently getting the entire textView at once, rather i require the text to appear line after line. Similar to how is happens in MS powerpoint, where very bullet points appear one after the other.
Can anyone pls tell how this can be done ?
Regards,
Vasudev

Use a Vertical LinearLayout that contains a textview for each line of text
Use AnimationFactory which has a function inFromLeft that you can use before setVisibility(View.VISIBLE) of each textview to animate them.

Related

How to add text under the button previously placed as leftCalloutAccessoryView of MKPinAnnotationView

I want to basically do this: ETA info under the button with a car image
How can I add text just at the bottom of the button? Thanks in advance.
I have found the solution a long time ago but forgot to mention it here.
Here it is:
Just create a Vertical StackView, set its alignment as Center and distribution as Fill, and put your label and image in it. Make your label hidden at first. Assign the StackView as the leftCalloutAccessoryView. When you got the ETA info, just make the label unhidden inside an animation code.
That's it! It will behave just like in the Apple's Map app.

Xcode UITextView Still not scrolling using storyboard

I am trying to initiate a scroll view in my UITextView and even though I seem to have selected the appropriate boxes, I can't seem to get the scrolling working. I have gone through multiple questions similar to this but none seem to have the answer.
I included an image of Xcode below:
Question 2: When I scroll down the majority of my text shows but the scrolling stops with two sentences or so left and I have to scroll down and hold it there to read. Any way I can fix this so it scrolls all the way to the bottom of the text?
Can you check the two boxes: Bounce Horizontally and Bounce Vertically and see what's happening? Sometimes your content are actually way bigger than your view, and they are touching a invisible outer box. If you can see they actually move, that means there is nothing wrong with touch or scroll, is just the view layout problem.
For the content issue, my guess is that the content size is not right, you can programmatically adjust it with textView.frame property, set it to a proper size, such as the frame of the window or the frame of the content, which are CGRect classes. Comment below to see if this can solve your second problem.
The text view will not scroll in storyboard, only the app. And the text view will scroll once the content in the text view exceeds the frame size.
If you're using iOS 7+, you can just turn on auto layout, pin each of the sides of the text view to the edge of its parent view, and it works fine without needing to do anything in code.

How to layout the UIlabel object according to design spec in iOS

I have some difficult time in creating iOS screen to match with visual design provided by design team.
The design team has provided the spacing info for each screen which shows how much space each text needs to be apart from other UI element on the screen. This is attached for your reference. You can see here that the two text labels "Activate Your Account" and "A Verification link...." are placed apart by 25px.
The same thing I am trying to achieve in the storyboard. I am attaching the storyboard screen snapshot for reference.
From this you can see that I cannot keep exactly 25px b/w the two text labels because for the following issue
The text font is custom font and I cannot load the same in storyboard. I have added the font file in the project, but when I try to open it in storyboard for UILabel, it doesn't list out. I am not sure why xcode doesn't show up. This makes me hard to resize the label's frame. If I try to decrease the empty space in the label (upper and lower part of the text), this will make label height less, but when I set the font programmatically, it doesn't fit in this small space.
When I try to increase the height of the label, the text inside the label starts displaying at the center leaving space at the top and bottom of the label frame.
So I want to know how to solve this problem. If anyone had this issues and sorted out, please let me know how to fix this.
Many Thanks
Your designers aren't speccing their designs correctly :) Show them how iOS renders text and have them spec their designs in the same way. This is what we do on the Facebook design team. I mocked up an example for you (each square is 4dp/8px).
http://i.stack.imgur.com/q4tZX.png

NSTextView Text Alignment

well, I was searching for the code to make the "Left/Center/Right" Alignment for the NSTextView. I observe that in Text Menu, this functionality exists, and it is linked to the first responder calling the "alignCenter" selector. However I could not make it to work.
So I start to read the source code of TextEdit. It seems that Apple implement it and shows in the toolbar. However I was not able to find where it is. (It's not in any .nib file, and there's no selector related to align or centre or left, etc..)
So can anyone tell me: how to implement the function exactly like that in the Text Menu.
OR
Where the heck did Apple put the source code of aligning the text in their TextEdit program?
NSTextView inherits from NSText, which implements the alignCenter:, alignLeft: etc. actions.
You can use use the alignment property on NSTextView and set the alignment you want (.justified, .center, .left, .natural, etc)
let textView = NSTextView()
textView.alignment = .justified
or
textView.alignment = .center

How to center a text view with Applescript Objective C?

I have a simple text view (which is inside a scroll view) and for the life of me I cannot make it center the text inside the text view. There is no choice in the inspector to center the text like there is when you use a normal text field. I have tried stuff like:
tell textView to setTextAlignment_(current application's setTextAlignment UITextAlignmentCenter)
But, obviously that fails. How is this done?
Try use:
tell textView to setAlignment_(current application's NSTextAlignmentCenter)