layout-inflater Questions
5
Solved
There is a way to get layoutInflater:
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
and another way is:
LayoutInflater inflater = LayoutI...
Malachite asked 8/1, 2014 at 11:45
15
I'm trying to change the default color for the options menu which is white: I want a black background for every item on the options menu.
I've tried some shoots like android:itemBackground="#00000...
Rundgren asked 31/5, 2010 at 14:44
5
Solved
I created an app which uses this hdodenhof CircleImageview library.
My app works fine on Android 7 and 7.1 but it is crashing in lower versions such as marshmallow/Android 6. How can I solve this p...
Glazing asked 29/4, 2018 at 12:15
3
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.
AsyncL...
Altheaalthee asked 5/12, 2018 at 11:18
15
Solved
I have a layout defined in XML. It contains also:
<RelativeLayout
android:id="@+id/item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
I would like to infl...
Forklift asked 25/2, 2010 at 16:47
11
Solved
I get the lint warning, Avoid passing null as the view root when inflating views with null as parent, like:
LayoutInflater.from(context).inflate(R.layout.dialog_edit, null);
However, the view is...
Pargeting asked 16/10, 2014 at 12:51
7
Solved
I have placed setHasOptionsMenu(true) inside onCreateView, but I still can't call onCreateOptionsMenu inside fragments.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup contai...
Carolanncarole asked 27/3, 2013 at 7:31
29
Can I change the background color of a Menu item in Android?
Please let me know if anyone have any solution to this. The last option will be obviously to customize it but is there any way for chan...
Gittle asked 19/8, 2010 at 6:29
4
Solved
Trying to inflate a custom layout for an AlertDialog, but keep getting this waring. I've seen several different solutions to this but don't know which is correct for my scenario. What is the actual...
Whiffen asked 31/7, 2017 at 15:20
1
I have successfully inflated my layout in a service, however it's not displaying the ImageView inside the Inflated Layout and I have no idea why. I set an onClickListener on the imageview and it wo...
Agave asked 25/6, 2021 at 8:39
9
Solved
My questions are:
What is exactly the function of the LayoutInflater?
Why do all the articles that I've read check if convertview is null or not first? What does it mean when it is null and what ...
Alessi asked 12/4, 2012 at 8:38
21
Solved
I have a horizontal LinearLayout containing a TextView followed by a Spinner next to it. This LinearLayout is dynamically inflated multiple times in a fixed vertical LinearLayout contained within a...
Cleo asked 28/6, 2012 at 11:42
2
I am getting a crash on Android Lolipop.
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.res.StringBlock.get(int)' on a null object referen...
Pertussis asked 25/11, 2015 at 11:20
12
The LayoutInflater.inflate documentation isn't exactly clear to me about the purpose of the attachToRoot parameter.
attachToRoot: whether the inflated hierarchy should be attached to the root p...
Asberry asked 24/9, 2012 at 14:55
7
Solved
Passing null for root studio gives me this warning:
Avoid passing null as the view root (need to resolve layout parameters on the inflated layout's root element)
It is showing a null value in ...
Bulley asked 18/7, 2014 at 19:34
6
Solved
What does need to be imported or how can I call the Layout inflater in places other than activity?
public static void method(Context context){
//this doesn't work the getLayoutInflater method cou...
Adham asked 18/10, 2011 at 7:23
1
I have an android customView which I want to test.
Few of the tests simulate a scroll of N dps when N is a subView height.
I run the tests with robolectric, but I always get in runtime that subVi...
Thermomagnetic asked 6/5, 2019 at 17:54
15
Solved
What is the use of LayoutInflater in Android?
Tomika asked 13/8, 2010 at 13:46
1
Solved
Update: I've changed the title to remove the indication that ExoPlayer has anything to do with what is going on as I've managed to duplicate this without it being used at all.
I decided to try and...
Myasthenia asked 13/2, 2019 at 5:1
1
Solved
It occurred to me while using AppCompat, that I had been using things like Button instead of android.support.v7.widget.AppCompatButton within my layout XML files. I did a test, via view.getClass()....
Rockingham asked 7/2, 2019 at 14:1
5
I'm trying to do something I do with activities, but within a fragment.
What I do is using activities:
First stop the activity restarts when rotating the device
android:configChanges="keyboardHidd...
Lordsandladies asked 29/4, 2013 at 15:40
2
Solved
I was wondering what is the difference between the following:
binding = DataBindingUtil.inflate(inflater, R.layout.drawer_item_primary, parent, false);
vs
binding = DrawerItemPrimaryBinding.inf...
Rewire asked 17/8, 2018 at 10:34
1
Solved
What exactly is a LayoutInflater in Android? What is the intended method to use it? I could find different types of usage but unable to find which one suites in my case.
About the question
I ...
Peseta asked 7/8, 2018 at 14:18
4
I have created a row inside recycler view and inside that I have inflated two rows or more but when I scroll the items are getting used again.
I am not getting where to recycle view or remove them ...
Battologize asked 24/10, 2015 at 9:57
4
Solved
Setting text on multiple inflated EditTexts causes all to be populated with same text after rotation
I am inflating a few EditTexts and adding them to a LinearLayout:
private void setupCommentViews(){
int i = 0;
Iterator<CommentInformation> iterator = commentInformations.iterator();
whil...
Hypnotism asked 2/4, 2014 at 0:52
1 Next >
© 2022 - 2024 — McMap. All rights reserved.