Search Results

Search found 27 results on 2 pages for 'sephy'.

Page 2/2 | < Previous Page | 1 2 

  • display several items in one row of a listview in android

    - by Sephy
    I don't now if this title is very clear, but I would like to understand how this is possible : And how we can have 2 elements on the same row of the listview, and handle different clicks, as the listview deals with handling the click on a child. Thanks for anyone who could point me in the right direction.

    Read the article

  • Why are my thread being terminated ?

    - by Sephy
    Hi, I'm trying to repeat calls to methods through 3 differents threads. But after I start my threads, during the next iteration of my loop, they are all terminated so nothing is executed... The code is as follows : public static void main(String[] args) { main = new Main(); pollingThread.start(); } static Thread pollingThread = new Thread() { @Override public void run() { while (isRunning) { main.poll(); // test the state of the threads try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }; }; public void poll() { if (clientThread == null) { clientThread = new Thread(new Runnable() { @Override public void run() { //create some objects } }); clientThread.start(); } else if (clientThread.isAlive()) { // do some treatment } if (gestionnaireThread == null) { gestionnaireThread = new Thread(new Runnable() { @Override public void run() { //create some objects }; }); gestionnaireThread.start(); } else if (gestionnaireThread.isAlive()) { // do some treatment } if (marchandThread == null) { marchandThread = new Thread(new Runnable() { @Override public void run() { // create some objects }; }); marchandThread.start(); } else if (marchandThread.isAlive()) { // do some treatment } } And for some reason, when I test the state of my different threads, they appear as runnable and then a the 2nd iteration, they are all terminated... What am I doing wrong? I actually have no error, but the threads are terminated and so my loop keeps looping and telling me the threads are terminated.... Thanks for any help.

    Read the article

< Previous Page | 1 2