How to open all links in chrome custom tabs - android

I'm trying to make an activity which has a few TextViews which in turn,contain hyperlinks. I did this using this tutorial: http://www.android-examples.com/add-hyperlink-in-android-application-through-textview/
I want to make these links open up in chrome custom tabs when they are clicked(similar to Gmail). But I cant find any tutorial that shows how to do so.

It is possible to do it by extending the URLSpan and overriding the onClick method.Here's a gist that contains a sample implementation: https://gist.github.com/andreban/b809ba40454091845dd5

Related

Sliding down activity - Android Material Design App

I've been to make this effect in Android. I've achieved to make a Share Element Intent succesfully but don't have a clue on how to get back to the previous activity by sliding down the second one.
The example of what I'd like to do is this: https://github.com/klinker41/android-slidingactivity/blob/master/preview.gif (But implemented with native resources)
Thank you.
I think you're searching for "BottomSheet",
Please Refer below link
This is for custom create
and
Material guidelines
and
Create Bottom Sheet from This link

How to make custom Linkify android?

Is any library for custom Linkify?. When I click link it need to find link text.i already tried this http://www.javacodegeeks.com/2012/09/android-custom-hyperlinked-textview.html
but it not working good in List view...Thanks for advance.

Create a view something similar to pinterest

I am working on an application related to news feeds where I need to GUI design like Pinterest application as in attachment picture image ,There are thee things (menus) at top like Search , Pinterest and Profile ,I want the same that should be change by swapping and click , User can switch among (search,Pinterest and profile ) top menu by click and swapping .Anyone can guide how I can do it ? I try tab view but unable to add swapping , anyone can guide me better way ?
For such a layout, I would recommend ViewPagerIndicator. Make sure to download the demo application and look at the code of the swipable tabs implementation. That may be exactly what you're looking for.
For an easy customization of the tabs in there, you'll find the Android Asset Studio helpful.

How make option menu like web in android

I make footer that consists images.I want when click on image of footer menu opens like this.(Android)
First and foremost, this is not web and you need to look at methods to achieve this natively in Android.
Read up Android Design Guidelines
Try to use sub-menu, check ActionBarSherlock

How to maintain custom tab on screen and change class without redrawing the tab again?

Let me try to make my question much clearer here. Supposed I have a custom tab created by using buttons and images in XML layout and it looks like this.
Each of these buttons, should call a class. Normally, Intent is used to call new class when onClick. But the whole layout would be redrawn when I call any of the classes via Intent.
Intent intent1 = new Intent(TabBar.this, Favourites.class);
startActivity(intent1);
I tried using TabHost and it worked, but my project requires me to use a custom tab bar.
I also tried the solution to this Dynamically change view inside view in Android, which is similar to what I wanted, (switching layouts and maintaining the tab bar below it), which worked as well.
My goal is to maintain the custom tab that I have, and change the classes instead of layout without redrawing the custom tab bar everytime I click on every buttons. With classes, I can run different functions and call different activities.
I googled a lot on this but couldn't seem to find a solution or reference. Can somebody guide me? Thanks in advance.
Update :
I'm new in Android, and after attempting many times, I decided to try out codes from AdilSoomro to achieve what I wanted, http://adilsoomro.blogspot.com/2011/06/iphone-like-tabs-in-android.html which is to create custom tabs that looks like iPhone tabs. However, this project uses TabActivity that is now deprecated in Android 4.1. I attempted to change it to FragmentActivity after referring to other sources that uses Fragments for tabs.
http://android.codeandmagic.org/2011/07/android-tabs-with-fragments/
http://thepseudocoder.wordpress.com/2011/10/04/android-tabs-the-fragment-way/
I managed to create it using FragmentActivity and here is where you can refer to them :
How to use custom iPhone tab in FragmentActivity?
You can use TabHost control to achieve this. Go through this post
It explains all the possibilities. It also includes using custom tab bar defined in the xml file.
One of the way to achieve this is create footer and use it in all your activity. Like This. And Let me know its useful as per your requirement or not.

Categories

Resources