Touch event problem

by Rahul » Thu, 03 Sep 2009 23:51:27 GMT


Sponsored Links
 Hi All

I want to create one  Application in that i want to drag the many
component like "TableRow","Button","Layout" i used absoultLayout is a
parent Layout but i unable to drag all component only i able to drag
ImageButton and i am using TouchListener for that. i dont undestand
what is the problem.plz help me

   Thanks
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. New Android Developer's Problem - Eclipse says : Unparsed appt error(s)! Check console for output.

I am trying to run a hello world program on the Android SDK (eclipse
plugin).
Using this tutorial:

http://developer.android.com/guide/tutorials/hello-world.html


I did everything it said to do (installed everything)
It says to do this:
------------
Run the Application

The Eclipse plugin makes it very easy to run your applications:

Select Run > Run.
Select "Android Application".
------------

but when I select Run - there is Android Application option!
I bet there is something this tutorial neglected to tell me to do.

-- 

2. Duplicate finish request for HistoryRecord

Hi All,

Hopefully you can help me.  I have a TabActivity that creates two tabs
from other activities, one with a webview in it and the other with a
table view in it.  It works fine until I press back to get to the list
view that it was opened from.  When that happens I get the message


12-01 15:56:15.552: WARN/ActivityManager(61): Duplicate finish request
for HistoryRecord{43f9de30 path.to/.WhiteboardActivity}

repeated in the log hundreds of times for 10 seconds before the
message

12-01 15:56:15.561: WARN/ActivityManager(61): Activity destroy timeout
for HistoryRecord{43f9de30 path.to/.WhiteboardActivity}


and the previous activity has hung.  This occurs on both the emulator
and on the 2.2 android device.  Does anyone know why this is
happening, or what I can do to fix it?  I've included the source code
for the 3 classes below. (btw the AbstractActivity contains the
threading for the async loading using the run method and works fine
for many other activities in my app)

Many thanks
Mike

public class WhiteboardActivity extends TabActivity {

        private static final String CONTENT = "Content";
        private static final String DETAILS = "Details";

        private TabHost mtabHost;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.whiteboard);

                mtabHost = getTabHost();

                Intent intent = new Intent(this, 
WhiteboardDetailsActivity.class);
                Intent intent2 = new Intent(this, 
WhiteboardContentActivity.class);

                // add views to tab host
        
mtabHost.addTab(mtabHost.newTabSpec(CONTENT).setIndicator(CONTENT).setContent(intent2));
        
mtabHost.addTab(mtabHost.newTabSpec(DETAILS).setIndicator(DETAILS).setContent(intent));

                // Workaround bug that shows content through tabs
                mtabHost.setCurrentTab(1);
                mtabHost.setCurrentTab(0);

                TextView header = (TextView)findViewById(R.id.wb_title);
                header.setText(WhiteboardsActivity.clickedParent.getTitle());
        }

}

public class WhiteboardContentActivity extends AbstractActivity {

        String content;
        WebView webView;

    @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.whiteboard_content);

                webView = (WebView) findViewById(R.id.wb_content);
                webView.getSettings().setJavaScriptEnabled(false);
    }

        public void run() {

                Whiteboard wb = WhiteboardsActivity.clickedParent;
                try {
                        if (wb != null) {
                                WhiteboardContent wbc = wb.getContent(true);
                                content = wbc.getContents();
                                webView.loadData(content, "text/html", "UTF-8");
                        }
                } catch (IOException e) {

                        networkError(e);
                }
        }
}

public class WhiteboardDetailsActivity extends Activity {

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.whiteboard_detail);

                Whiteboard w = WhiteboardsActivity.clickedParent;

                TextView header = (TextView)findViewById(R.id.wb_title1);
                header.setText(w.getTitle());
                header = (TextView)findViewById(R.id.wb_description);
                header.setText(w.getDescription());
                header = (TextView)findViewById(R.id.wb_workspace);
                header.setText(w.getParentWorkspace().getTitle());
                header = (TextView)findViewById(R.id.wb_created);
                header.setText(w.getCreatedDate());
                header = (TextView)findViewById(R.id.wb_added_by);
                header.setText(w.getAuthor().getDisplayName());
        }
}

-- 

3. Limiting phone numbers to dial out

4. Sound merging in android.

5. dmtracedump doesn't work

6. When the wakup lock is released in AlarmManager?

7. get link quality value of a bluetooth connection