I made a logo.png from a adobe illustrator project. In the emulator running Galaxy Nexus 4.2.2 my image shows
But when running the same on my Galaxy Nexus no image is shown, but the same space is reserved. So it thinks my image is there but not showing anything I think...
Code:
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@raw/logo" />
also tried putting logo.png in drawable folder. Not showing.
I also added the Java code, not showing.
Does anyone know what's wrong? it's really showing in emulator emulating my Galaxy Nexus but not on the Galaxy Nexus itself? Also the preview in eclipse seems to render it properly.
Related
Hey Everybody!! I searched a lot on this forum and really don't know if I post this in the right section or whatsoever, it's a bit unclear. But I just post it and wait for the respons
For the first time I'm developing an Android application and so far it's going really well except for one thing. I made a webview layout and I wanted to show ads in the app. So I added the AdMob ads and they're working really well. But there's one problem.
The AdMob covers a part of the WebView, so it's not shifting the WebView layout up but it's covering it. And that's annoying because you can't read a part of the webview's text. How can I fix it?
This is my main.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent" android:id="@+id/rltvLayout01"
android:layout_height="fill_parent" android:background="@color/white">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<WebView android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:scrollbars="none" />
</ScrollView>
<LinearLayout android:id="@+id/ad_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:layout_alignParentBottom="true">
<com.google.ads.AdView android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adUnitId="helloworldcode"
ads:loadAdOnCreate="true"
ads:adSize="BANNER" />
</LinearLayout>
</RelativeLayout>
You need to tell your scrollview to align to the top of the linearlayout. Try Adding this to your ScrollView definition:
android:layout_above="@+id/ad_layout"
You may need to change some "wrap_content" to "fill_parent" but without an IDE, I can't tell for sure.
Gene Poole said:
You need to tell your scrollview to align to the top of the linearlayout. Try Adding this to your ScrollView definition:
android:layout_above="@+id/ad_layout"
You may need to change some "wrap_content" to "fill_parent" but without an IDE, I can't tell for sure.
Click to expand...
Click to collapse
Thank you for the answer, but unfortunately for some reason I get a force close when I add the layout_above...
Hi,
I have been a part of XDA developers for a long time. I dont post (coz I dont know as much as ou guys). But I visit almost everyday.
I decided to make an App for Android and I have very close to 0 knowledge in programming. I made the app and it works However, I have incorporated the Admob SDK and done exactly like all the tutorials say but the ads dont show up on the device. It shows perfectly on the emulator through...
My "main.xml"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="<I have put my Publisher ID <-- I hope that is correct"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
my Main Activily has the following
AdView adv = (AdView)findViewById(R.id.adView);
AdRequest re = new AdRequest();
adv.loadAd(re);
My Manifest has the following
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
my Project Properties has this
target=android-15
I have added external JAR GoogleAdMobAdsSdk-6.1.0.jar into the LIbrary.
When i run it, i cant see the ad on my device but I can see it if I run it on the emumlator.
https://play.google.com/store/apps/...sMSwxLDEsImNvbS5vdXRnb2luZy5kZXRlY3RjYWxscyJd
That's my app. ( If someone helps me solve this, I will give my app ADD FREE to XDA Developers)
Thanks
If it works on the emulator you have done it correctly. I think it is a "lack of inventory" problem, so you only have to wait, usually this problem disappears when the number of installations increase.
Thank you so much. I can see in AdMob that the number of Requests is increasing so...
Someone gave me a mod that adds 15 toggle to my ROM, the only problem is it takes away the brightness slider which I really liked, and it uses different battery icons then I'd like.
So, I took the file he gave me and first set to work changing the brightness slider and getting it back.
Vertumus, who made the theme I'm using, JB Domination, said you edit the file tw_status_bar_expanded.xml and take out this code:
PHP:
<LinearLayout android:orientation="horizontal" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="56.0dip">
<ImageView android:id="@id/brightness_icon" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/tw_quickpanel_icon_brightness" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</LinearLayout>
So, I opened up the mod I was given decompiled SystemUI.apk and found that file. Changed that so that the information was added back in. Saved, recompiled (without errors) and threw the SystemUI.apk back into the zip and reflashed.
This broke my statusbar and wallpaper. Why?
I then tried signing it using signapk, which didn't work
I think you may find your answer in this thread I spotted
http://forum.xda-developers.com/showthread.php?t=1790782
[Q] Help re decompiling/recompiling
Sent from my GT-I9300 using xda premium
I sorted it.
I wasn't signing properly.
To fix it I took the META-INF and AndroidManifest.xml from the original .apk, kept them save. Built the APK once, then stuck those two files in the build/apk folder and rebuilt/compiled. Worked fine after that.
Im trying to change the color of my status bar clock(by battery) to black. I decompiled my rom, In my SystemUI>layout>status bar.xml I edited the color in Line 7 to #00000000 and compiled. No errors. I reflashed my systemUI but the clock never changes. I re checked my xml file and the changes held.
Is there another line/file I need to be editing as well.
Driving me nuts.
Thanks
Razr Maxx x912
JellyBean
Post the line you edited here.
Sent from my MOTOROLA RAZR using xda app-developers app
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#00000000" android:gravity="left|center" android:id="@id/onsText" androidaddingLeft="6.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />
Trying for Black or Transparent clock
You are not editing the right code, try find the below and change the color code you like
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff1d849f" android:gravity="left|center" android:id="@id/clock" androidaddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
ok i tried to change the clock color on my rom but i was unable to locate files i tried sme Tuto but files name are diffrent i'm using the belkota BETA1 Standard Edition - S4 and the clock color is blue wanna change it to white can you help me please thank you
Hi,
i just started using Eclipse to program my own Android app. I've got a 30x10 png image named "rb" and i cannot insert it into my app. It always says Failed to convert "@res/drawable-xhdpi/rb.png" into a drawable. Restart didnt solved the problem.
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/linearLayout1"
android:layout_centerHorizontal="true"
android:src="@res/drawable-xhdpi/rb" />