HelloWorld app only uses 1/4 of screen - Android Software Development

I'm new to Android development. I am familiar with C++ and PHP and a few other languages, but I've never used Java. I've just got a new Galaxy Nexus so I thought I would download the SDK and have a go at running the hello world app.
I've managed to get it running, it but only uses the bottom left hand quarter of the screen.
I am running Fedora 16 and just using the command line tools to develop and compile.
I have downloaded everything for Android 2.2 (API 8) and Android 4.0 (API 14).
When I run "android list targets" I get
Code:
Available Android targets:
----------
id: 1 or "android-8"
Name: Android 2.2
Type: Platform
API level: 8
Revision: 3
Skins: QVGA, WQVGA400, WQVGA432, HVGA, WVGA854, WVGA800 (default)
ABIs : armeabi
----------
id: 2 or "Google Inc.:Google APIs:8"
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 2
Description: Android + Google APIs
Based on Android 2.2 (API level 8)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: WVGA854, WQVGA400, HVGA, WQVGA432, WVGA800 (default), QVGA
ABIs : armeabi
----------
id: 3 or "KYOCERA Corporation:DTS Add-On:8"
Name: DTS Add-On
Type: Add-On
Vendor: KYOCERA Corporation
Revision: 1
Description: DTS Add-On
Based on Android 2.2 (API level 8)
Libraries:
* com.kyocera.dualscreen (dualscreen.jar)
Dual Screen optional platform library
Skins: DTS400 (default), WVGA854, WQVGA400, HVGA, DTS800, WQVGA432, WVGA800, QVGA
ABIs : armeabi
----------
id: 4 or "LGE:Real3D Add-On:8"
Name: Real3D Add-On
Type: Add-On
Vendor: LGE
Revision: 1
Description: Real3D add-on
Based on Android 2.2 (API level 8)
Libraries:
* com.lge.real3d (real3d.jar)
Real3D library
Skins: WVGA854, WQVGA400, Optimus3D (default), HVGA, WQVGA432, WVGA800, QVGA
ABIs : armeabi
----------
id: 5 or "Samsung Electronics Co., Ltd.:GALAXY Tab Addon:8"
Name: GALAXY Tab Addon
Type: Add-On
Vendor: Samsung Electronics Co., Ltd.
Revision: 1
Based on Android 2.2 (API level 8)
Skins: WVGA854, WQVGA400, GALAXY Tab (default), HVGA, WQVGA432, WVGA800, QVGA
ABIs : armeabi
----------
id: 6 or "android-14"
Name: Android 4.0
Type: Platform
API level: 14
Revision: 3
Skins: QVGA, WQVGA400, WQVGA432, HVGA, WXGA720, WSVGA, WVGA854, WVGA800 (default), WXGA800
ABIs : armeabi-v7a
----------
id: 7 or "Google Inc.:Google APIs:14"
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 2
Description: Android + Google APIs
Based on Android 4.0 (API level 14)
Libraries:
* com.android.future.usb.accessory (usb.jar)
API for USB Accessories
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: WVGA854, WQVGA400, WSVGA, WXGA720, HVGA, WQVGA432, WVGA800 (default), QVGA, WXGA800
ABIs : armeabi-v7a
I created a project using target 1 which should be android-8 (Android 2.2).
Code:
create project --name helloandroid --target 1 --path ./ --activity helloandroid --package com.example.helloandroid
Here is my "res/layout/main.xml"
Code:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
Here is my "res/values/strings.xml"
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello, Android! I am a string resource!</string>
<string name="app_name">helloandroid</string>
</resources>
I have added the following to my "AndroidManifest.xml"
Code:
<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
But my Galaxy Nexus still doesn't make the app fill the whole screen and use text big enough to read.
I think I need to use skin WXGA720 for the 1280x720 screen on the Galaxy Nexus. But of course this isn't available on Android 2.2. Do I need to compile for "android-14" (target 6) instead? But presumably if I did that I wouldn't be able to run the app on an older device.
So how do I tell Android to scale up to fill the whole screen on my Galaxy Nexus?
I assume I am doing something stupid and making a totally obvious mistake.
I'd be grateful if someone could point out what it is for me.
Thanks!

Use Eclipse and it will help you out with all of that.
Edit: android will scale up to fit the whole screen by default (i think).
Learn Java before start making stuff.
If you already know C++ it will not be dificult but check out the oracle tutorial page of Java and the Android tutorial page.

tuning_xx said:
Use Eclipse and it will help you out with all of that.
Click to expand...
Click to collapse
Thanks, but I'd rather not.
I tried installing it and found it was rather bloated and my laptop would hardly run Eclipse on its own never mind do anything else. In my last ten years of developing software I've never used a DE, never seen the need.
I'd rather know what I'm doing wrong in the code than rely on another piece of software to fix it for me.

If you don't found useful a IDE until now you will start founding them.
Believe I program Java about 3 years and the IDE essential to work whit the language.
And Android just make it more necessary!

I noticed some apps do that when force gpu rendering option is enabled in developer options on your device in ics.
Sent from my SGH-I897 using xda premium

Pechkin000 said:
I noticed some apps do that when force gpu rendering option is enabled in developer options on your device in ics.
Click to expand...
Click to collapse
Ah-ha! That's what it was!
All working now Thanks!
I've had that on for ages and haven't noticed any problems with any other non-ICS-optimised apps. I wonder what they do that makes it work?

Related

Using Plateform Builder to create a ROM from scratch

Hi,
I wonder if somebody has already been able to create a ROM from scratch using Microsoft Plateform Builder.
Olivier
you cannot. PB does not contain a sample platorm that can boot on PXA 263.
mamaich said:
you cannot. PB does not contain a sample platorm that can boot on PXA 263.
Click to expand...
Click to collapse
There is already a driver for INTEL PXA 263 and two BSP published on
http://openwince.sourceforge.net/
http://openwince.sourceforge.net/pxa2x0/
Based on http://wiki.xda-developers.com/wiki/HimalayaHardware, and openwince a specific BSP could be created for Himalaya Hardware.
http://msdn.microsoft.com/embedded/usewinemb/ce/bsp/howtos/default.aspx
maybe we should try WinCE 5.0 platform builder
I'm trying to install an evaluation version, it supports xscale, worth trying

SPB Mobile Shell 1.5 API

I had maile SPB for the api and this is the response that I got.
I have downloaded the thing and it seems to be evc project sample.
----------------------------------------------------------------
Dear Shailesh,
thank you for your interest to Spb software.
SDK can be downloaded from
http://www.softspb.com/ext/mobileshell/2894-RC1/SpbMobileShellSDK_v3.zip
You can use this SDK only from the native code (e. g. C++, which is not .NET
compatible)
Best regards,
Alexandra V. Kobekova
Spb Technical Support
[email protected]
http://www.spbsoftwarehouse.com
----------------------------------------------------------------

Android for HTC Touch / Elf

Hello,
I'm french, so please excuse-me for my eventually English mistakes.
I've seen that topic : http://forum.xda-developers.com/showthread.php?t=385129&page=10
But I don't see if there is a application for HTC Touch or HTC Elf in order to have the famous Android from Google. I've seen on the Internet that there was the application for HTC Vogue, but it doesn't work on our phones Touch / Elf. (white screen)
Is this application exist ? Or is it in developpement maybe ?
Thanks for your answers.
There aren't any applications. Android is an OS, like Windows Mobile. You can choose between WM and Android, but can't have both on your Elf.
Ok. Thanks. So how can I have Android on my HTC Touch ? I need to change my rom if I've understand. But where is it ?
Thanks.
there is no android rom for the elf. only for the elfin.
freaksey said:
there is no android rom for the elf. only for the elfin.
Click to expand...
Click to collapse
never heard about this one... just linwizard on elfin for now
ehh i'm sorry, it's not a rom yet, but you can boot it from wm
-> http://forum.xda-developers.com/showthread.php?t=382265
freaksey said:
ehh i'm sorry, it's not a rom yet, but you can boot it from wm
-> http://forum.xda-developers.com/showthread.php?t=382265
Click to expand...
Click to collapse
It's for Vogue, not Elf or Elfin.
Android??? Elfin??? GOOGLE!!!!
Can anyone confirm if the Android OS will be avalable for Elfin units please????
I don't think there will be any official version. Maybe some Elfin user will create it.
was anybody successful with running that on an elfin?!
Android on htc touch/elfin
this is the phone i am talking about
http://pdadb.net/index.php?m=specs&id=952
OK so i am trying to get all the info together first before i brick this phone so i am doing alot of tech research below is everything i could find for this device
if you have more info please add. and eventually it will all come together.....I hope
This is info i researched for the phone i will use it to make a default.txt
# TMOBILE mda TOUCH 256, ELF0300, HTC elfin 0300
# this is an over view of my devices settings and tech info.
#
# Storage on device is........ 173.79 mb
# storage card is.............. 964.50 mb
#
#DEVICE INFORMATION
# rom version.................. shadow_2.1 WWE
# rom date .................... 10/02/08
# Radio version................ 03.08.90
# Protocol version............ 4.1.13.52
# ExtROM version............ Touch-edition
#
# HARDWARE
# CPU........................... 32 bit texas instument OMAP_850
# CPU core................... ARM926EJ-S
# Instruction set............ ARMv5TEJ
# level1 cache .............. 16KiB D-Cache / 8KiB l-Cache
#
# phone controller............ TI TMS320C54x
# CPU CLOCK/Speed .......... 201 Mhz/ 201 000 000hz
# rom type .................. FLASH EEPROM
# RAM size..................... 128 mib
# FLASH ROM size ......... 256 mib
# DATA bus ................. 16 bits
# display resolution....... 240 X 320
# Display type ............. color transflective TFT, 65536 scales
# display diagonal......... 2.8 inches
# colors 65536
# microphone............ mono
# loudspeaker........... mono
# audio output ......... proprietary
# cellular networks..... GSM900, GSM1800, GSM1900
# cellular data links...... CSD,GPRS,EDGE
# call alert ................. 64 -chord melody
# vibrating alert......... supported
# speakerphone............ supported
# audio controller.......... AGC
# Bluetooth................ 2.0
#
#CONTROL PERIPHERALS
# positioning device......... touchscreen
# primary key board......... not supported
# directional pad............ 5-way
# scroll wheel................ not supported
#
#INTERFACES
# Expantion slot.............. microSD,microSDHC,Transflash,SDIO
# USB.......................... USB 1.1 client-12Mbit/s mini-USB
# wireless lan................... 802.11b, 802.11g 54Mbit/s
# infared ....................... not supported
#
# main camera................. 1.9 mp
# optical zoom............... 1x
# battery capacity............ 1100 mah
#
# IDENTITY
# model number.............. ELF0300
# Platform..................... Pocket pc
# IMEI ......................... 35678901099446301
ok that is all for now here is to hoping
freaksey said:
there is no android rom for the elf. only for the elfin.
Click to expand...
Click to collapse
I've got the elfin but I can't find the rom.
Thanks.
really interested in this.... The Htc Vogue (another processor) has achivied this, The Htc Niki too.. but they are not OMAP like elf or elfin...
I'm also very interested in this android "rom"
I read that some people was successful with the linuxboot on elfin.
Is there anyone who knows how to achieve it?
Martin2 said:
Hello,
I'm french, so please excuse-me for my eventually English mistakes.
I've seen that topic : http://forum.xda-developers.com/showthread.php?t=385129&page=10
But I don't see if there is a application for HTC Touch or HTC Elf in order to have the famous Android from Google. I've seen on the Internet that there was the application for HTC Vogue, but it doesn't work on our phones Touch / Elf. (white screen)
Is this application exist ? Or is it in developpement maybe ?
Thanks for your answers.
Click to expand...
Click to collapse
it won't run on the htc touch's CPU
THIS IS OUR ONLY CHANCE, buy that sucker somebody
http://www.engadget.com/2009/02/10/keepin-it-real-fake-part-clxxxii-hkc-touch-clone-sports-andro/
Ok, here's what I have found after a day of very disappointing reading:
There is a WM booting version of android for the vouge (which is a qualcomm processor)
That processor is also the same (similar) architecture as the one in the dream/g1. Which is why it works I assume. As a result the rom should also work on the titan, diamond, HD, etc.
As for the Elf and Elfin. They use the TI OMAP 850 board. Google did write a version of android that worked on that board for a tech show, but it has not appeared anywhere around in a usable form for a phone. (No USB or keyboard or anything)
IMO someone should just have to take the kernal from that example and the development for the vouge and run with it
But that is probably way harder than it sounds (and hasn't happened yet as far as I can tell)
Also, the severe limitations of the Elf's ram will mean it probably not work booting from WM (since it needs 32mb at a BARE not even usable minimum)
The Herald forums has been porting android to the Omap850. They're still early on in the development stages, but I would imagine that helping them out (for those of you who can actually program and make drivers) would set a layout to port it easily to the elf (since they have the same CPU and chipset.)
Please DO NOT GIVE UP. I want android on my Elf
Android ROM can resolve the problem of the Bricker HTC with CID locked ?
How ?
it's possible to install Adroid ROM from bootloader !! with SD card (FAT32) Now ?

AGEphone Mobile VoIP with Earphone Support for the XP1

[Mirrored from the AGEphone Mobile development thread for your convenience as not everyone checks those forums] I am happy to announce that AGEphone Mobile now supports speaker switching on the Sony Ericsson Xperia X1. If you have trouble getting it to run on your device, here is the log (Menu - About - More...) for your reference:
Hardware Information:
OEM Info: X1i
OEM ID: 5
Number of processors: 1
Processor type: 2577
System Information:
Platform Type: PocketPC
Build Number: 00004C98
Major Version: 00000005
Minor Version: 00000002
Platform ID: 00000003
Local IP:
Global IP:
HostIndex: -1
NIC: 169.254.2.1, fe80::8000:60ff:fe0f:e800, fe80::1,
Driver Enumeration:
WAV1: \windows\wavedev.dll (652536)
WAV8: \windows\bta2dp.dll (51392)
Just take a look at the original thread or my signature for the download if you want to give it a try. Hope to see you over there!

New templating system for Android phone UI – concise, native and dynamic

Hi guys,
Slate templates (beta) is a templating system for developing both Android and Windows phone native UIs using a modern templating system. It offers the following features:
1. concise syntax ( 40% - 60% smaller than xml )
2. similarity to html and css ( generating native controls )
3. cross platform
4. support for dynamically loading templates ( e.g. from your server )
It has separate engines for each platform – Android, Windows.
Website Link: slatetemplates.com
Wiki help Link: github.com/kishorereddy/slate-templates/wiki
Download the sample app (slate_beta.zip) from the website and customize “slate_sample2.txt” in assets folder.
Using this templating engine, we have developed a beta version of Android app - Slate calendar.
Link: play.google.com/store/apps/details?id=com.codehelixsolutions.slatecalendar
Appreciate if you could try it out, suggest any specific missing features, and give any constructive feedback for the templating engine.

Categories

Resources