Questions tagged [android-inflate]

Instantiates a layout XML file into its corresponding View objects

651 questions
0
votes
2 answers

android Error inflating class fragment

I developed one app , in that i have to display map. latitude and longitude i got from the api-web-service. I that have one Custom base adapter to display raw file of all data. My remaining data set very well. But when i used fragment in my raw…
Joseph Mekwan
  • 1,082
  • 1
  • 15
  • 28
0
votes
1 answer

Load image if required in list view?

I have a row layout with image title which gets inflated on a list view. The problem is the image should be of size 80dp x 80dp where there is no guarantee as the image may be null in the DB. So I would like to know how we could check wether…
0
votes
0 answers

Inflate a layout which contains a fragment (an exception will be thrown)

I'm trying to inflate a layout for a RecyclerView which contains a fragment inside. My layout has some tabs and everything is okay for the first time, but if I swipe between tabs, an exception will be thrown. My layout to be inflated (will be…
Alex
  • 1,623
  • 1
  • 24
  • 48
0
votes
1 answer

Android how can I assign custom parameters programmatically to my inflated view?

I've created a material style card for my android application in the file card_layout.xml and here is the code: card_layout.xml: `
user3161756
  • 73
  • 1
  • 2
  • 10
0
votes
1 answer

Error inflating a fragment

I am currently trying to get the hang of sync adapters and trying to get the Google sync adapter example working. I keep getting tons of errors on it. Does anyone have any idea how to fix these or a better functioning sync adapter I could look at? I…
0
votes
2 answers

Radiobuttons in a radioGroup in a multiple rows

Is it possible to create a RadioGroup that will hold radio buttons by 3 in a row? I've checked the internet for an implementation and I found one, but it was not working. The thing is that I need to add them programatically, and they should be…
0
votes
1 answer

Error inflating class in a view

I've already saw questions suggestions but I didn't find my answer. The LogCat throws this error: I/Timeline( 7748): Timeline: Activity_launch_request id:com.miracle.livapp time:45951871 I/ActivityManager( 768): START u0 {flg=0x10000000…
jsertx
  • 636
  • 7
  • 17
0
votes
1 answer

Know which menu resource is inflated

Im my application I inflate different menu resources, like this: public boolean onCreateOptionsMenu(Menu menu) { _menu = menu; if (/* CONDITION */) { getMenuInflater().inflate(R.menu.menu_activity_detail, _menu); } else { …
Luca
  • 823
  • 4
  • 11
  • 31
0
votes
1 answer

CheckBox state with BaseAdapter

I am programming my first android app. For test purposes I show a list of objects (class cElement) at the mainactivity. public class cElement { private Integer Id; private String Name; private String Description; private Boolean…
0
votes
2 answers

Inflating ImageButton programatically changes width & height params to wrap_content. Why?

In my app I'm using android.support.v7.widget.Toolbar. Left half of the toolbar always acts as back button. Right half is different for different activities. Sometimes it's just text, sometimes a button. So I inflate the right half with views…
Pranav Mahajan
  • 2,048
  • 2
  • 23
  • 36
0
votes
3 answers

OnClick on inflated items

In my activity.xml I have a LinearLayout. This LinearLayout contains an inflated layout consisting of four ImageViews. Implementation is something like this: LinearLayout linearLayout = (LinearLayout) findViewById(R.id.ll_template); View view =…
stud91
  • 1,854
  • 6
  • 31
  • 56
0
votes
0 answers

android.view.InflateException: Binary XML file line #40: Error inflating class TextView

I am trying to learn Android Studio to make a program that could run in Android. I try to inflate a FrameLayout into LinearLayout by this way (code at --> HotelListFragment.java): @Override public ViewHolder onCreateViewHolder(ViewGroup parent,…
0
votes
1 answer

listview onitemclicklistener with layoutinflater

I want to open a new Activity when the list items are clicked, I was used a CustomAdapter class for displaying list items with the help of Layoutinfaltor. Here is my code Exercise.class public class Excercise extends Activity { public String…
0
votes
1 answer

Inflating LinearLayout for CursorAdapter

I'm trying to create a view from CursorAdapter. However, when I inflate a layout, I'd like to inflate LinearLayout instead of the whole .xml layout. For example,
diggin
  • 47
  • 6
0
votes
1 answer

cannot find symbol method INFLATE , android studio

I have 2 errors in my code , the first with using INFLATE : if(customerLayout == null){ //INFLATE the Customer Information View LinearLayout leftLayout = (LinearLayout)findViewById(R.id.rightLayout); …
Blue
  • 1
  • 5