Tuesday, January 14, 2020

How to Make Blinking TextView Android



Good day guys, It's the second of week on 2020 year. We need a good boost to start every day to do something good way. I listened to many new songs and old song too. It's good to refresh my brain to think. Creating an new article every week it's not easy though. I need a problem to solve haha. Maybe I will share what game that I am playing on the next article.

We can see how many visitor in our blog, for me it's not much people see my posts. But I'm gratefully my post will last long because it stands on Blogger. We know blogger it's so long, and I hope it will be better for the future.

So the article for now, it's about TextView Android. I have an app called To Do List. There's a fragment calendar where you can click the day and you will be directed to the date in list view fragment task lists. So it's very helpful for users to choose where they want to see data according to date. Like images above what I mean about.

For making user friendly app. I give a little bit animation blink, so user will notice where the date of header position. The code for this animation, it's simple. It's just a few lines. So don't expect it's too hard to try. You can customize this animation according to your app wanna be.

This is the code guys.

Tuesday, January 7, 2020

Avoid Whatsapp Share Only Text in UIActivityViewController


Hello guys, this is a good day to start a new resolution because. It's still fresh 2020, we can start doing something new or something that we want to complete when this year ends. I hope I can always write a new article every week with good quality. Thanks for support to be consistence it's hard and easy to do if you are in perservence mode.

If you ever have installed app called instagram or others social media, you will find a share feature. where you can share your photo to others app. Like email, notes or social media. Fortunately iOS provide the feature to share called UIActivityViewController. So it's like we use library in iOS, we just create our text or photo sending to UIActivityViewController. Then it will create share feature like above.

But I have a problem when trying to share on Whatsapp. It just showed text when I sent image and text. Unfortunely Whatsapp only support image or text, not both of them. So we need to choose what's gonna we share. In my case I need to share image without text, so how do I check when the user share on whatsapp spesificaly.

So I created two classes for each items. SocialActivityItem and TextActivityitem, SocialActivityItem for sharing image and TextActivityitem for sharing text. It will extent UIActivityItemSource so in order to be used in activityItems. If you're confused with what I'm talking about, I will provide the code for you guys. Sorry I'm not expert to explain something :D.

So this is the code guys.