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 8875151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:54:17+00:00 2026-06-14T18:54:17+00:00

In given code, what is the simple way of passing current array data to

  • 0

In given code, what is the simple way of passing current array data to another activity ? I want to pass jsonData.getString(“date”) and jsonData.getString(“start_time”) to another activity.

    JSONObject jsonData;
    TableRow row1 = new TableRow(this);

    for (int i = 0; i < beaconsArray.length(); i++) 
     {
           jsonData =   beaconsArray.getJSONObject(i);
           row1     =   new TableRow(this);

           TextView textview    =   new TextView(this);
           textview.setText(jsonData.getString("date"));
           textview.setTextColor(Color.BLACK);
           textview.setWidth(165);
           row1.addView(textview);

           textview=    new TextView(this);
           textview.setText(jsonData.getString("start_time"));
           textview.setTextColor(Color.BLACK);
           textview.setWidth(90);
           row1.addView(textview); 


           ImageView iv = new ImageView(this);
           iv.setImageResource(R.drawable.view_btn);
           iv.setOnClickListener(ViewDetail_of_Beacon);
           row1.addView(iv);
     }



     public OnClickListener ViewDetail_of_Beacon = new OnClickListener() {

        public void onClick(View v) {

                // Here i need current array data ??


            }
        };
  • 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-14T18:54:18+00:00Added an answer on June 14, 2026 at 6:54 pm

    Why are you not using a listview? instead of a table

    Within the listview you can easily set your custom onclicklistner which gives you acces to your row data

    example of a onclicklistner:

    listView.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> arg0, View view, int arg2,long itemID) {
            String fromDate = ((TextView)view.findViewById(R.id.fromDate)).getText().toString();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

who can give me a simple code , i want a simplest way to
My question is, I guess , pretty simple : Given one data.txt file, how
This is a bit tricky, but what I want, in a simple way, is
Given the following code sample: uint8_t i, in, ni; i = in = 2;
Given this sample code: #include <iostream> #include <stdexcept> class my_exception_t : std::exception { public:
Given the sample code: class Base { public: bool pub; protected: bool prot; };
Simple sum of digits code. It compiles but when executed, the last cout gives
For one or another reason this code sample gives 48 hours instead of 24,
Given: code inside a stored proc: select bleh into #tblTemp from FunctionThatReturnsTable('some','params') -- do
i know the basics of recursion but in the given code i m facing

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.