Android app screen size does not fit device

collinspink

New Member
i'm new to developing so i don't know if i'm doing it righti just downloaded an app from market and it doesn't fit my screen (ldpi 240x320) on height... some buttons on the bottom don't appear.so i googled some info and tried everything...here is layout/Main.xml\[code\] <?xml version="1.0" encoding="utf-8"?><LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"> <LinearLayout android:orientation="vertical" android:id="@id/LLImage" android:layout_width="fill_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" android:minHeight="100.0dip" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"> <RelativeLayout android:id="@id/drag_layer" android:layout_width="fill_parent" android:layout_height="370.0dip" android:adjustViewBounds="true" android:minHeight="100.0dip"> <ImageView android:id="@id/imageViewContainer" android:layout_width="fill_parent" android:layout_height="370.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/backgsammi" android:scaleType="matrix" android:adjustViewBounds="true" android:minHeight="100.0dip" /> <ImageView android:id="@id/imageWatermark" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="http://stackoverflow.com/questions/10625427/@drawable/watermark" android:layout_alignParentRight="true" /> </RelativeLayout> </LinearLayout> <LinearLayout android:orientation="vertical" android:id="@id/mainLLauout" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"> <LinearLayout android:gravity="center_horizontal" android:orientation="horizontal" android:background="@drawable/background" android:layout_width="fill_parent" android:layout_height="50.0dip" xmlns:android="http://schemas.android.com/apk/res/android"> <ImageButton android:padding="0.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/open" android:text="Select Picture" android:onClick="openGallery" /> <ImageButton android:padding="0.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/cat" android:text="Choose Cat" android:onClick="chooseCat" /> <ImageButton android:id="@id/btnFlip" android:padding="0.0px" android:longClickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/rotate" android:onClick="rotateImage" /> <ImageButton android:padding="0.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/eraser" android:onClick="eraseImage" /> <ImageButton android:id="@id/btnSave" android:padding="0.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/save" android:text="Save" android:onClick="saveToGallery" /> <ImageButton android:padding="0.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="3.0dip" android:src="http://stackoverflow.com/questions/10625427/@drawable/help" android:text="Save" android:onClick="openHelp" /> </LinearLayout> </LinearLayout></LinearLayout>\[/code\]i guess it's because of "android:layout_height="370.0dip"" - it should be smaller. but when i try to change it to "360" or "fill_parent" on eclipse, sign apk, install on phone and try to open the app, it crashes. am I missing something? i'm just trying to make app fit my phone screensorry for bad english and that stupid question\[code\] 05-16 18:21:30.796: W/dalvikvm(11715): threadid=1: thread exiting with uncaught exception (group=0x40018560)05-16 18:21:31.306: E/AndroidRuntime(11715): FATAL EXCEPTION: main05-16 18:21:31.306: E/AndroidRuntime(11715): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.addacat.addacat/com.addacat.addacat.AddaCatActivity}: java.lang.ClassNotFoundException: com.addacat.addacat.AddaCatActivity in loader dalvik.system.PathClassLoader[/data/app/com.addacat.addacat-2.apk]05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1680)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread.access$1500(ActivityThread.java:123)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.os.Handler.dispatchMessage(Handler.java:99)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.os.Looper.loop(Looper.java:130)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread.main(ActivityThread.java:3835)05-16 18:21:31.306: E/AndroidRuntime(11715): at java.lang.reflect.Method.invokeNative(Native Method)05-16 18:21:31.306: E/AndroidRuntime(11715): at java.lang.reflect.Method.invoke(Method.java:507)05-16 18:21:31.306: E/AndroidRuntime(11715): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)05-16 18:21:31.306: E/AndroidRuntime(11715): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)05-16 18:21:31.306: E/AndroidRuntime(11715): at dalvik.system.NativeStart.main(Native Method)05-16 18:21:31.306: E/AndroidRuntime(11715): Caused by: java.lang.ClassNotFoundException: com.addacat.addacat.AddaCatActivity in loader dalvik.system.PathClassLoader[/data/app/com.addacat.addacat-2.apk]05-16 18:21:31.306: E/AndroidRuntime(11715): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)05-16 18:21:31.306: E/AndroidRuntime(11715): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)05-16 18:21:31.306: E/AndroidRuntime(11715): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)05-16 18:21:31.306: E/AndroidRuntime(11715): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)05-16 18:21:31.306: E/AndroidRuntime(11715): ... 11 more\[/code\]a\[code\]package com.addacat.addacat;import android.app.Activity;import android.os.Bundle;public class AddaCatActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // TODO Auto-generated method stub }}\[/code\]that's everything is on AddaCatActivity.java
 
Back
Top