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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:22:47+00:00 2026-05-26T01:22:47+00:00

I’m curently working on my first Android app, which is my first pice of

  • 0

I’m curently working on my first Android app, which is my first pice of java code at all, i think I got pretty far already but now I’m stuck on the following topic:

I have a ListActivity which shows rowViews from a custom ListAdapter generated from json objects. Generaly there are 3 types of objects:

Rooms, which neither have a button nor a slider. Those are handled like this in my ListActivity:

@Override
protected void onListItemClick (ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);
    Log.d(TAG,"Area" + l.getItemAtPosition(position).toString() + "clicked");
    handleControlItemActions((JSONObject)l.getItemAtPosition(position));
}

Switchable devices, which have a toggle button to be switched on and off are handled like this (onObjectSwitch is defined in xml as onClick action for the button):

    public void onObjectSwitch (final View view) {
     Log.d(TAG,"Object" + view.getId()+ " clicked");
     handleControlItemActions((JSONObject)l.getItemAtPosition(position));
}   

Dimmable devices, which have a SeekBar, and here is my problem:
I know the “onSeekBarChangeListener”, but I have no clue how I can set it to the SeekBars which are inside the rowViews from my Activity class.
The bars are created by the Listadapter like this:

    case 1:
    textView.setText((String)controlItem.get("name") + " " +(String)controlItem.getString("actual")+"°C");
    slider.setVisibility(View.VISIBLE);
    slider.setId(position);
    slider.setProgress(controlItem.getInt("setPoint"));
    slider.setMax(controlItem.getInt("max"));
    break;

Can anyone tell me how to handle those sliders? Or am I not even on the right track to manage those widgets?

Thanks in advance to everyone (and sorry for my spelling 😉 )!

  • 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-05-26T01:22:47+00:00Added an answer on May 26, 2026 at 1:22 am

    Okay got it:
    just define the listadapter as a subclass inside of the listactivity, now you’re able to reffere to the methods without flagging them “static”.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
i got an object with contents of html markup in it, for example: string

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.