Questions tagged [getview]

To be used with the android tag. Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Add any other tags relevant to the question.

To be used with the . Refers to the getview(int position, View convertView, ViewGroup parent) method in the adapter class and other methods related to this. Use any other tags that are relevant to the question.

247 questions
0
votes
1 answer

Issue with ImageButton onClickListener in baseAdapter

I have ImageButton in view holder which is in base adapter. I set image for ImageButton in GetView. It is working fine. And I set onClickListener for that ImageButton. So, Now when i click that ImageButton I need to change the background image of…
0
votes
2 answers

Populate ArrayList with views when using a Spinner-object

I have been working pretty much with ListViews and ExpandableListViews in android. And I know how to populate the listviews with images and text by making one customAdaper - and adapterclass extending for instance Arrayadapter. In this app I am…
user3155478
  • 975
  • 1
  • 10
  • 16
0
votes
0 answers

edittext doesn't work on one click when it's in iconic adapter

I'm trying to input some text in the EditText object. but It doesn't work well. I think it's due to iconic adapter. At once I click it, it loses its focus immediately. What am I supposed to do? private String[] items = {"A", "B", "C", "D"}; …
0
votes
1 answer

Android custom adapter getView() NullPointerException

I am trying to create a grid view which has an Imageview.I tried to extend BaseAdapter but i struck with the problem ,I will be glad if someone can point out the mistake i am doing. Logcat: 07-10 19:29:00.881: D/AndroidRuntime(1678): Shutting down…
Bhavin Chowksi
  • 105
  • 3
  • 8
0
votes
1 answer

Couchbase .NET SDK GetView returns empty result on first call

# creating the view var designDocContents = @"{ ""views"" : { ""all_docs"" : { ""map"" : ""function (doc, meta) {\n emit(doc.name, [doc.version, doc.type, doc.date]);\n }"" } } }"; var result =…
the_jov
  • 185
  • 1
  • 2
  • 8
0
votes
2 answers

images not appearing in gridView but after keyboard actived

i have two activites,transporting arraylist imageurls to activity AddProductActivity from activity Sdcard. The Sdcard.java code is: public class Sdcard extends Activity { private ArrayList imageUrls; private…
Giggle
  • 7
  • 5
0
votes
1 answer

Android ListView tries to reuse visible cell after setImageBitmap call with async downloaded bitmap

I have very strange behavior when ListView adapter provides into getView method the same convertViews even if all of them are visible: getView(); 0; holder: ViewHolder@4289bde8 getView(); 1; holder: ViewHolder@4289bde8 getView(); 4;…
goRGon
  • 4,402
  • 2
  • 43
  • 45
0
votes
2 answers

App crashes on findViewById()

So I have a ListView in my activity_main.xml. Also a TextView in a different xml da_item.xml. The textview is for the individual listview items. Now in my code there is a onContextItemSelected() function which calls bucketMarkItem(long itemTitle).…
MetalMonkey
  • 17
  • 1
  • 9
0
votes
0 answers

getView() getting called only 3 times when getCount() returns 9 on 7 inch Tablet Portrait mode when using Sraggered GridView

I am trying to implement StaggeredGridView in 7 inch Samsung Tablet, but it is only displaying 3 items out of 9 when column count is set to 2. It displays 4 items out of 9 when column count is set to 3. The same thing works fine in phones but in 7…
0
votes
1 answer

How to get a reference to components inside PreferenceActivity

I need to get a real reference to the components inside PreferenceActivity. CheckBoxPreference myPref = (CheckBoxPreference) findPreference("setting1"); View v = (View)myPref.getView(null, getListView()); This code returns the view I want, but it…
0
votes
2 answers

fragment.getview() always return null when called in an activity

I have this problem where the fragment.getView() always returns null when called inside another activity despite the fact the the onCreateView method was overriden in side the fragment. For example: In my activity: frag = new NewBooksFrag(); In my…
Quinn Wei
  • 2,183
  • 3
  • 14
  • 12
0
votes
1 answer

black box robotium, targeting an element is problematic if they have the same id

Im hoping someone can help me out with this, in ddms hierarchy is as follows: (0) ListView (0) LinearLayout (0) LinearLayout (0)TextView:Value 1 (1)TextView:Value 2 (2)TextView:Value 3 (1)View …
Mozzy
  • 3
  • 2
0
votes
1 answer

Do/can I add ListView section headers in the GetView method?

In Xamarin, I have a ListView adapter with the following GetView method: public override View GetView(int position, View convertView, ViewGroup parent) { var item = items[position]; View view = convertView; if (view == null) view…
user3548779
  • 321
  • 2
  • 8
  • 19
0
votes
1 answer

Android get value from database by ArrayAdapter getview()

Im creating a listview with a progressbar and some text. i got a problem on how to take a database value from sqlite to .onProgressUpdate(value) here are my code with problem class ProfileProgressArrayAdapter public class ProfileProgressArrayAdapter…
0
votes
1 answer

Inflating a view Vs formatting view items

So i have a listview that i want to populate with headers and a view layout with some images and some text. What is the most performance efficient way to go about this? Inflate a layout for the header and another for the normal view or use the same…
user3629714