Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:25:14+00:00 2026-06-14T17:25:14+00:00

I am using an custom listview in my application.In my row I have (two

  • 0

I am using an custom listview in my application.In my row I have (two images,remaining textviews).

when I click on one of textview,I want to set another textview data.I wrote the code below to do this

     likes.setOnClickListener(new OnClickListener() {


        public void onClick(View v) {
//          if(likes.getText().toString().equals("Like")){
               TextView t=(TextView)v;
              TextView likesnumber1 = (TextView) findViewById(R.id.likesnumber);
//            TextView  likesnumber = (TextView) convertView.findViewById(R.id.likesnumber);
                int i=  Integer.parseInt(likescount.get(position));

           if(like_or_ulike.get(position).equals("Like")){
                Log.e("inlike","like");
                like_or_ulike.set(position, "Unlike");
                t.setText(like_or_ulike.get(position));
                UrltoValue.getValuefromUrl("https://graph.facebook.com/"+objectid.get(position)+"/likes?access_token="+accesstoken+"&method="+"post");
//             listView.getAdapter().getItemAt(position);
               j=i+1;
               String s=Integer.toString(j);
            likescount.set(position, s);
             likesnumber1.setText(likescount.get(position));

            }
            else{
                Log.e("unlike","unlike");
                like_or_ulike.set(position, "Like");
                t.setText(like_or_ulike.get(position));
                UrltoValue.getValuefromUrl("https://graph.facebook.com/"+objectid.get(position)+"/likes?access_token="+accesstoken+"&method="+"DELETE");

                   j=i-1;
                 String s=Integer.toString(j);
                likescount.set(position, s);
                 likesnumber1.setText(likescount.get(position));
            }
        }
    });

How can I get the another textview id of particular row when I click the textview.Is it possible to get the ids of that particular row.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:25:16+00:00Added an answer on June 14, 2026 at 5:25 pm

    As you want to get hold of the textview in the same row, you can do the following.

    with the textview that was clicked get its parent and then using the parentview you can search for your textview:

    View parent = (View) textViewThatWasClicked.getParent();
            if (parent != null) {
                TextView textViewThatYouWantToChange = parent.findViewById(R.id.textViewThatYouWantToChange);
                textViewThatYouWantToChange.setText(...);
            }
    

    you will need to change the id that you look for to the id you have for that other textview. If you need to set an id you can do this in the xml layout file you used.

    I cant follow your code well enough to actually give you the code but this should be enough to get you in the right direction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three textviews in a row of a listview using custom adapter and
I have a Custom ListView in my application, containing an ImageView and 3-5 TextViews.
I have created a custom listview using SimpleAdapter and in each row of list
i have a ListView with a custom Servizio object in every row. I'm using
In my application, to populating a ListView i am using custom adapter, because one
HI Guyz i have created a sectioned custom listview using baseadapter its working fine
I am using custom row view in ListView widget. I am having getView method
I am displaying images and text to a listview using a custom adapter, when
For my application I am using a couple listview. So far have been using
Hi I am developing one app using the below link Custom ListView With Headers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.