Questions tagged [android-inflate]

Instantiates a layout XML file into its corresponding View objects

651 questions
-1
votes
1 answer

Android I cannot inflate custom view

I create a custom view for actionbar.When i use is ok.However ,when i use LayoutInflater to inflate the view ,it cannot inflate it .Here is my code public class TitleLayout extends LinearLayout { // private Button…
-1
votes
1 answer

Android view inflate error

I want inflate a view from a xml, just like this : View textView = LayoutInflater.from(context).inflate(R.layout.item_classify_left, null); But I got a error on the code: android.view.InflateException: Binary XML file line #2: Error inflating class…
L. Swifter
  • 3,179
  • 28
  • 52
-1
votes
2 answers

Inflate a layout in a layout Android

I'm trying to inflate a layout in another layout but it doesn't work... In my activity I show activity_serie.xml which is black, and then I try to inflate on image_item.xml which is white. But I never see image_item.xml. public class Serie extends…
-1
votes
1 answer

Android Inflate Layout With its Own Activity

Good Day everyone.I have searched internet and hardly found that it can't be like that but i really can't believe.So i decided to ask here whether is it possible to inflate layout which will have its own activity i mean JAVA CLASS where i would type…
-1
votes
3 answers

InflateException: Binary XML file

this is the error that i've got 12-05 13:26:18.102: E/AndroidRuntime(10101): FATAL EXCEPTION: main 12-05 13:26:18.102: E/AndroidRuntime(10101): Process: com.example.project_1_4, PID: 10101 12-05 13:26:18.102: E/AndroidRuntime(10101):…
-1
votes
1 answer

How to let an image define the layout's with in Android

I want an image to define the layout's bounds and need all other elemets to oriente themselfes to it. My problem here is that i want the text to wrap, when it reaches the images end. Any idea how to solve this via layout xml or do I have to…
-1
votes
1 answer

Unable to get my Android XML file to Inflate via fragments

Good day StackOverflowians, I have question about an Android App I am working on. I am using the tutorial from the guide at this link here: http://www.jamesfroggatt.com/2014/04/892/ While the fragments themselves are visible, I cannot seem to get…
-1
votes
1 answer

select from parse not show the values in list view android

i have this code which onlt select from parse all the data, afer it succedd i wish to show this data in a view i made for it, when i set all the text views it shows this in my app : this is my code : protected void onCreate(Bundle…
spinker
  • 298
  • 4
  • 20
-1
votes
2 answers

Inflated Fragment not consuming all the space

So i have recently been working on switching my application over to using Fragments to make it a bit more flexible. One thing I have noticed is that when I inflate my fragment view, it is not taking up the entire screen, there is still a gap at the…
Rob
  • 1,162
  • 2
  • 18
  • 43
-1
votes
2 answers

Inflating a layout on listitem click to get the custom view from array

Ok, I am facing a problem while inflating a layout for listitem click. I am very new to android so please consider me in learning Phase. I have successfully implemented the customize listview after 1 day of effort. As I told, I am newbie. But now I…
Diljeet
  • 21
  • 9
-1
votes
1 answer

how can i add only unique contact in my list in android

all..i have made a demo in android in that i have opened intent of addressbook and in my "onActivityResult" i am binding Contact name to List,All is going well but problem is i want ,if 1 contact name isalready added it shouldnt be added again ,my…
jigar
  • 1,571
  • 6
  • 23
  • 46
-2
votes
1 answer

How to write a Custom Alert inside a Non activity class in Android?

I have to write a custom alert on a nonactivity class to show that from all activities. I have used inflater for the custom alert but it crashes the app. Please see the below code.Please suggest a solution for this AlertDialog.Builder…
-2
votes
2 answers

Android - Inflating a view in a layout makes my layout transparent - How to stop this?

I am trying to inflate a view beneath my layout, but my to layout becomes transparent. Any idea why? Here is my mainActivity: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) …
RFM
  • 107
  • 7
-2
votes
1 answer

getMenuInflater().inflate(R.menu.my_menu, menu); error unreachable statement

I am new to Android programming and I need some help for an error getMenuInflater().inflate(R.menu.main, menu) which says unreachable statement. please help me with this error.
Bikal Rokaya
  • 11
  • 1
  • 2
-2
votes
1 answer

Unable to interact with views in fragment activity

Hi I am given an assignment to create contents in the fragment basic layout. However having create a swipe activity with tab action bar, i am unable to edit the fragment layout within each given tab. Here is the codes as follow : MainActivity.java :…
1 2 3
43
44