Skip to main content

Posts

Showing posts with the label android-listview

Image is not fit into QuickContactBadge

I have create a listview of Contact numbers , the list item contains the QuickContactBadge and TextView now whenever i tried to load image into QuickContactBadge it does not get fit into the QuickContactBadge Frame and at the same time QuickBadgeContact itself will also get shrink. Rite now i have this What i am trying to achieve is so not only image but even i am trying to make QuickContactBadge of a normal size here is my code that i am using Uri contactUri = Uri.withAppendedPath( ContactsContract.Contacts.CONTENT_URI, String.valueOf(contactId)); InputStream input = ContactsContract.Contacts.openContactPhotoInputStream ( getContentResolver(), contactUri ); cache.photoView.setImageBitmap(BitmapFactory.decodeStream(input)); My Layout for list item <QuickContactBadge android:id="@+id/badge" andro

ListView doesn"t stop on finger up?

I have a listView which defined like this in xml: <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="150dp" android:layout_x="4dp" android:layout_y="183dp" android:cacheColorHint="#00000000" android:fadingEdge="vertical" android:enabled="true" > </ListView> Everything's just fine, but in a strange way if user wants to scroll the list down to see other items and gets his finger up list turns back to top ? It's just not stopping where user scrolled... Why could it be happening? Thanks for help in advance...

Crash when switching to ListView?

I have a normal LinearLayout for my main.xml , and my second activity is a ListView . I have a button on main.xml that should take me to the ListView . I get an Unexpected Error message and have to force close when I press the button. Main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="1" android:background="@drawable/forzabg"> <ImageView android:id="@+id/mainlogo" android:layout_width="210dp" android:layout_height="119dp" android:layout_gravity="center" android:layout_weight="0.00" android:scaleType="fitXY" android:src=&q

Header always shows in android-pulltorefresh when customize

I was trying to customize android-pulltorefresh library developed by Johan Nilson. I wanna use my own adapter rather than a String array. I was able to complete almost every thing but the pull to refresh header is always visible. (see the image) I want it to visible only when I pull the listview like it does with the demo app. I compared my code with the demo but I couldn't find any difference between them which effect layout. Thanks in advance !