Android Tab Navigation Bar Example;
android tab host navigation bar example look like iphone navigation bar.
it's very usefull for page navigation very easyly and you can inside tabview GroupActivity.
Drawable d = getResources().getDrawable(R.drawable.setting_onclick);
ImageView img1 = new ImageView(this);
img1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.FILL_PARENT));
img1.setPadding(20, 10, 20, 10);
img1.setImageDrawable(d);
homeTabSpec.setIndicator(img1).setContent(mainActivity);
d = getResources().getDrawable(R.drawable.setting_onclick);
img1 = new ImageView(this);
img1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
img1.setImageDrawable(d);
img1.setPadding(20, 10, 20, 10);
signinTabSpec.setIndicator(img1).setContent(mainActivity1);
tabHost.addTab(homeTabSpec);
tabHost.addTab(signinTabSpec);
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false" android:drawable="@drawable/settingstrans"/>
<item android:state_selected="true" android:drawable="@drawable/settings_onclick" />
</selector>
dowload source code here
android tab host navigation bar example look like iphone navigation bar.
it's very usefull for page navigation very easyly and you can inside tabview GroupActivity.
adding tab to tab host;
Drawable d = getResources().getDrawable(R.drawable.setting_onclick);
ImageView img1 = new ImageView(this);
img1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.FILL_PARENT));
img1.setPadding(20, 10, 20, 10);
img1.setImageDrawable(d);
homeTabSpec.setIndicator(img1).setContent(mainActivity);
d = getResources().getDrawable(R.drawable.setting_onclick);
img1 = new ImageView(this);
img1.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
img1.setImageDrawable(d);
img1.setPadding(20, 10, 20, 10);
signinTabSpec.setIndicator(img1).setContent(mainActivity1);
tabHost.addTab(homeTabSpec);
tabHost.addTab(signinTabSpec);
style for onpress tab.
<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false" android:drawable="@drawable/settingstrans"/>
<item android:state_selected="true" android:drawable="@drawable/settings_onclick" />
</selector>
dowload source code here
Thx Vijay. I was looking such in my next project.
ReplyDeleteThx Vijay. I was looking such in my next project.
ReplyDeleteThank you...
Deletebro i want to code of this application .....
Deletebro i want to code of this application .....
ReplyDeleteHey just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue.
ReplyDeleteI've tried it in two different browsers and both show the same outcome.
Take a look at my site; cash advance form
I every time used to read paragraph in news papers
ReplyDeletebut now as I am a user of web therefore from now I am using net for articles or reviews,
thanks to web.
Here is my page ... I agree with that