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

  • SEARCH
  • Home
  • 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 8378657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:58:39+00:00 2026-06-09T15:58:39+00:00

I have sort of a file manager. It displays files in a ListView .

  • 0

I have sort of a file manager. It displays files in a ListView. Each of those ListViews has a custom footer – a button, which is defined in a xml file. Pressing a button allows user to chose a file from the “downloads” directory and copy it to the folder where the button was pressed. This is implemented through the AlertDialog. So by clicking the option from the dialog I get a path of a file that should be copied.

Now, how do I get the location from which my button was pressed? Can I somehow pack some sort of data in my button on its creation so that later when it is pressed I could identify its initial location?

  • 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-09T15:58:40+00:00Added an answer on June 9, 2026 at 3:58 pm

    there are many ways to achieve that. you can create a separate OnClickListener for each button as JaLoveAst1k proposes. you could also add some information to the buttons’s tag (setTag()) and get it back in the onClick() function. Yet another way would be to have a Hashtable<Button, String> where you store your string informaton relative to the Button.

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

Sidebar

Related Questions

In my root directory I have a htaccess file which is caching all sort
I have a Perl script using a system call to sort a tsv file:
I have a sort of plug-in model in which various complex user controls are
I have a set of files for a custom-made CMS, and now that the
I have a web server which saves cache files and keeps them for 7
I have sort of a tricky problem I'm attempting to solve. First of all,
So in nokia we can have sort of Microsoft Silverlight installed to system. We
I have some sort of problem, when it comes to customizing the iPad-launch-lcreens of
I have some sort of recursive function, but I need to parse a string,
I have this sort of format asp.net MVC View -> Service Layer -> Repository.

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.