Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Newbie help : Point me in the right direction

Newbie help : Point me in the right direction

Put your problem here if it does not fit any of the other categories.

Newbie help : Point me in the right direction

Postby 0maha » Fri Dec 03, 2010 6:07 pm

Ok, I'm putting together my first Android app. I've been playing around for a few days, and think I'm starting to get the hang of things, but I have some questions.

The basic nature of the app is to show the user nine specific buttons, and then when the user presses one of them, it brings up a gallery view showing some images.

Easy, peasey.

Here are my specific questions:

- For the layout of the buttons...Should I use a GridView or just lay buttons on the screen. I've been playing around with GridView, but it seems a lot heavier than I need. This app will always have the same nine buttons. No exceptions.

- How do I set a background image on the screen (underneath the buttons, as it were).

- How do I detect when the device is in "portrait" vs "landscape" orientation?

Thanks in advance!
0maha
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 02, 2010 5:26 pm

Top

Re: Newbie help : Point me in the right direction

Postby blundell » Sat Dec 04, 2010 4:07 pm

Post in the Coding problems Forum not the Tutorials forum next time :-)

The OS worries about if it is portrait or landscape, you can have two folders called layout-land and layout and have different layouts: http://www.devx.com/wireless/Article/40792

Yes just have 9 buttons, the GridView is not designed for what you need, and is to combersome.

To set a background on the activity, you just set a background on the root View element:

Code: Select all
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:background="@drawable/page_bg"  << A drawable in your res/drawable folder
        >
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Newbie help : Point me in the right direction

Postby 0maha » Mon Dec 06, 2010 4:17 pm

Thanks for the guidance re the correct forum. It is appreciated.

And thanks for the tech advice too. Also appreciated.

Cheers!
0maha
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 02, 2010 5:26 pm

Re: Newbie help : Point me in the right direction

Postby wakawaka » Tue Jan 25, 2011 1:45 pm

You can use TableLayout for same..

Use following tutorial for same.
http://forum.gssdaily.com/viewtopic.php?f=18&t=188
Android Development Tutorials and Code Snippets: http://forum.gssdaily.com/
wakawaka
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Tue Jan 11, 2011 1:51 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests