Questions tagged [android-inflate]

Instantiates a layout XML file into its corresponding View objects

651 questions
7
votes
4 answers

Firebase Crashlytics reports InflateException: ResourceNotFoundException for a Trend TaintArt for 4x6

My app is failing on a Trend TaintArt for x86 running Android 7.1.2 when it tries to inflate a layout containing an ImageView. The crash reports that the Drawable doesn't exist: Yet, the Drawable (ic_list_white) is present: Odd thing is, this…
7
votes
3 answers

AsyncLayout Inflation for Recyclerview

I am working with two recyclerview in single screen(For android TV).Each recyclerview have complex layout item.And it's taking time to load.I worked with asynclayoutinflator in activities. AsyncLayoutInflater inflater = new…
7
votes
2 answers

Persisting SplashScreen until react native bundle is loaded in android

I followed android guide in this article How to Add a Splash Screen to a React Native App And got to the point where I have my SplashScreen activity launching before my main activity i.e. while android app is inflating. So far so good, but there is…
Ilja
  • 44,142
  • 92
  • 275
  • 498
7
votes
2 answers

InflateException when using chrisjenx CalligraphyLayoutInflater , android.view.InflateException

Hi So in our project we are using calligraphy library , it works with no issues but now in one of the activity i added it keeps crashing with the following stacktrace: 01-23 02:25:32.178 3654-3654/? E/AndroidRuntime: FATAL EXCEPTION: main Process:…
amIT
  • 664
  • 13
  • 27
7
votes
4 answers

AsyncTask in a Loop In Android

I am creating a app that will update the weather details of the city.The loop will be a List of City .So i want as much the cities are in there in the List.I will use the AsyncTask method to send the request and parse it.And at the same time i am…
user2568702
7
votes
1 answer

inflating layer-list of shapes in android

I have the following file in my drawable folder called /drawable/mybkg.xml. I want to inflate it so I can change the colors programmatically. Is that possible in Android?
Cote Mounyo
  • 13,817
  • 23
  • 66
  • 87
7
votes
1 answer

Efficiently creating a LayoutInflater

My question is what is the best way to create a LayoutInflater instance? Is there any difference between LayoutInflater inflater = LayoutInflater.from(context); and LayoutInflater inflater = (LayoutInflater)…
overbet13
  • 1,654
  • 1
  • 20
  • 36
7
votes
1 answer

Android View Lifecycle

I am using the SemiClosedSlidingDrawer in my app. Quick explain: Sliding drawer has handle and content part The content part is partially opened at view creation Problem: When I create view the content part is inflated and cached then showing…
Mahendran
  • 2,719
  • 5
  • 28
  • 50
6
votes
2 answers

Error inflating fragment from layout android-support-v4

I'm having troubles working with fragments to the 2.2 platform. I imported the android-support-v4.jar library to support fragments. I tried to change the target to Honeycomb 3.0, and the code works. So, I wanna know if there exists a way to work…
6
votes
4 answers

Android: Changing layout in same activity

In my application's main layout I have a button of Search task. Now when user clicks that button I want to change the layout xml file to search_layout.xml. I don't want to create a new activity for Search task and want to use my activity_main.java…
6
votes
2 answers

Manually inflating custom view yields different layouts for ActionBar custom view

Custom view from resource: // Set up the action bar. final ActionBar actionBar =…
ilomambo
  • 8,290
  • 12
  • 57
  • 106
6
votes
1 answer

Android floating view across activities

Requirement I have an application with 2 activities, say A and B, with navigations like A->B and B->A (on back press). My requirement is I want a view/layout floating on screen, irrespective of which activity is currently visible. I inflate this…
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
5
votes
2 answers

IllegalStateException of toast View on Android P preview

While trying to release my app for production, the pre-launch report notified me of an error on Pixel 2 Android P Preview device. The error is related to a custom toast message I have, saying that a View "has already been added to the window…
5
votes
3 answers

Popping up a Dialog from a non-UI thread

I'm developing a network app, which is group oriented. The thing is that when I'm about to join a group, it first checks if the group is secure, and if so, it asks for user and password. Getting group security may take a couple of seconds so I spawn…
Pedriyoo
  • 1,259
  • 4
  • 16
  • 26
5
votes
1 answer

Using android Inflate outside of onCreateView

I have a fragment. In my On create I do set my inflater as follows. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { v= inflater.inflate(R.layout.dashboard_two, container, false); …
Jonathan
  • 545
  • 1
  • 8
  • 27
1 2
3
43 44