ListView item click can't work

by a a » Mon, 16 May 2011 10:30:03 GMT


Sponsored Links
 Dear All,

Why the following function can't work when i click the listview item?

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id)
    {
        Log.d("aaa", "onListItemClick" + position);
    }

-- 



Re: ListView item click can't work

by a a » Mon, 16 May 2011 11:31:28 GMT


 <LinearLayout xmlns:android=" http://schemas.android.com/apk/res/android" ;
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:orientation="horizontal"
    android:paddingRight="6dip"
    android:paddingLeft="6dip"
    android:paddingTop="5dip"
    android:paddingBottom="5dip"
    android:gravity="center_vertical" >

    <ImageView android:id="@+id/app_icon"
        android:layout_width="@android:dimen/app_icon_size"
        android:layout_height="@android:dimen/app_icon_size"
        android:layout_marginLeft="5dip"
        android:layout_marginRight="11dip"
        android:layout_gravity="center_vertical"
        android:scaleType="fitCenter"/>

    <RelativeLayout android:layout_width="0dp"
        android:layout_weight="0.7"
        android:clickable="true"
        android:layout_height="wrap_content">
        <TextView android:id="@+id/app_name"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textStyle="bold"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:layout_alignParentLeft="true"
            android:layout_marginBottom="2dip" />

        <TextView android:id="@+id/app_size"
            android:layout_marginTop="-4dip"
            android:layout_gravity="center_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/app_name"
            android:textAppearance="?android:attr/textAppearanceSmall" />
    </RelativeLayout>
        <CheckBox android:id="@+id/btnCheckbox"
            android:focusable="false"
            android:focusableInTouchMode="false"
            android:layout_width="46dp"
            android:layout_height="46dp"
            android:layout_alignParentRight="true"
            android:layout_marginTop="7dp"
            android:layout_marginRight="0dp"
            />
</LinearLayout>

2011/5/16 a a <harvey.a...@gmail.com>:

-- 


Sponsored Links


Re: ListView item click can't work

by Justin Anderson » Tue, 17 May 2011 04:57:11 GMT


  don't see a listview in your xml....

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Sun, May 15, 2011 at 9:31 PM, a a <harvey.a...@gmail.com> wrote:


--



Re: ListView item click can't work

by a a » Tue, 17 May 2011 09:46:23 GMT


 his xml is listview's item view,

listview created by java code set with Adapter


2011/5/17 Justin Anderson <magouyaw...@gmail.com>:

--



Re: ListView item click can't work

by Justin Anderson » Wed, 18 May 2011 21:08:10 GMT


 k, so what does that code look like?
On May 16, 2011 7:47 PM, "a a" <harvey.a...@gmail.com> wrote:
long

--



Re: ListView item click can't work

by Rajesh Kumar » Thu, 19 May 2011 02:50:48 GMT


 i All,

Do you own an iphone, iPad, iPod or any other other device like Samsung,
HTC, blackberry etc?
Have scared about scratches on your device?
Want to protect your Device?

Then You just buy your scratch proof guard here, Its highly recommended.

http://goo.gl/gHixr


Testimonials:

"A MUST HAVE for all iPhone4 users. I loveeee it. Everyone at home is using
Stealth Guards. I'm going to buy more! =)" -Abbie

"Fit perfectly, totally invisible, very, inexpensive. Very simple to apply
after soak for few second in a glass of water with some drop of soap."
-Achille


http://goo.gl/gHixr



Regards,
Prabhu
iPhone Lover.


If you want unsubscribe from my mail, Just reply Unsubscribe in Subject.

On Wed, May 18, 2011 at 6:37 PM, Justin Anderson <magouyaw...@gmail.com>wrote:


--



Other Threads

1. Info: Understanding self signed jar files (like the apk files)

A number of facets in Android depend on signing the .apk file. Some of
the features are available when jar files are signed with the same
signature.

However if you are new to digital signing process, it can be a bit confusing.

Here are some notes I have kept to clarify the digital signing process
by drawing parallels to physical world signatures. I hope these notes
help clarify the mental picture of signing digitally.

You can see the write up at

http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3493&ownerUserId=satya

For a quick read, here is the same material repeated in text format

*******************************************
Understanding self signed jar files
*******************************************
It is often, occasionally followed by a wave of hand, that one advises
or talks of "jar" (packaged java files that makes up an application or
module) files as being signed.

Few times we ask back: "What do you mean by signed"?

What does it mean for a jar file to be signed?

Does this signing has parallels to how we sign physical documents? Do
they differ? How do they differ if they do?

How do you establish a "pattern? of understanding for digital
signatures so that you treat the subject abstractly just like when
someone says they signed a physical document?

*******************************************
Understanding first: Wine collector and his caskets of wine
*******************************************

Imagine you are a wine collector located in a very un-wine-like place
such as Sahara desert. And farmers around the world are sending you
wine caskets either to archive sell etc. For a moment think that they
are not doing it for money. So they will not expecting anything in
return.

What the wine collector notices is that each casket he receives and
the wine inside it has a specific hue and color that is distinct from
another. On further investigation she finds out that if two caskets or
wine inside them has the same hue then it ALWAYS comes from the same
farmer. On digging further the collector finds out that each farmer
has a "SECRET HUE RECIPE? that she locks up in a cellar and never
reveals. This explained why each wine is different and that if two
wines have same hue they MUST COME from the same farmer.

So the hue becomes a signature of the farmer. And that the farmer
hides the signature from everyone else. Like a family stamp.

An important distinction in this example is there is no way for the
collector to know "WHICH? farmer sent the wine. For example there is
no name, or address associated with that signature. Even if there were
it is quite possible that another wine farmer could send by copying
that address. The collector will then assume that these two wine
caskets that came to her with the same address but clearly has two
different hues, that there are two farmers at the same address with
the same name but never the same wine.

*******************************************
Where do they differ from real signatures
*******************************************

When I or you sign a document and send it to say to IRS, IRS assumes
that you are sending the right information such as phone and address
and Social. If two applications are received with the social but
signatures are distinct IRS will have to verify your signature with
the card that THEY issued.

Same thing with banks. The banks have your signature to verify.

In cases where they don?t preregister your signature they will have to
come to you as after the fact and verify the signature later.

It is also reasonable to assume that occasionally physical signatures
can be forged. It is far far far harder to crack the digital
encryption.

*******************************************
What is a good pattern for understanding signed jar files
*******************************************

So when someone says that they signed a jar file, it means that this
jar file is uniquely colored and can be distinguished from other set
of jar files UNIQUELY. However there is no way to identify the source
developer or company with authenticity.

Such jar files are called self signed jar files.

To know the "SOURCE?, what you have to do is, have a third party
company that the wine collector trusts tell us that the "color-red?
comes from "Company1?. Now every time we see "color-red? then we know
that it is from "Company1?. These are called third party signed jar
files. These are useful in your browsers to tell you that you are
downloading a file from company 1.

*******************************************
So how does one digitally sign?
*******************************************
The above semantics or understanding is technically implemented
through what is called a Public/Private Key encryption. Mathematics
has the ability (with great probability) to generate two numbers where
by if you encode with the first number (private) then only the second
number (public) can decrypt it. These keys are asymmetric. Even if
everyone knows the public key there is NO way they can encrypt a
message that the Public key can decrypt. Only its matching private key
can do that.

So in essence when the wine farmer creates a code for his casket using
the private key, she writes down the public key name on top of the
casket and also the secret code on the casket. When the wine collector
takes that public key and unravels the secret code, if she is
successful then she knows that the "public? key is correct and the
message is only encrypted by the farmer who wrote the public key.

*******************************************
There are two tools available in the java tool kit that helps with this:
*******************************************

The first one "keytool? generates the public/private keys given a password.

The second tool called "jarsigner? creates the secret code using the
private key and the jar file data itself. This additional step of
including the jar file contents enables the jar file being untampered.

*******************************************
Another example to solidify the signature understanding
*******************************************

When you visit a foreign land, you turn on the radio, and you hear
many different songs. You can tell there are different singers and you
can identify each separately but not know who they are or know their
names. This is also self signing. When a friend of yours tells you a
singer and associates to a voice you have heard that is third party
signing.

Again one can imitate another singers voice to confuse or lull the
listener to incompetence where as it is far far far harder to emulate
a digital signature.

*******************************************
References
*******************************************
1. Signing android applications
http://developer.android.com/guide/publishing/app-signing.html

2. My notes on understanding android apk files
http://www.satyakomatineni.com/akc/display?url=DisplayNoteIMPURL&reportId=3279&downerUserId=satya

3. A greate read from Sun on keytool and signing
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html

-- 

2. radiobutton gruop

Hi Everyone,
I have a RadioGroup01 with 3 buttions within that group.  My question
is, how do you detect which button(1), button(2) or button(3) was
selected by the user using the java switch statement?
Thanks to all,
Rc3375

-- 

3. Killing Activity / onPause() / isFinishing()

4. Sharing data between activities

5. Graph in 2.1 'Genie' news and weather app

6. Install the application directly in device

7. XML editor problem