android-tabs

TabWidget not stable at the bottom in Android? Why?

喜你入骨 提交于 2019-12-04 11:50:38
I set my tabWidget at the bottom. When i want to edit the edittext the keyboard will raise up. But the tab widget come above the keyboard. To support for the multiple screen i set the android:layout_weight="1.0". After that, I got this problem i added my layout code below. any idea to make the TabWidget at the bottom stably? Code: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android

How to set height of actionbar tabs for android

痞子三分冷 提交于 2019-12-04 10:36:32
问题 Basically, I want to change the height of the tabs in actionbars. This questions has been asked several times on stackoverflow, for example: ActionBar tabs height I have tried most of the solutions but nothing work, here is my code. <style name="CustomActionBarTheme" parent="@android:style/Theme.Holo"> <item name="android:scrollHorizontally">false</item> <item name="android:paddingLeft">0dp</item> <item name="android:paddingRight">0dp</item> <item name="android:actionBarSize">80dp</item>

Android : Accessing container activity object from fragment using putExtra?

流过昼夜 提交于 2019-12-04 10:23:42
问题 I am building a tab interface using Action bar and fragment. I would need assistance in sending data from container activity to the fragment. To elaborate, I have job object in container activty. And I have created few tabs based on the information in job object (like company details, experience details etc). I need to pass the job object to these fragments so that it can display respective information. I have created container activity and tab fragments. I would need an example on how to

Change image on Tab in TabLayout when Selected

十年热恋 提交于 2019-12-04 08:33:42
I am using Design TabLayout, <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabBackground="@color/ColorPrimary" app:tabIndicatorColor="@color/orange" app:tabIndicatorHeight="3dp" /> I have added customview to Tabs <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null"> <ImageView android:id="@+id/imgTab" android:layout_width="wrap_content"

How to create Toolbar Tabs with ViewPager in material design

ぐ巨炮叔叔 提交于 2019-12-04 08:04:01
Anyone know anything about how tabs are done in API 21/AppCompat Toolbar? A lot of materials and articles what I found were old. They used old methods with ActionBar which don`t work now. At this moment I just created toolbar and have no ideas about toolbar tabs. So can anyone give examples or articles about how to make toolbar tabs with viewpager? Anyone know anything about how tabs are done in API 21/AppCompat Toolbar? There are no Toolbar tabs. The pattern of having tabs in the action bar was deprecated by Material Design, and when they created Toolbar , they dropped tabs. So can anyone

ActionBarActivity and ActionBar.TabListener is deprecated inside Android Tab Fragment ( Eclipse ApI 22 )

假如想象 提交于 2019-12-04 06:48:28
问题 I am implementing the ActionBar.TabListener in My Tab Fragment . I updated the API 22, After updating it showing ActionBar.TabListener and ActionBarActivity is deprecated. Like this i have used in my code public class Tabview_Landing extends ActionBarActivity implements ActionBar.TabListener { } Link help me to solve this. 回答1: ActionBarActivity was replaced by AppCompatActivity . Action bar tabs can be replaced by: TabLayout from the Android Design Support Library, with or without a

Change line color in tabs - ActionBarSherlock

牧云@^-^@ 提交于 2019-12-04 06:06:08
I'm using ActionBarSherlock to make my app compatible with older devices. The implementation was easy, but now i need to style the default Holo blue line that you see under the tabs to a red line. I've been reading a few topics ( topic 1 , topic 2 ) here on SO and also the ABS doc ( link ), but i can't get it to work. This is what i have so far. In my AndroidManifest.xml i added this line to the application tag. <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.Sherlock" > <!-- SET THE DEFAULT THEME --> Then in res/values/styles.xml

Change Color TabSelector on v4 ViewPager

☆樱花仙子☆ 提交于 2019-12-04 03:01:30
Is it possible to change color of selected tab on v4 ViewPager ? I need to use v4 ViewPager, but I don't find any source to customize it. Just to clarify I need to change the blue color to another one: mmBs This is the tab indicator. You can change its color by applying different styles. Use Action Bar Style Generator , generate 9patch png files (tab_selected, tab_selected_focused etc.) and add these files + styles to your project. Another approach -> How to change the current tab highlighter color in Android ViewPager? (as @Pratik wrote in comment). I don't have enough reputation to comment

Android ActionBar: show/hide tabs dynamically?

半世苍凉 提交于 2019-12-04 02:36:39
Is it possible to remove/restore the tab bar from the action bar dynamically? Up to now I did this by changing the navigation mode of the action bar. I used following code to remove and restore the tab bar: @Override public void restoreTabs() { getSupportActionBar() .setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); this.supportInvalidateOptionsMenu(); } @Override public void removeTabs() { getSupportActionBar() .setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); this.supportInvalidateOptionsMenu(); } That works, but there is a big problem: Everytime I call setNavigationMode ,

Add Image or style to each tab

醉酒当歌 提交于 2019-12-03 23:32:28
问题 i have app with many tabs, i want to add image or style to each tab , how please? th = (TabHost) findViewById(R.id.tabhost_template_two_tabs); th.setup(); // all tab spec = th.newTabSpec("All"); spec.setIndicator("All"); spec.setContent(R.id.tab_template_two_tabs_all); th.addTab(spec); // favorite tab spec = th.newTabSpec("Favorite"); spec.setIndicator("Favorite"); spec.setContent(R.id.tab_template_two_tabs_favorite); th.addTab(spec); th.setCurrentTab(1); Thanks 回答1: Try this : Call this from