android-tabhost

InputMethodManager holds reference to the tabhost - Memory Leak - OOM Error

强颜欢笑 提交于 2019-12-22 03:42:26
问题 View hierarchy is as follows TabActivity -> ActivityGroups -> Activities . Using MAT I found that TabWidget is referenced by TabHost which is referenced by InputMethodManager , hence TabWidget is leaked. On Subsequent launch of application OutOfMemory Error is thrown. Similarly all my activities are also referenced by InputMethodManager . (After closing the application all my activitygroups, activities, tabactivity, tabhost and tabwidget are leaked!!) On Properly finishing the application

ViewPager inside Fragment loses content when returning to it

懵懂的女人 提交于 2019-12-21 09:34:51
问题 I am implementing tabhost using FragmentActivity , under the first tab i load a welcome fragment that contains a Viewpager and CirclePageIndIcator , I need to load 4 views in side that WelcomeFragment this is my WelcomeFragment public class WelcomeFragment extends Fragment { PageAdapter mAdapter; ViewPager mPager; CirclePageIndicator mIndicator; List<Fragment> fragments; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view =

error with google maps v2 in tab (MapFragment in Fragment)

这一生的挚爱 提交于 2019-12-21 05:23:10
问题 I have a fragmentActivity where I build a tabHost and in each tab there is a Fragment. Well, I haver four tabs 3 with info and 1 with a fragment where is included a google-map-v2 (is a fragmentMAp in a Fragment because I want to add buttons etc.), when I select one tab and pass to other everything go well, but when I select the map tab, after that other tab and again the map tab an error is throw. My view seems like: |__||__|__|__| | __________ | || FRAGMENT || ||_____ _ || || FRAG| |_||| ||

can anyone give sample code for TabHost in Android?

强颜欢笑 提交于 2019-12-21 02:05:05
问题 I need sample code to create TabHost in android. can anyone help me. 回答1: The Android Developer site has an excellent fully worked code sample for creating tabs in Android using the TabWidget and TabHost . Check out Hello, TabWidget. 回答2: I had done tabhost related code with respect to displaying scores TabHost host = getTabHost(); host.setup (); TabSpec allScoresTab = host.newTabSpec("allTab"); allScoresTab.setIndicator(getResources().getString(R.string.all_scores), getResources()

Tab with icon using TabLayout in Android Design Library

感情迁移 提交于 2019-12-20 12:35:12
问题 I'm trying to use the new TabLayout in the android design library to create app bar with icons only. like this: how can I do it using the new TabLayout Android Design Library. is there a simple solution for this, or i have to use the setCustomView only. i'm trying to avoid using it. because i didn't get the tint color for the icon like this image above. i try to write like this: tabLayout.addTab(tabLayout.newTab().setIcon(R.drawable.ic_dashboard)) but the icon still stay in the same color

Tab content disappeared after change page

╄→尐↘猪︶ㄣ 提交于 2019-12-20 12:31:08
问题 I have a weird issue with my Tab (TabHost or TabContent) in my Fragment that contains a ViewPager. The problem is that when I change the page, then I turn back to the fragment with tab and viewPager, my content or view disappeared. -> Here's my code for TabFragment package com.halo.mobi.fragment; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android

Tabhost error in getting in to my activity

删除回忆录丶 提交于 2019-12-20 07:47:12
问题 When I am trying to get the tab host in my activity it is showing the error that do you forget to call public void setup(LocalActivityManager activityGroup) ? public class MainActivity extends FragmentActivity { private Resources res; private TabHost tabHost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // tabHost = getTabHost(); TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost); tabHost

use tabhost by extending MapActivity

醉酒当歌 提交于 2019-12-20 07:25:53
问题 main.xml <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"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="5dip"> <LinearLayout android:orientation="vertical" android

use tabhost by extending MapActivity

大兔子大兔子 提交于 2019-12-20 07:25:19
问题 main.xml <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"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="5dip"> <LinearLayout android:orientation="vertical" android

ProgressDialog in TabHost application ofandroid

江枫思渺然 提交于 2019-12-20 04:19:47
问题 I want to use the Progress Dailog in my application. I am facing one issue in doing it, after some RnD I came to know that it is not quite possible to create the progress Dialog I have the Activity Group Class for the TabHost in the application. I have exactly the same scenario, I have the TabHost in my application and an ActivityGroup Class that has the TabHost Classes. So, when I try to create the Progress Dialog for the Class that is in the Activity Group Class I cannot create it. But if I