Search Results

Search found 3 results on 1 pages for 'galip'.

Page 1/1 | 1 

  • Android Packaging Problem: resources.ap_ does not exist

    - by Galip
    I am trying to fix a problem in Eclipse for like 3 hours and I haven't made any progress. Tomorrow is the customer coming to look at my app, and I have no time left. This is really frustrating! This morning when I was coding and I wanted to run my app on my device Eclipse crashed all of a sudden. 'aapt.exe has stopped working' After this Eclipse wasn't starting anymore. It froze at the splash image. I looked on the internet and tried different solutions like going back to Java SE 6 update 20, changing .ini file etc. in the end reinstalling Eclipse did the job. Shortly after that the 'aapt.exe has stopped working' returned. I found a solution by changing my projects target. 1.5, 1.6, 2.2 doesn't matter, as long as it's different than the one before. Now I get the Error generating final archive: java.io.FileNotFoundException: C:\xxx\bin\resources.ap_ does not exist error. I tried clean but that doesn't work. Deleting and automatically regenarting R.java also didn't work. I ran the same code in Netbeans with the Android plugin and there it gives me the 'aapt.exe has stopped working' again :( Please guys, how can I fix this? Edit: I think I may have found the reason. These are the error lines in the console: org.xmlpull.v1.XmlPullParserException: Binary XML file line #3: <bitmap> requires a valid src attribute at android.graphics.drawable.BitmapDrawable.inflate(BitmapDrawable.java:341) at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:779) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:720) at com.android.layoutlib.bridge.ResourceHelper.getDrawable(ResourceHelper.java:150) at com.android.layoutlib.bridge.BridgeTypedArray.getDrawable(BridgeTypedArray.java:668) at android.view.View.<init>(View.java:1846) at android.view.View.<init>(View.java:1795) at android.view.ViewGroup.<init>(ViewGroup.java:282) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) [2011-01-17 16:37:20 - gegevens.xml] Unable to resolve drawable "com.android.layoutlib.utils.ResourceValue@267e33de" in attribute "background" The file it's talking about is 'bg.png'. It's a small png file which I repeat in a .xml file. <?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/bg" android:tileMode="repeat" /> This file has worked from the first time without any problems. I deleted it from the drawable folder, waited for an error message, and then added it back. The red x next to the foldername got away, but still nothing different...

    Read the article

  • Custom RadioButton image not filling space

    - by Galip
    Hi guys, I have a custom radiobutton with a 9-patch image as background. I use a Selector to determine the background. I also have some text i want to put over the background of the image, but the text is aligning next to the button. This is the RadioGroup <LinearLayout android:id="@+id/segmented" android:layout_width="fill_parent" android:layout_height="50sp" android:gravity="center" android:layout_below="@+id/header"> <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/group1" android:gravity="center"> <RadioButton android:checked="false" android:layout_width="90sp" android:id="@+id/rbVerzekeringen" android:text="Verzekeringen" android:textSize="10sp" android:button="@drawable/checkbox_theme" /> <RadioButton android:checked="false" android:layout_width="90sp" android:id="@+id/rbPersoonlijk" android:text="Persoonlijk" android:textSize="10sp" android:button="@drawable/checkbox_theme" /> <RadioButton android:checked="false" android:layout_width="90sp" android:id="@+id/rbNotities" android:text="Notities" android:textSize="10sp" android:button="@drawable/checkbox_theme" /> </RadioGroup> </LinearLayout> This is the Selector: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:state_window_focused="false" android:drawable="@drawable/bt_filter_active" /> <item android:state_checked="false" android:state_window_focused="false" android:drawable="@drawable/bt_filter" /> <item android:state_checked="true" android:state_pressed="true" android:drawable="@drawable/bt_filter_active" /> <item android:state_checked="false" android:state_pressed="true" android:drawable="@drawable/bt_filter" /> <item android:state_checked="true" android:state_focused="true" android:drawable="@drawable/bt_filter_active" /> <item android:state_checked="false" android:state_focused="true" android:drawable="@drawable/bt_filter" /> <item android:state_checked="false" android:drawable="@drawable/bt_filter" /> <item android:state_checked="true" android:drawable="@drawable/bt_filter_active" /> </selector> And this is what it lookes like: As you can figure out I want 3 large buttons with the text over it. How can I do this? EDIT: I set the selector at background in stead of button and set the button to null. The code looks like this now: <LinearLayout android:id="@+id/segmented" android:layout_width="fill_parent" android:layout_height="50sp" android:gravity="center" android:layout_below="@+id/header"> <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/group1" android:gravity="center"> <RadioButton android:checked="false" android:layout_width="100sp" android:layout_height="40sp" android:id="@+id/rbVerzekeringen" android:text="Verzekeringen" android:textSize="13sp" android:orientation="vertical" android:background="@drawable/checkbox_theme" android:button="@null" android:gravity="center"/> <RadioButton android:checked="false" android:layout_width="100sp" android:layout_height="35sp" android:id="@+id/rbPersoonlijk" android:text="Persoonlijk" android:textSize="35sp" android:background="@drawable/checkbox_theme" android:button="@null" android:gravity="center"/> <RadioButton android:checked="false" android:layout_width="100sp" android:layout_height="30sp" android:id="@+id/rbNotities" android:text="Notities" android:textSize="13sp" android:background="@drawable/checkbox_theme" android:button="@null" android:gravity="center"/> </RadioGroup> </LinearLayout> But now when I make the buttons larger or smaller the text in it just disappears like this (height of the first image is 40sp, the second is 35sp and the last one is 30sp): How can I make the background image smaller without cutting the text in it?

    Read the article

  • Saving file to phone in stead of SD-card

    - by Galip
    Hi guys, In my app I save an XML file to the users SD-card by doing File newxmlfile = new File(Environment.getExternalStorageDirectory() + "/Message.xml"); But not all users have SD-cards in their phone and therefore my app is likely to crash. How must I change my File creating method in order to save the file to the phone's memory instead of the SD-card? Also, how must I change the loading of the file? (currently: new InputSource(new FileInputStream(Environment.getExternalStorageDirectory() + "/Message.xml")))

    Read the article

1