android-tabs

ActionBar with NoTitleBar Theme.Holo.Light

筅森魡賤 提交于 2019-12-25 03:06:27
问题 I have an Android tabbed app. I don't want anything else other than the tabs to be displayed at the top of the screen. This works alright, the only problem is that, when launching the app, for a short moment < 1sec, I can see the title bar with the application launcher icon. Why is this happening, is there a way to prevent this? styles.xml <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --

Android - Remove Title Bar (ActionBar)

孤街浪徒 提交于 2019-12-25 02:09:14
问题 Can anyone tell me how to do the following, Remove The App Title bar & keep the action bar. Move Tab Bar(Action Bar) to the bottom of the screen. Remove Swipe Feature from the Tab. 回答1: Do this Myactionbar().setDisplayShowTitleEnabled(false); Myactionbar().setDisplayShowHomeEnabled(false); Where my action bar is the name of your action bar 回答2: you can add android:theme="@android:style/Theme.NoTitleBar" in your manifest file for your activity 回答3: We have to clarify some contents of your

How to add swipe in tabs

拈花ヽ惹草 提交于 2019-12-24 23:40:00
问题 I am using support library to create action bar in my app. I have added actions in action bar thats working perfect. Now I edit tabs below that. But for changing tabs I have to click on tabs. I want to add swipe in this code. But Its difficult for me as I am taking reference from one link thats only show to add tabs and change them with on click on them. So please someone help me to add swipe from screen to change tabs. Code- public class Types extends ActionBarActivity { @Override public

ActionBarActivity with TabHost

╄→尐↘猪︶ㄣ 提交于 2019-12-24 19:16:42
问题 I am developing an app, with minimum sdk level 7 and that's why I use support library and ActionBarActivity to have a proper ActionBar, but also the layout of my page contains four tabs on the bottom of the activity, and as i already extend ActionBarActivity, I cannot extend TabActivity. The problem is when I write public class HomePageActivity extends ActionBarActivity { private TabHost mTabHost; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState

How to go to a specific tab from a different class?

北城余情 提交于 2019-12-24 13:22:34
问题 I have a TabHost Activity with three tabs. On the second tab I have a button, clicking which would open a new Activity class (not part of the TabHost). On clicking a button in the new Activity class, it should return to the Tab 2 of the TabHost class but it returns to Tab 1. How should I fix it? Here is the code in my new Activity class: ImageButton btn1 = (ImageButton)findViewById(R.id.close); btn1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //

Remove Swipe Action from Fixed Tab

我怕爱的太早我们不能终老 提交于 2019-12-24 12:20:05
问题 I created an Android Project with ADT for Android 4+ versions and created a main Activity with "Fixed Tabs + Swipe" (with the wizard)... but i don't need the swipe action, so, how can i disable it in my app? It's possible? Thanks a lot! 回答1: Replace the ViewPager in activity_main.xml with something else (like FrameLayout) and change its id to something sensible, like @+id/activity_root Remove everything related to ViewPager and SectionsPagerAdapter from MainActivity. Use the onTabSelected

Android Keyboard appear after Tabbar

折月煮酒 提交于 2019-12-24 09:54:38
问题 I have four tabs in my home screen and one of them takes user input, I have a two problem one is when open tab activity then android keyboard automatically open and another problem is keyboard coming after tabbar. I already added android:windowSoftInputMode="adjustPan" in my menifetch file I Share My code My createchallan.xml code <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout

Android: How can I change icons size in Action Bar Tabs?

五迷三道 提交于 2019-12-23 16:14:16
问题 I created an Action Bar Tabs activity for my project. I used 3 tabs and I added some icons. But the icons are shown in a small size, even if I downloaded them in 48dp. My code is: <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" /> final private int[] tabIcons = { R.drawable.ic_photo_library, R.drawable.ic_chat, R.drawable.ic_people }; private void setupTabsIcons() { tabLayout.getTabAt(0).setIcon(tabIcons

How to create TabLayout with programmatically in Android

时间秒杀一切 提交于 2019-12-23 05:07:52
问题 In my application i want to programmatically create Tabs in TabLayout for setting Fragments in ViewPager . I want : If celebrityCount > 0 show celebritiesFragments , if celebrityCount < 0 not show this fragments ond more ... For this, i write below code : FullSearchSendData sendData = new FullSearchSendData(); sendData.setKey(fullSearchText); sendData.setLoadImages(true); sendData.setSearchInCelebrities(true); sendData.setSearchInMovies(true); sendData.setSearchInSeries(true); sendData

Strange onPause(), onResume() behaviour in fragments

蓝咒 提交于 2019-12-23 03:23:06
问题 The application has a main activity (MainActivity.java) with three tabs (fragments). I can navigate between them using the swipe left (riht) or clicking on a specific tab. Upon starting the application, the 1st fragment is shown. If I go to the 2nd fragment from the 1st fragment and then back to the 1st fragment, nothing happens (onResume() of the 1rd fragment isn't called), so it doesn't refresh it's content. If I go to the 3rd fragment from the 1st fragment and then directly back to the 1st