Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Discussion > Android Applications

Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.



Reply
 
LinkBack Thread Tools
Old February 9th, 2012, 11:02 AM   #1 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default noob issue with Android postgreSQL view

I am still new to Android Development, I am trying to design an app which will retrieve information from a postgreSQL DB and display in a readable view, preferable grouped together in tabs of related content, for example: the app retrieves information about a holiday one tab should be information regarding flight details, another about hotel details, another about payment details etc..

The user should enter there booking id, hit a button and the information should be collected and displayed. I have this much working minus the manner in which the information is displayed

I cannot figure out how to edit the view the information is displayed in, see my code below:

Code:
public class **** extends Activity {
/** Called when the activity is first created. */
TextView resultArea;
private Button enterBookingRefBtn;
protected EditText enterRef;
String bookingRefNum;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    resultArea = new TextView(this);
    resultArea.setText("Please Wait");
    setContentView(layout.main);        
    this.enterBookingRefBtn = (Button)this.findViewById(R.id.enterBookingRefButton);
    this.enterBookingRefBtn.setOnClickListener(new OnClickListener(){
        public void onClick(View v) {
            final EditText enterRef = (EditText) findViewById(R.id.enterRef);  
            bookingRefNum = enterRef.getText().toString();

   // I CANT FIGURE OUT HOW TO EDIT THE BELOW VIEW

          setContentView(resultArea);

   // I CANT FIGURE OUT HOW TO EDIT THE ABOVE VIEW

            new FetchSQL().execute();
        }
    });     
}
So the information is displayed by the setContentView(resultArea), and I cant find anyway to edit this, I would like to add a back button, and edit how the information is displayed, but im just stuck, any changes I have cause the app to crash..

ANY HELP IS VERY MUCH APPRECIATED

KeenanCassidy is offline  
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
android, android layouts, android view, postgresql


Go Back   Android Forums > Android Discussion > Android Applications User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 02:02 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo