[Q] several screens in a firefox os app - Firefox OS General

Hi everyone!!
I am developing a firefox os app and the app will have several screens. I am wondering how to implement several screens.
I see two options:
To create only one file (index.html) and use several divs (sections) in that file.
Code:
<div id="presentation" class="page" data-role="page">
</div>
<div id="page_signin" class="page" data-role="page">
</div>
The second option would be to use several files, and in the index.html use several "<a>" elements and href attribute. So when you click on the "a" element a new page, lets say signin.html will open.
Code:
<div id="presentation">
<a href=”signin.html”>Sign in</a>
</div>
Which option would you prefer? Let me know if you would prefer a new solution.
Thank you very much!

Related

How do I edit default News, Sport, and Download links in Browser tab?

You can see my attached picture of my browser tab.
1. How can I edit the links you see for News, Sport, and Downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start Opera. I was able to change that but I can't find the other ones.
2. Also, can I change the text that says "o2 Internet-to-Go" directly below the globe?
Chris Cross said:
You can see my attached picture of my browser tab.
1. How can I edit the links you see for News, Sport, and Downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start Opera. I was able to change that but I can't find the other ones.
I think it displays whatever you have in your Opera bookmark. To change it, simply edit your bookmark in Opera browser.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Nope, editing the bookmarks doesn't seem to help - I definitively don't have any sports-related bookmarks left. Maybe some file in the Opera directory (\windows\Opera9\)?
chris cross said:
you can see my attached picture of my browser tab.
1. How can i edit the links you see for news, sport, and downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start opera. I was able to change that but i can't find the other ones.
2. Also, can i change the text that says "o2 internet-to-go" directly below the globe?
Click to expand...
Click to collapse
how you changed it???
Dude10 said:
how you changed it???
Click to expand...
Click to collapse
To change the URL for the globe picture, go to the registry:
HKLM\Software\Opera\Defaults
There you can tap on "HomePageURI" and enter the URL you want.
You can also enter a URL for "DefaultURI" but I'm not sure what that does yet.
I'm still looking for a way to edit the News, Sports, and Downloads links and also how to change the text below the globe. If anyone knows, please help.
tf3dconfig can for sure unblock branded apps in "programs", i don't remember exactely how i did it on mine for browser, but think the same way
EDIT: no, here how (in italian)
Since you are german, you should modify the file InternetPortal-de-DE.xml under \Windows
inside the xml you can also change the browser text
bbonzz said:
tf3dconfig can for sure unblock branded apps in "programs", i don't remember exactely how i did it on mine for browser, but think the same way
EDIT: no, here how (in italian)
Since you are german, you should modify the file InternetPortal-de-DE.xml under \Windows
inside the xml you can also change the browser text
Click to expand...
Click to collapse
Thanks! I'll take a look at it right now. I'll let you know how it goes.
Hmm, well I tried it, but it did not work.
I found the file you mentioned in the Windows folder.
I opened it in my computer (with notepad) and made the changes.
Then I replaced the file (overwriting) into the Windows folder.
I did a soft reset and nothing changed. But if I look at the xml file in the Windows folder, my changes are still there!
Any ideas?
Here is the original data:
Code:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<IncludeUserFavorites>True</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\O2_banner.qtc"
FocusImagePath="\Windows\O2_banner_select_bar.qtc"
Text="o2 Internet-to-Go"
Width="480"
Height="200" />
<OperatorLinks>
<Link
Text="News"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-news"
ImagePath="\Windows\O2_News.qtc" />
<Link
Text="Sport"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-sport"
ImagePath="\Windows\O2_Sports.qtc" />
<Link
Text="Downloads"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-downloads"
ImagePath="\Windows\O2_Download.qtc" />
<Link
Text="YouTube"
Executable="\Windows\youtube.exe"
ImagePath="\Windows\O2_YouTube.qtc" />
</OperatorLinks>
</InternetPortal>
And here is how I changed it:
Code:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<IncludeUserFavorites>True</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\O2_banner.qtc"
FocusImagePath="\Windows\O2_banner_select_bar.qtc"
Text="Internet"
Width="480"
Height="200" />
<OperatorLinks>
<Link
Text="News"
NavigateUrl="http://news.google.com/ncr"
ImagePath="\Windows\O2_News.qtc" />
<Link
Text="Sport"
NavigateUrl="http://abcnews.go.com/Sports"
ImagePath="\Windows\O2_Sports.qtc" />
<Link
Text="Downloads"
NavigateUrl="http://www.freewarepocketpc.net/"
ImagePath="\Windows\O2_Download.qtc" />
<Link
Text="YouTube"
Executable="\Windows\youtube.exe"
ImagePath="\Windows\O2_YouTube.qtc" />
</OperatorLinks>
</InternetPortal>
hmmm... I've done that way, with this cab
http://rs419.rapidshare.com/files/165035271/No_TIM_v0.1.cab
as you see inside the cab, the replaced files are "internet.lnk" and the "internetportal", no more...
bbonzz said:
hmmm... I've done that way, with this cab
http://rs419.rapidshare.com/files/165035271/No_TIM_v0.1.cab
as you see inside the cab, the replaced files are "internet.lnk" and the "internetportal", no more...
Click to expand...
Click to collapse
okay, let me see if that cab helps.
EDIT: Well, I don't really know how to edit the files in that cab so that they apply to the german file (DE) and not the Italian one (IT) and also to edit my desired links in the setup.xml file. Can anyone give me any tips?
Man, I feel I am so close to finally being able to do it, but it's just not working for me.
EDIT 2: I'll attach a copy of the cab so it remains here for the future in case someone wants to check it out.
maybe you have some more references in application data\htc
bbonzz said:
maybe you have some more references in application data\htc
Click to expand...
Click to collapse
In that folder, I only have 4 other folders (AudioManager_Eng; databases; HTC ALBUM; ygo) and none of them contain anything that would appear to help. Other than that, there is nothing in that folder (no hidden files or anything).
Found. Copy and overwrite this manila file to windows\
I've included your modified xml. It's a text file, so if you want you can always update/change it with notepad.
bbonzz said:
Found. Copy and overwrite this manila file to windows\
I've included your modified xml. It's a text file, so if you want you can always update/change it with notepad.
Click to expand...
Click to collapse
Oh man - it still didn't do it. I pasted it into windows\ did restarted TFL3D and nothing happened. I did a soft reset and still no change. I'm sure you have to be so close to figuring it out.
You know, I just thought of something. I installed the cab to have 15 tabs in TFL3D. Do you think that is stopping it from working? I don't see why it would.
Thanks so much for your help. I hope we can figure it out.
I'll try uninstalling the 15-tab cab and see what happens.
EDIT::::::
Unfortunately it still does not change anything. I uninstalled the 15-tab cab, did a soft reset, pasted again the file you sent (overwriting what was in the Windows folder) and the browser tab still has not changed. I wonder what the problem is.
Now I notice that when I stop or restart the TFL3D it gives me a "device.exe" error (send to Microsoft or don't send). I press don't send and everything continues fine. Anyway, I don't mind trying things out. I can always do a hard-reset if things get messed up. I'd really like it if we could solve this.
Last try, but if also this one doesn't work, your rom is haunted
try installing this theme, translucent & blue: it also have modifications on internet tab...
bbonzz said:
Last try, but if also this one doesn't work, your rom is haunted
try installing this theme, translucent & blue: it also have modifications on internet tab...
Click to expand...
Click to collapse
Nope, that did not do it either. It's a nice theme, but my Browser tab looks just like it always has. Man, I wonder why my phone is not allowing that to change. Do you need a cooked ROM? Mine is stock. I might try a hard reset and after that retry the things you suggested.
Seriously - thank you for all your help! If anything else comes to mind, let me know. In the mean time I'll keep looking to see how I can change that. As soon as it works, I'll post back here.
I wonder if I should try a cooked ROM. I've never done anything like that before, so I'm a bit nervous to do it. Well, I did flash my old Motorola v550, but this seems like a bigger task. I'll have to read the wiki to learn about SPL and ROMs and all that. That topic is completely new to me.
Really, don't know... My rom is branded, and i succeeded in unbranding the web tab at first attempt...
Well, I just did a hard reset and tried all the options again. Nothing changed. I wonder what is blocking it.
My ROM is 1.14.207.2 (24011) GER
I guess o2 did something so that you cannot change that. The strange thing is that I am able to overwrite the files in Windows. If I look at them on my PC, they show my information. So, I don't know why it is not working.
I might have to put a different ROM on there or just live with the slight branding links in that browser tab.
Thanks again for your help.
maybe...
what have you inside 26948339_manila?
are there references to the internet tab?
you should have only
Code:
<Page Order="7" Name="internet.page" PackageName="HTC" Title="[[IDS_INTERNETPORTALTITLE]]">
<ComponentReference Name="page" Mode9Path="HTC\internetportal.mode9" Component="GizmoRoot" SmartComponent="true" />
at the beginning, and nothing more in the rest of the file. If instead you have other web references there, maybe the trick is there
There is a ton of information in that file, but I searched in notepad and the only place the word "internet" appears is in this section here:
Code:
<Page Order="4" Name="internet.page" PackageName="HTC" Title="[[IDS_INTERNETPORTALTITLE]]">
<ComponentReference Name="page" Mode9Path="HTC\internetportal.mode9" Component="GizmoRoot" SmartComponent="true" />
<ComponentReference Name="icon_normal" Mode9Path="HTC\icons.mode9" Component="Internet_Off" />
<ComponentReference Name="icon_selected" Mode9Path="HTC\icons.mode9" Component="Internet_On" />
<ComponentReference Name="icon_preview" Mode9Path="HTC\icons.mode9" Component="Internet_Preview" />
</Page>
The word "o2" does not appear in that file.

6.5 Widget Creation

For those that have successfully created Widgets for WM 6.5, I need a little assistance.
I followed this guide (http://www.mobilitydigest.com/how-to-make-a-wm-65-widget/) and tried to create a couple of widgets. In fact, I first tried to just edit the config.xml and widget.htm files for a couple of the widgets already created to use different urls. In all cases I get an error in widget manifest. Installing the widgets they created works (I know I have widgets on my 6.5 ROM). I suspect that the issue is either saving the file in notepad (this seems unlikely) or the creation of the .wgt file. I tried zipping the files with both Windows Vista compression and 7 Zip. Neither allowed for the widget to install. I am not zipping with a folder in the compressed file, just the three files from the guide. Has anyone else had this problem? What am I missing?
did you compress the file, and change the extension from ".zip" to ".wgt"
?
me
I am also having problems i get an error message. http://www.fuzemobility.com/how-to-make-a-wm-65-widget/
post your files. it could be an error in the xml.
PearlMikeJam said:
For those that have successfully created Widgets for WM 6.5, I need a little assistance.
I followed this guide (http://www.mobilitydigest.com/how-to-make-a-wm-65-widget/) and tried to create a couple of widgets. In fact, I first tried to just edit the config.xml and widget.htm files for a couple of the widgets already created to use different urls. In all cases I get an error in widget manifest. Installing the widgets they created works (I know I have widgets on my 6.5 ROM). I suspect that the issue is either saving the file in notepad (this seems unlikely) or the creation of the .wgt file. I tried zipping the files with both Windows Vista compression and 7 Zip. Neither allowed for the widget to install. I am not zipping with a folder in the compressed file, just the three files from the guide. Has anyone else had this problem? What am I missing?
Click to expand...
Click to collapse
I am also having the same problem, xml below. If I rename-unzip-rezip-rename an existing widget it will install, the minute I try and make any changes to the config.xml or widget.htm it will not install returning the error "Sorry, this widget is not compatible with this device" I have tried editing the files with notepad and also VS2005, and have tried windows 7 zip, and winrar, any help would be appriciated.
XML from config.xml
<?xml version="1.0" encoding="utf-8" ?>
<widget version="1.0"
xmlns="http://www.w3.org/ns/widgets"
id="">
<name>Howell</name>
<content src="widget.htm" type="text/html" />
<access network="true" />
<icon src="icon.png"/>
<description>
Trial Widget test
http://howellassociates.co.uk
</description>
</widget>
Widget.htm
<html>
<head>
<title>howell</title>
</head>
<body bgcolor="#000000">
<iframe src="http://howellassociates.co.uk" width="100%" height="100%" style="background-color: white;">
<p>An error has occured.</p>
</iframe>
</body>
</html>
Here is an example of one of my widgets that do not work. I took the ESPN Widget from this link (http://www.fuzemobility.com/wm-65-widget-mania/) and just changed the url to be the iphone ESPN page since that is more finger friendly. It will not install, although the original ESPN widget would installed (I tried mine first, so I am sure there was not a conflict of having two of the same widgets).
I did all my editing in Notepad and compressed using the basic Vista compress/zip feature in explorer.
Thanks for the help.
The zip file has the xml, htm and png file, along with the wgt file I created that will not install
@pearlmikejam
ther error is in the xml, more specifically, the url to espn's site in the description.
Output:
"A semi colon character was expected. Error processing resource 'file:///C:/Users/hrhnick/Desktop/config.xml'. Line 12, Pos...
http://m.espn.go.com/wireless/?w=18iu5&e=AWA&iphone="
try removing the link, or shortening it to the the slash right after the wireless. and you should be good!
@avengerpenguin
hmmmmm... i couldnt find anything wrong. it may be the way your packaging and renaming. You did include an icon file too?
also, have you installed 3rd party widgets before? you may need to enable them on your phone with themuzz's cab.
hrhnick said:
@avengerpenguin
hmmmmm... i couldnt find anything wrong. it may be the way your packaging and renaming. You did include an icon file too?
also, have you installed 3rd party widgets before? you may need to enable them on your phone with themuzz's cab.
Click to expand...
Click to collapse
I have successfully installed widgets using themuzz's cab hence my confusion. I used the original icon from the widget I butchered to test this on, but left it as is to avoid changing to many things at once, I will have a look at how I re-pack the files, but this doesnt pose a problem unless I alter something within config.xml or widget.htm
I will continue my fault finding and try and report back later.
hrhnick said:
@pearlmikejam
ther error is in the xml, more specifically, the url to espn's site in the description.
Output:
"A semi colon character was expected. Error processing resource 'file:///C:/Users/hrhnick/Desktop/config.xml'. Line 12, Pos...
http://m.espn.go.com/wireless/?w=18iu5&e=AWA&iphone="
try removing the link, or shortening it to the the slash right after the wireless. and you should be good!
Click to expand...
Click to collapse
Thanks for the reply. I did some experimenting and was able to get this to install wihout a URL in the config.XML file. It does not seem to serve any purpose. Any idea what the parameters are for the urls? Is there a character limit for descriptions?
There's no character limit but some pages simply don't load right. It's a pain. Like FaceBook would not let use choose between the full version and mobile - regardless of the site it decided for us. To test widgets you can try this though: http://widgetemulator.codeplex.com/
PearlMikeJam said:
Thanks for the reply. I did some experimenting and was able to get this to install wihout a URL in the config.XML file. It does not seem to serve any purpose. Any idea what the parameters are for the urls? Is there a character limit for descriptions?
Click to expand...
Click to collapse
I think the url in the config file is purely for the description when installing, but I may be wrong I dont believe that it has any real purpose.
fixed, widget not intended for this device problem
On another note I have solved my problem with the widgets not installing and returning the error message about not being intended for this device.
I appeared to have been making a school boy error when packaging my config.xml,icon, and widget.htm files, I was foolishly "zipping" the folder containing my files rather than selecting the 3 files and sending them to a compressed folder.
For anyone else making this error unless you zip the files directly it causes the config.xml file to not be in the root folder.
Thanks to all those who tried to help.
Thanks AvengerPenguin, you identified the problem I was having, duhh!
Anyway, in celebration, here is my first widget - Ninjawords. It just hyperlinks to the ninjawords.com site for quick dictionary lookups, but a useful little widget for me, and non of that Apple Censorship fluff.
Oh yes, you'll have to download and unzip the wgt as xda-dev's won't let me post wgt files.

[Q] File extension to launch browser?

Hello,
I'll admit upfront I'm a newbie with Android so please bear with me.
In Windows, Internet Explorer favourites have an extension of URL and when I click on them in a file manager, the default launcher opens to that web site.
Does this capability exist in Android? I want to be able to have a folder with Internet links in it, be able to browse that folder with a file manager, and tap on a link to open the web site in the default browser.
I don't want to use the bookmarks feature that's built into the web browsers I've tried.
I'm running CM7.1+ if that makes a difference.
Thanks,
Steve
Not Nook related, but an Android thing, I haven't found an answer to the URL extension myself. I'd like to put a URL file on my sdcard and open it with a browser via file manager, but it doesn't work.
Here is a workaround. Give your file an HTML extension, and put your link in as follows:
Code:
<html>
<head>
<meta http-equiv="Refresh" content="0;url=https://www.google.com/" />
</head>
<body>
<p>Redirecting...</p>
</body>
</html>

App crashes when implementing Action Bar support v7 library for android 2.3 and above

I have successfully created an app in Eclipse and it works for android 4.0 and above. Now I want to make it compatible also for android 2.3 and above. In my app I have used action bar, so I have added the android-support-v7-appcompat library project in my workset in my workspace. After following the instructions from Google, now I have 'android-support--v7-appcompat.jar' and 'android-support-v4.jar'under my projects Android Private Libraries section. Also I have the jar files under libs folder of my project.
In my Main Activity, I have imported:
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
In AndroidManifest.xml file, I have declared:
<application android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat"
Also, for different activities, declared as:
<activity android:
android:uiOptions="splitActionBarWhenNarrow"
Previously my AndroidManifest.xml was like this:
<application android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme"
and the styles.xml under res>values folder was like this:
<resources >
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
used
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
in values-v11 folder and
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 11 theme customizations can go here. -->
</style>
in values-v14 folder.
I have now included all the styles_base.xml and themes_base.xml files from the library project to my project. Also changed styles.xml file by replacing Theme with App.Compat.
Everytime I run the app, I face crashing, now even for 4.0 and later android versions. The message:
java.main.NoClassDefFounderError: android.support.v7.appcompat.R$styleable
at android.support.v7.app.ActionBarActivityDelegate.onCreate
I am yet to find out what's the best policy to implament support library for action bar
Try that in your activity tags:
Code:
<activity android:theme="@style/Theme.AppCompat.Light" ... >
(http://developer.android.com/guide/topics/ui/actionbar.html#Adding)
and that's how to implement a split ActionBar:
Code:
<activity uiOptions="splitActionBarWhenNarrow" ... >
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
(http://developer.android.com/guide/topics/ui/actionbar.html#Adding)
Read that: http://developer.android.com/guide/topics/ui/actionbar.html#Adding
At least in Android Studio you need to add the support repository as a module, too.
It is quite different than using ActionBarSherlock, but it is great and easier if you understand it. To me it seems to be faster, too.
EDIT: And please put your code into
Code:
tags. ;)
Re:
My Bad. I couldn't find out the
Code:
tag.
I tried android:theme= [user=262514]@style[/user]/AppTheme" in manifest.xml and defined in stules.xml:
[CODE]<resources >
<style name="AppTheme" parent= [user=262514]@style[/user]/Theme.AppCompat.Light">
<item name = "actionBarStyle">
[user=262514]@style[/user]/Widget.Styled.ActionBar
</item>
</style>
</resources>
Showing "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.AppCompat.Light'."
Just to mention, I can see the two library jar files I have in 3 different locations. Under Android Private Libraries, under Referenced Libraries and under libs folder. Do I keep all the jar files or should I delete some.
PallabIslam said:
My Bad. I couldn't find out the
Code:
tag.
I tried android:theme= [user=262514]@style[/user]/AppTheme" in manifest.xml and defined in stules.xml:
[CODE]<resources >
<style name="AppTheme" parent= [user=262514]@style[/user]/Theme.AppCompat.Light">
<item name = "actionBarStyle">
[user=262514]@style[/user]/Widget.Styled.ActionBar
</item>
</style>
</resources>
Showing "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.AppCompat.Light'."
Just to mention, I can see the two library jar files I have in 3 different locations. Under Android Private Libraries, under Referenced Libraries and under libs folder. Do I keep all the jar files or should I delete some.
Click to expand...
Click to collapse
//Removed as it was wrong.
Yeah, it didn't find that for me, too. That's why I needed to add the support repository as a module in AndroidStudio.
A tutorial for doing that in Eclipse: http://stackoverflow.com/questions/17856531/android-actionbarcompat-library (This step is important!)
If it says it can't retrieve the style when using @style/Theme.AppCompat.Light, then you probably have only imported the android-support-v7.jar file, but not the library itself (I did the same mistake the day it was out).
You need to import it from your sdk's /extras/android/support/v7/AppCompat folder.
Otherwise you're missing all the resources. Its /src dir is actually empty but needed for the build system to work properly.
EDIT: my bad, misread your post, as nikwen said, you want to retrieve the style from your project's namespace, not the android namespace, so remove the android: prefix
If you got 5 minutes to spend, watch this video and you'll be all set:
If you're still using Eclipse (booh!^^), you can use the Maven plugin to retrieve the library's artifact, otherwise all the steps are the same.
Androguide.fr said:
If it says it can't retrieve the style when using @style/Theme.AppCompat.Light, then you probably have only imported the android-support-v7.jar file, but not the library itself (I did the same mistake the day it was out).
You need to import it from your sdk's /extras/android/support/v7/AppCompat folder.
Otherwise you're missing all the resources. Its /src dir is actually empty but needed for the build system to work properly.
EDIT: my bad, misread your post, as nikwen said, you want to retrieve the style from your project's namespace, not the android namespace, so remove the android: prefix
If you got 5 minutes to spend, watch this video and you'll be all set:
If you're still using Eclipse (booh!^^), you can use the Maven plugin to retrieve the library's artifact, otherwise all the steps are the same.
Click to expand...
Click to collapse
Yeah, exactly. He needs to add that. That's what my link is about.
//Removed as it was wrong.
Android Studio is great.
nikwen said:
Yeah, exactly. He needs to add that. That's what my link is about.
//Removed as it was wrong.
Android Studio is great.
Click to expand...
Click to collapse
Yeah, once you get used to gradle it's awesome. Even more after getting rid of the horrid blurry icon :angel:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Androguide.fr said:
Yeah, once you get used to gradle it's awesome. Even more after getting rid of the horrid blurry icon :angel:
Click to expand...
Click to collapse
Thanks for the video above. I implented ActionBarCompat without that video. It would have saved me some time.
My icon is looking really ugly. Where can I get your icon from?
nikwen said:
Thanks for the video above. I implented ActionBarCompat without that video. It would have saved me some time.
My icon is looking really ugly. Where can I get your icon from?
Click to expand...
Click to collapse
Here you go, it's attached to this post.
Just drop it in the /bin folder of your studio install, then open a shell and do:
Code:
gnome-desktop-item-edit Desktop --create-new
It will open a visual daemon, name it whatever you want, point it to the /bin/studio.sh file of your install and click on the icon to select mine. (If you didn't put it in /bin too the icon would be the ugly one when the app is opened)
You'll then have a desktop shortcut you can drop to your sidebar.
Androguide.fr said:
Here you go, it's attached to this post.
Just drop it in the /bin folder of your studio install, then open a shell and do:
Code:
gnome-desktop-item-edit Desktop --create-new
It will open a visual daemon, name it whatever you want, point it to the /bin/studio.sh file of your install and click on the icon to select mine. (If you didn't put it in /bin too the icon would be the ugly one when the app is opened)
You'll then have a desktop shortcut you can drop to your sidebar.
Click to expand...
Click to collapse
I have already created a *.desktop file for the sidebar. I just need to change that one line with the icon.
Thank you very much! :good:
EDIT: It is just bad that ActionBarCompat does not provide a version of a PreferenceActivity or a support PreferenceFragment.
nikwen said:
I have already created a *.desktop file for the sidebar. I just need to change that one line with the icon.
Thank you very much! :good:
EDIT: It is just bad that ActionBarCompat does not provide a version of a PreferenceActivity or a support PreferenceFragment.
Click to expand...
Click to collapse
Yeah... same for custom layouts in menus (android:actionLayout & MenuItem.getActionView()), I'm actually now using both ActionBarCompat and ActionBarSherlock as I'm too lazy to rollback just yet^^
Androguide.fr said:
Yeah... same for custom layouts in menus (android:actionLayout & MenuItem.getActionView()), I'm actually now using both ActionBarCompat and ActionBarSherlock as I'm too lazy to rollback just yet^^
Click to expand...
Click to collapse
They said something really interesting on the I/O:
http://www.youtube.com/watch?v=Jl3-lzlzOJI&feature=youtu.be&t=3m47s
EDIT: Their workaround for the Preferences: Using the ActionBarCompat themes, the title bar is hidden on old platform versions.
Androguide.fr said:
Yeah... same for custom layouts in menus (android:actionLayout & MenuItem.getActionView()), I'm actually now using both ActionBarCompat and ActionBarSherlock as I'm too lazy to rollback just yet^^
Click to expand...
Click to collapse
It's not like they've done something new with ActionBarCompat regular ABS will serve us for as long as there is a need to support 2.x devices.
radical_thinking said:
It's not like they've done something new with ActionBarCompat regular ABS will serve us for as long as there is a need to support 2.x devices.
Click to expand...
Click to collapse
Even Google admits that: http://www.youtube.com/watch?v=Jl3-lzlzOJI&feature=youtu.be&t=3m47s
:laugh:
Google...
nikwen said:
Even Google admits that
:laugh:
Click to expand...
Click to collapse
Yea Roman talks about it in a few of Android Design in Action episodes how it's just a wrapper around the real actionbar on ICS+ so I guess once we get to that time we will need Jake to develop a new library that will backport functionality from Android 5.0 back to 4.0 because Google wont have time to do that for at least a year and a half...
The style not found issue is a bug in the XML source editor in the IDE. The app should still build just fine.
http://code.google.com/p/android/issues/detail?id=58075
Kelex24 said:
The style not found issue is a bug in the XML source editor in the IDE. The app should still build just fine.
http://code.google.com/p/android/issues/detail?id=58075
Click to expand...
Click to collapse
Yeah, I saw a link to this at Stackoverflow. However, there are two sides.
There is this error in the IDE. However, it cannot build without the support repository. That might be the issue here.

AdMob Issues - Logcat

Hello Frieds,
Today while I tried to integrate Admob in my app...
Im Facing this error while running the app in Emulator.
http://pastebin.com/Tbg06tdR
This is the code that I have put up in my XML.
Code:
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_alignParentBottom="true"
android:layout_below="@+id/gridView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
ads:adUnitId="a155465208dx522s"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"
/>
You have an error at line 27. Want a hint? For integrate AdMob into your Android application follow this method:
Into your layout insert
Code:
<LinearLayout
android:id="@+id/ads"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"/>
Into your Activity insert
Code:
AdView adView = new AdView(this, AdSize.BANNER, "your_id");
LinearLayout layout = (LinearLayout)findViewById(R.id.ads);
layout.addView(adView);
adView.loadAd(new AdRequest());
This is a very quickly and efficient way to integrate AdMob.
CrotaNexus said:
You have an error at line 27. Want a hint? For integrate AdMob into your Android application follow this method:
Into your layout insert
Code:
<LinearLayout
android:id="@+id/ads"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"/>
Into your Activity insert
Code:
AdView adView = new AdView(this, AdSize.BANNER, "your_id");
LinearLayout layout = (LinearLayout)findViewById(R.id.ads);
layout.addView(adView);
adView.loadAd(new AdRequest());
This is a very quickly and efficient way to integrate AdMob.
Click to expand...
Click to collapse
Thanks that worked...Actually the main issue was that the SDK was not properly getting integrated in the app.
Solution
Go to Project Properties :
Then Built Path : Order and Export and select AdMob SDK there...
Click to expand...
Click to collapse
But I will be going Java way only. Just 1 thing any suggestion for using this for every layout as I dont want to create the Layout in every xml file as well as repeating the code in every java file too.
coolbud012 said:
Just 1 thing any suggestion for using this for every layout as I dont want to create the Layout in every xml file as well as repeating the code in every java file too.
Click to expand...
Click to collapse
I have never tried but you can make a layout that has the LinearLayout inside and after, into the desidered layout, include it with include tag. For the Java code, instead, you can try to do a method and pass the LinearLayout. I don't know if these solutions work. Try yourself.
CrotaNexus said:
I have never tried but you can make a layout that has the LinearLayout inside and after, into the desidered layout, include it with include tag. For the Java code, instead, you can try to do a method and pass the LinearLayout. I don't know if these solutions work. Try yourself.
Click to expand...
Click to collapse
I know about include..Trying to figure it out what should I do exactly...
BTW thanks
coolbud012 said:
I know about include..Trying to figure it out what should I do exactly...
BTW thanks
Click to expand...
Click to collapse
Make a custom view which extends LinearLayout ( or maybe FrameLayout would be better?) And have it create the adview as child with id and stuff you need. Then you just need to copy paste the XML tag into every layout file.

Categories

Resources