I want to open multiple tabs within one webview. I can manage to load one url at a time. I am understanding that i have to customized my webview to do so. Is it possible, like as my below picture ?
Any suggestion , tutorial or guideline is appreciated.
Tabs are simply not part of WebView, you need to develop such features around it yourself.
E.g. you could use a TabLayout to implement the tabs, and update the state of the WebView according to the selected tab. You can easily find tutorials all over the place detailing tabs.
Related
I'm trying to implement a navigation like in Play Store app or in the VLC app.
In the Play Store app, they use a navigation drawer where you can choose 'apps'. Then it is possible to swipe through 'views' (categories, home, top paid, ...) ( here is a picture to show what I'm talking about)
In the VLC app, they use a navigation drawer (?) in combination with a swipe view (?) for the audio section.
I was searching for a tutorial, but I couldn't find any suitable yet. Most of these tutorials use Fragment's - as far as I know, these aren't able to contain swipe views?
Could someone please give me a hint (in addition it would be nice to see some code) on how to get on with this? Thanks :)
Look into latest design support library, specifically for TabLayout, where you can specify fixed tabs (up to three usually), or swiping ones (many more).
http://android-developers.blogspot.co.uk/2015/05/android-design-support-library.html
There's also an awesome demo of it in an open source app called Cheesesquare.
https://github.com/chrisbanes/cheesesquare
A FrameLayout hosting a ViewPager could be used to achieve this. Just use a LinearLayout at the top of the layout to display your navigation buttons.
The ViewPager will allow the user to swipe through each fragment it contains, you can also set each button's onClick to have the ViewPager automatically swipe to the relevant fragment.
If you want to use TabLayout, look into Google I/O app on github. More specifically, take a look at SlidingTabLayout and SlidingTabStrip under iosched/android/src/main/java/com/google/samples/apps/iosched/ui/widget. Also take at look at this SO thread
I have existed code for two activities(ActivityA and ActivityB).
Now I need to have a another activity, which will act as my first and only screen of my application. This activity will be having two tabs on its header part and I need to display each of my Activity when user press on each tab.
I have done some search on this and found TabAcivity will be suitable choice, but it is deprecated now.
I saw many posts which are suggesting Fragments. But I dont want to change my existing code. Can any one suggest me easy method to incorporate this.
you can use Android Tab Layout with Swipeable Views
here i give Link in this link step by step information given. so i think you can get batter idea from that.
Tab Layout with Swipeable Views
you can also download code from this site and also see video in given sit
i am developing an arabic android application and i have the compatibility package referenced
i have a ViewPager that displays my content but i want to start scrolling the pager view from the right
making the starting page on the far right of the pages.
I don`t think it is easy to do, maybe using java reflection
Another and easier solution is to use your last page like your first page. So at the start you just call:
YourViewPager.setCurrentItem(YourViewPagerSize);
I am developing an app in android in which I need a header and footer through out app while switching between different activities. The header and footer text will change while switching between activities. What would be the best way to achieve this approach? Actually the header will show navigation of app.
I do not want to create them on each next activity. So that when switch between activities only internal content should switch from right to left not the header and footer
This is not possible with separate activities, sorry.
You could recreate what a TabActivity does? So you'll load your activities in your "raiActivity", and instead of having various tabs, you'll have a header and footer.
Check out ActivityGroup for this
May work with
fragments
but i don't know how to explain it to you. Google search tutorials for fragments and even frame layout maube you get what you want. This was the closest i got to answer my questions about something like that.
In my application I want to use 4 tabs and each tab will have more than one screen. So I tried to get this and found there are two ways to do this:
Use ViewFlipper inside every tab.
Use ActivityGroup in tabs.
However, I'm not sure which will be efficient and easy way to do this since I'm a newbie in Android. So please help me.
Please post me some link where I can get sample code related to ActivityGroup.
Activities are self-contained parts of your app, views are used together when they display similar type of data/behavior.
For example if your tab 1 is taking a picture and your tab 2 is showing a map and your tab 3 is sending an email then you're better of using activities as the action are completely different, with different layouts and different behaviors.
If tab 1 is a listview with an rss feed from techcrunch, tab 2 is a rss feed from StackOverFlow and tab 3 is a rss feed from bbc news then use a viewflippers : Same behavior, same actions
THis is simple to implement
Adding Activity Group will be more preffered then adding View Flipper. By this all the code and activity contents are separated and in more manageable form plus its a stable thing to use
I have the same issue but got it totaly RESOLVED Check The Following Link
http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html
Changing the view within the Android Tab Widget
Its The Solution For Me . Hope It will Help You as Well