Disable a particular row in list view onCreate

by dilu » Wed, 30 Mar 2011 02:21:10 GMT


Sponsored Links
 Hi,
I want to disable a particular row in list view based on some
condition on onCreate.
I can disable the row on itemClick.
But I want to disable that particular row onCreate.

Please provide me some piece of coode.I read in this forum that
override the adapter class but I am confused how to do that?

-- 



Re: Disable a particular row in list view onCreate

by TreKing » Thu, 31 Mar 2011 05:42:32 GMT


 



There's no reason to do this in onCreate - list view rows are created, if
necessary, when shown. That's when you'd disable it.



Um ... no.



Read the documentation and samples to see how to create custom adapters.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Re: Disable a particular row in list view onCreate

by lbendlin » Thu, 31 Mar 2011 08:21:17 GMT


 Think about it from the user's perspective. They see a table row, and they 
expect to be able to interact with it. All you'll achieve is frustrating the 
users.

-- 



Re: Disable a particular row in list view onCreate

by dilu » Sat, 02 Apr 2011 12:54:53 GMT


 Why do I want to disable?
 When list items will get created then I wants to disable a particular
item ,so that user cant interact with that particular row.Conditions I
am checking from the database.Once database will get updated then
again that particular row will become enabled based on some
conditions.But on create I am not able to disable that row.For each
row item I will check the conditions from database.




-- 



Re: Disable a particular row in list view onCreate

by lbendlin » Sat, 02 Apr 2011 20:32:55 GMT


 lists work differently. The process of creating a list cell (and re-using 
it) is de-coupled from the process of updating it. The "disabling" needs to 
be done in the updating part. So when Android asks you to give it this 
particular cell so it can display it you could either try to return null 
(that might backfire) or set the cell's height to zero.

Of course you could disable touch events and key events for that cell but as 
I said before that is bad UI karma.

-- 



Re: Disable a particular row in list view onCreate

by dilu » Sat, 02 Apr 2011 21:29:54 GMT


 Thanks.But my question is how to do that?




-- 



Re: Disable a particular row in list view onCreate

by lbendlin » Sat, 02 Apr 2011 23:34:13 GMT


 Don't know - by reading the listview documentation maybe? 

-- 



Re: Disable a particular row in list view onCreate

by dilu » Sat, 02 Apr 2011 23:48:42 GMT


 oh thanks a lot.




-- 



Other Threads

1. Search Market by Publisher Name

This link describes how to search the Android Market for apps using
various parameters:

http://developer.android.com/guide/publishing/publishing.html

I'm having a heck of a time figuring out how to format a link for my
apps published by my company using this format. For searching by
developer name, the doc says to use the following format:

market://search?q=pub:<Developer Name>

It also says it returns exact matches only. My publisher name is
"Polyclef Software".

I guess I'm wondering why Google can't make a market search feature
that searches for substrings in the publisher's name, but aside from
that, how am I supposed to format the link? Neither of the following
work:

market://search?q=pub:Polyclef Software
market://search?q=pub:Polyclef+Software

I've tried a number of variations now and nothing works. Any ideas?

-- 

2. Kloteran Nexus Mugen 1600mAH

Jgn n1 doang dong J, miley-nya mana.... hauhauhau

--
rc
sent from Pulsar 1.1




Mao?

Japri ke sa...@showcasefever.com

Untuk hrga dan prosedur pre-order

~AJ

--
"Indonesian Android Community [id-android]"

3. Broadcast/notify/messege when app is launched

4. Broadcast/notify/messege when app is launched

5. passing touch events from one Gallery widget to another widget

6. passing touch events from one Gallery widget to another widget

7. stiker ANDROID pissin Apple Sticker