[GUIDE] Quantum Paper UI - Java for Android App Development

{
"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"
}
As we all know, Google's planning something quite new for it's beloved Android users. So after examining and researching more into Google's new project Quantum Paper.
I have created a resource base for your project layouts, so you can make your app look more like Google's upcoming project Quantum Paper.
Please note - I have added explanations as there new comers to Android development and perhaps these explanations will help them understand what these certain files do.
Outcome design - One of my simple projects, click here to see what it'll look like.
Project source code and installable apk - click here.
What you'll need -
[x] Eclipse, Android Studio or any Android app developing IDE.
[x] Paint.NET or any image editor.
[x] My custom resource package - Download
[x] Some experience with the IDE that you're using, as I will not be showing you how to use it.
Setup -
Create the following folders and files in your project.
[x] A directory named drawable.
[x] A directory named drawable-nodpi.
[x] A file named colors.xml in the values directory.
Explanation -
Drawable folder - The reason you need a folder named drawable is because we want to create code based images. This is a better approach to things that deal with button clicks, layouts and such. This eliminates warped layouts and stuff.
Drawable-nodpi folder - Since I have made UI images just by using screenshots and the information provided, I cannot present you with a proper dpi image.
But on the other hand, these .pngs are high quality so don't worry about it being unclear.
Colors.xml - An easy way to store preset hex colour codes in Android. It's made so you do not have to enter hex codes manually or for people that just want to link it to the colour they want with the name provided with the hex colour, it's sort of like an ID.
Let's start
Okay, the first thing you will have to do is, unpack the resource file I have provided you with somewhere appropriate, such as the desktop.
Navigate to Action Bar Colors and open the colors.xml file. From there, copy and paste the colours you know you'll be working with in your projects colors.xml file. Now navigate to the Card Layout directory and copy bg_card.xml to your projects drawable directory.
Now head into the Menu Buttons directory. And you will be greeted with two folders, one named normal and the other named pressed. Copy the coloured menu button that you wish to use from both directories to your projects folder named drawable-nodpi. For example, if you want to have a blue ActionBar, then go ahead and copy menu_button_blue and menu_button_blue_pressed.
Now we can go ahead and create our selectable menu buttons.
Create an .xml called menu_button_colorname. For exmaple - menu_button_blue.xml in the drawable folder.
I named it blue because the menu buttons are blue, if it's another colour please link it to that to make things easier.
Add the following code inside the .xm file you have just created. (menu_button_blue.xml/whatever the colour name is)
Code:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/[COLOR="RoyalBlue"]menu_blue_pressed[/COLOR]"/>
<item android:state_pressed="true" android:drawable="@drawable/[COLOR="rgb(65, 105, 225)"]menu_blue_pressed[/COLOR]" />
<item android:drawable="@drawable/[COLOR="rgb(65, 105, 225)"]menu_blue[/COLOR]" />
</selector>
Replace the lines in red with the resource colour name. ie - menu_button_green, if you're making a green button.
For example, if I have a green action bar, and I have chosen my green menu buttons. I will change the blue to green, like below -
Code:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/[COLOR="rgb(152, 251, 152)"]menu_green_pressed[/COLOR]"/>
<item android:state_pressed="true" android:drawable="@drawable/[COLOR="rgb(152, 251, 152)"]menu_green_pressed[/COLOR]" />
<item android:drawable="@drawable/[COLOR="PaleGreen"]menu_green[/COLOR]" />
</selector>
Now go into activity_main.xml (The main layout, this may be different if you have changed the name). And replace all the code with this following code -
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue" <!-- Change the main window colour to whatever colour you like -->
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#eeeeee"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/action_bar"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="@color/blue" > <!-- This should be the same colour as your main window background -->
<ImageButton
android:id="@+id/qpaper_menu"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@drawable/menu_button_blue" /> <!-- This should be the same colour as your action bar layout -->
<TextView
android:id="@+id/app_header_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/qpaper_menu"
android:text="You applications name" <!-- Change it to your apps name -->
android:textColor="#fff"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="350dp" <!-- Change this to what ever height you want to make the layout bigger -->
android:layout_margin="12dp"
android:background="@drawable/bg_card"
android:orientation="vertical" >
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
The code above is a pre-set template layout. So you will have to do some experimental and edits to the code, I have supplied the code with minor notes to help you. Also many of you guys would probably wish to add more card views than just one.
To add more card views add the code below under the original card view, you can see it above.
Code:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="350dp" <!-- Change this to what ever height you want to make the layout bigger -->
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="12dp" <!-- Ihave not added marginTop because you don't want to have a huge gap between your card placements -->
android:background="@drawable/bg_card"
android:orientation="vertical" >
</RelativeLayout>
And yes, you can add scrollable views without issues, so you can scroll through your interface .
I will be updating this thread regularly with new info, package updates with new resources and new guide sections.

This is Fantastic!
Here is a patchwork job I did of the Google+ and Youtube card interfaces. It looks like they made the shadow a bit subtler and added a 1 px border that goes from dark to slightly lighter on the top. This is probably part of their Hera/Moonshine UI, do you think it'll be part of Quantum Paper cards, too? If so, I'm not able to figure out how to define it in an XML relative to what you've posted.
Again, great tutorial and starter project!!
See below:

Great job on reaching portal. Shouldn't be surprised from your previous works. Are you planning on adding these changes to your themed apps?

Fitchman said:
This is Fantastic!
Here is a patchwork job I did of the Google+ and Youtube card interfaces. It looks like they made the shadow a bit subtler and added a 1 px border that goes from dark to slightly lighter on the top. This is probably part of their Hera/Moonshine UI, do you think it'll be part of Quantum Paper cards, too? If so, I'm not able to figure out how to define it in an XML relative to what you've posted.
Again, great tutorial and starter project!!
See below:
Click to expand...
Click to collapse
I will definitely take a look at this, and try and see if I can make something similar to this. I'll defiantly update the thread if I find a way.
pandasa123 said:
Great job on reaching portal. Shouldn't be surprised from your previous works. Are you planning on adding these changes to your themed apps?
Click to expand...
Click to collapse
Thanks! And I haven't recently released any new themed applications so I'm unaware if I will do so.
I've created some extra .pngs and will be updating the resource package do there is a better selection of buttons.
@Fitchman I have found a workround - Let me know if it works.
Click here

Beautiful! This is how it looks.... Thanks for such resources!!!

Thank you for this
One mistake though, the parts in bold and underlined should be removed.
krishneelg3 said:
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/[COLOR="Red"]menu_[b][u]button_[/b][/u]blue[/COLOR]"
android:state_focused="true"
android:state_pressed="true" />
<item android:drawable="@drawable/[COLOR="red"]menu_[b][u]button_[/b][/u]blue_pressed[/COLOR]"
android:state_focused="false"
android:state_pressed="true" />
<item android:drawable="@drawable/[COLOR="red"]menu_[b][u]button_[/b][/u]blue_pressed[/COLOR]"
android:state_focused="true" />
<item android:drawable="@drawable/[COLOR="red"]menu_[b][u]button_[/b][/u]blue[/COLOR]"
android:state_focused="false"
android:state_pressed="false" />
</selector>
Click to expand...
Click to collapse

XxPixX said:
Thank you for this
One mistake though, the parts in bold and underlined should be removed.
Click to expand...
Click to collapse
thanks for pointing it out, I'll edit the thread sometime.
Sent from my Nexus 5 using Tapatalk

Thank you, Thats awesome! Under which license is this released? Read the readme, but I am not sure.

I am getting this error :

The resources are not license released. Its just a project that I've been working on with my apps. And decided to share my resources with the community.
Sent from my Nexus 5 using Tapatalk

Ashutos1997 said:
I am getting this error :
Click to expand...
Click to collapse
Try @string/app_name and let me knows what happens. It shouldn't give an error. also, hover your mouse on the "error" icon thing. and it'll tell you what the issue is, let me know what it says.
Sent from my Nexus 5 using Tapatalk

Ashutos1997 said:
I am getting this error :
Click to expand...
Click to collapse
Just delete those comments

Update : error solved. Thanks for the resources
---------- Post added at 07:26 PM ---------- Previous post was at 06:58 PM ----------
bamsbamx said:
Beautiful! This is how it looks.... Thanks for such resources!!!
Click to expand...
Click to collapse
Just asking, how u added "Hello, Quantum" inside the card ?
---------- Post added at 07:34 PM ---------- Previous post was at 07:26 PM ----------
Added a scroll view, looks good

it looks like this is mainly for android 4.4? will it work on all or is it just for 4.4?

Sahaab said:
it looks like this is mainly for android 4.4? will it work on all or is it just for 4.4?
Click to expand...
Click to collapse
Only 4.4 i guess.

Ashutos1997 said:
Only 4.4 i guess.
Click to expand...
Click to collapse
ya thought so, anywayz it is an awesum guide
wanted to use it :-/ but im on 4.3 XD

Here's my app, haven't done much to it yet. Still gotta add a lot.
I changed a few of the resources too to suit my taste

I uploaded the basic app structure / template for the QuantumPaperUI , It includes :
Two cards
Scroll View
Green color

Sahaab said:
ya thought so, anywayz it is an awesum guide
wanted to use it :-/ but im on 4.3 XD
Click to expand...
Click to collapse
you may use it for 4.3 or any android version, but you won't be able enable transparent bars.
Sent from my Nexus 5 using Tapatalk

krishneelg3 said:
you may use it for 4.3 or any android version, but you won't be able enable transparent bars.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
oh ok so it shud work on gingerbread as well
thnx man i will surely try it out, i want to make a new UI for my app

Related

[Dev] rlToday

I've made a new small Today Plugin, which makes of XML Files like this
Code:
<?xml version="1.0" ?>
<today height="100">
<AnalogClock x="0" y="0" clockface="blueclockface100.bmp" />
<AnalogClock x="200" y="0" clockface="blueclockface40.bmp" />
<Text x="210" y="40" text="Korea">
<Font size="8" />
</Text>
<AnalogClock x="200" y="50" clockface="blueclockface40.bmp" />
<Text x="210" y="90" text="Mexiko">
<Font size="8" />
</Text>
<DigitalClock x="160" y="120" format="hh:mm" />
<Image x="110" y="3" source="ical.png" />
<Date x="130" y="23" format="d">
<Font size="20" weight="bold" font="Tahoma" />
</Date>
<Text x="90" y="85" text="(c) by Andre Adrian" />
</today>
a screen like this (the part with the analog clocks):
{
"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"
}
I would like to here your ideas for such a thing.
sincerely,
Andre
Download Page at rotlaus.de
good work ! thanks
Fixed some Bugs, runs a lot more stable now. Skin is choosable in the INI File in the Program Directory. Settings Dialog is prepared.
I've put the actual Version in the First Post.
Very nice! For some reason it does not load for me, gotta play with it when I wake up today.
This plugin is what i have been looking for. And it is very customizeable too.
Thanks a lot Rotlaus.
EDIT: my xda mini's display hangs after a few minutes when i use the plugin.
oldsap said:
EDIT: my xda mini's display hangs after a few minutes when i use the plugin.
Click to expand...
Click to collapse
Yeah, should be fixed in the new version.
New:
Tap&Hold Menu with 2 choices:
- Options Dialog (Nothin there yet)
- Reload Skinfile (usefule while skinning)
Attachementt in the first post actualized.
Version 0.1.3 now available
Neu:
Transparency color can be freely choosen::
Code:
<today height="100" transparent="RGB(255,0,255)">
DigitalClock, Date and Text Elements can have their own color:
Code:
<DigitalClock x="160" y="20" format="hh:mm" color="RGB(0, 255 ,0)" />
<Date x="130" y="23" format="d.M.yyyy" color="RGB(128, 255 ,0)">
<Text x="90" y="85" text="(c) by Andre Adrian" color="RGB(0, 255 ,0)" />
The Hands of the AnalogClock can be coloured individually and can be switched on or off:
Code:
<AnalogClock x="0" y="0" clockface="blueclockface100.bmp">
<Hourhand color="RGB(255, 255 ,0)" />
<Minutehand color="RGB(255, 255 ,0)" />
<Secondhand show="false" />
</AnalogClock>
All these Parameters are optional.
Thanks for the new version Rotlaus
ive posted it on my blog
http://oldsap.blogspot.com/2006/06/rltoday-freeware-pocketpc.html
Thanks rotlaus, takes me back to my ms smartphone days = when I used to design my home screen through xml!! I still love my spv c500 . I will enjoy fiddling with this and getting it set up the way I like it - cheers!
EDIT This is what i managed to do :wink:
EDIT 2 It would be good if when you clicked on the plugin that one of the options be the clock\alarm settings screen - thanks
meschle said:
Thanks rotlaus, takes me back to my ms smartphone days = when I used to design my home screen through xml!! I still love my spv c500 .
Click to expand...
Click to collapse
Hi meschle & Rotlaus,
Will it work in VGA (Universal).
rmercado said:
meschle said:
Thanks rotlaus, takes me back to my ms smartphone days = when I used to design my home screen through xml!! I still love my spv c500 .
Click to expand...
Click to collapse
Hi meschle & Rotlaus,
Will it work in VGA (Universal).
Click to expand...
Click to collapse
I am pretty sure it will - you will probably have to edit the xml file so that the position of the clock etc.. is to your liking.
meschle said:
I am pretty sure it will - you will probably have to edit the xml file so that the position of the clock etc.. is to your liking.
Click to expand...
Click to collapse
meschle,
Thanks, it is working in VGA, the problem is the resedue of the pink background retains at the edge of the images. Unlike your attached image it is clear. Also I tried to reduce the font size (size=6) and it seems not working.
One more, Can I reduce the size of the Clock (let say 20), I am woried about the arm of the clock, it may not fit to the clock face.
Thanks,
rmercado said:
meschle said:
I am pretty sure it will - you will probably have to edit the xml file so that the position of the clock etc.. is to your liking.
Click to expand...
Click to collapse
meschle,
Thanks, it is working in VGA, the problem is the resedue of the pink background retains at the edge of the images. Unlike your attached image it is clear. Also I tried to reduce the font size (size=6) and it seems not working.
One more, Can I reduce the size of the Clock (let say 20), I am woried about the arm of the clock, it may not fit to the clock face.
Thanks,
Click to expand...
Click to collapse
Hi - I have edited the images to get rid of the purple\pink effect :wink:
I think size 6 font is a little small for the screen, try 7 or 8 - clock size 20 probably too small - the one on the left of the screen is 16 and wont allow the arms to show.
I have images 60, 40 and 16 which are all edited to remove the pink\purple effect - find them attached in the zip below.
Wow, it is clear now (how did you do that?). I still cant change the font size. I hve to do more reading I suppose.
Anyway thanks for your help, at least I have a descent clock now in may jasjar...
Oppps...! one more problem... the plug-in background is blur. it is supposed to be transparent like the others.
General comment: a litle bit enhancement and this software is great...
Cheers,
rmercado said:
Wow, it is clear now (how did you do that?). I still cant change the font size. I hve to do more reading I suppose.
Anyway thanks for your help, at least I have a descent clock now in may jasjar...
Oppps...! one more problem... the plug-in background is blur. it is supposed to be transparent like the others.
General comment: a litle bit enhancement and this software is great...
Cheers,
Click to expand...
Click to collapse
I edited bmp in photo editing software.
In mine its fully transparent.
Try my skin.xml - you may find it easier to edit as its simplified - attached
Sorry for the delay, i was very busy the last days.
New Version in the first Post.
Changes:
- no fiddling with the transparent color (pink), i support now real PNG Transparency
- also Alpha Blending is supported
- For the analog clock hands you can now use graphics (See the swiss skin attached to this post). This will look like this:
But beware, this graphic clockhands are very memory hungry...
cu,
Andre
Thanks rotlaus - will update my skin and images as necessary - cheers!
EDIT the dll for this has gone from 78kb to 429kb - how comes such a large increase??
meschle said:
EDIT the dll for this has gone from 78kb to 429kb - how comes such a large increase??
Click to expand...
Click to collapse
This is cause of the new graphics library which enables real transparency, alpha blending and the graphical clock hands.
Filesize has grown too big in my oppinion. I don`t want to waste huge amounts of space for something as simple as a today plugin. If you could reduce filesize or make a "light" version or something it'd be great.
Anyways, besides from the size, great work, thank you!
yoda_143 said:
Filesize has grown too big in my oppinion. I don`t want to waste huge amounts of space for something as simple as a today plugin. If you could reduce filesize or make a "light" version or something it'd be great.
Anyways, besides from the size, great work, thank you!
Click to expand...
Click to collapse
I could drop JPEG Support. I don't need it. Then the dll would get around 350Kb. But still big. It'll grow anyway cause of future features that i'm currently developing.
@all: Do you need JPEG Support?

New Theme Idea (With Screenshot). Anyone want to help me develop it?

Hello,
I quickly put together a picture that represents what I want my theme to look like (XiaMultiTheme). I want it to be small, quick, but have a classy look. I could develop this by myself, but it could take awhile, but having someone help would speed this up greatly!
{
"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"
}
I would like the wallpaper to change depending on the chosen weather location. Is there a mortscript to change the Today Screen Wallpaper depending on the weather? (I know this is available for S2U2).
No icons in this screenshot are original, so I will either have to get permission to use them in a final version or create my own.
Please tell my your thoughts, and contact me if you would like to help develop it!
Edit: I am using XIAMultitheme, but having trouble with the XML. For some reason, nothing is showing up with certain code. Also, is there a good visual XML editor I could use? Right now, I just have to edit the coordinates...
Here is the code for the Browsers page, which will not show up...
Code:
<Page name="Browsers" group="Browsers" visible="1">
<Image x="14" y="12" source="icons\internetexplorer.png" >
<OnClick event="0" File="\Windows\Start Menu\Programs\Internet Explorer Mobile.lnk" />
</Image>
<Text name="InternetExplorer" x="20" y="66" alignment="left" color="RGB(255,255,255)" text="Internet Explorer">
<Font size="20" font="Helvetica LT Light"/>
</Text>
<Image x="51" y="4" source="icons\line.png" >
</Image>
<Image x="56" y="14" source="icons\opera.png" >
<OnClick event="0" File="\Windows\Start Menu\Programs\Opera Mini.lnk" />
</Image>
<Text name="OperaMini" x="64" y="66" alignment="left" color="RGB(255,255,255)" text="Opera Mini">
<Font size="20" font="Helvetica LT Light"/>
</Text>
</Image>
<Image x="98" y="4" source="icons\line.png" >
</Image>
<Image x="104" y="14" source="icons\opera.png" >
<OnClick event="0" File="\Windows\Start Menu\Programs\Opera Mobile.lnk" />
</Image>
<Text name="OperaMobile" x="112" y="66" alignment="left" color="RGB(255,255,255)" text="Opera Mobile">
<Font size="20" font="Helvetica LT Light"/>
</Text>
</Image>
<Image x="146" y="4" source="icons\line.png" >
</Image>
<Image x="151" y="14" source="icons\skyfire.png" >
<OnClick event="0" File="\Windows\Start Menu\Programs\Skyfire.lnk" />
</Image>
<Text name="SkyFire" x="159" y="66" alignment="left" color="RGB(255,255,255)" text="SkyFire">
<Font size="20" font="Helvetica LT Light"/>
</Text>
</Image>
<Image x="194" y="4" source="icons\line.png" >
</Image>
<Image x="4" y="199" source="icons\1.png" >
<OnClick event="0" File="\Program Files\XIAMultiTheme\Tools\ShowMissedCalls.exe" />
<OnClick event="1" File="mscr\Selectapp1.mscr"/>
</Image>
<Registry name="messageCountButton" x="50" y="191" alignment="right" source="0.png" sensor="registry" key="HKEY_CURRENT_USER\System\State\Phone\Missed Call Count" group="Browsers">
<Font font="folder:messagecount"/>
<OnEvent event="34" File="move:messageCountButton=58,167" Command="" />
<OnEvent event="33" File="move:messageCountButton=58,167" Command="" />
</Registry>
<Text name="messageCount" x="41" y="199" alignment="center" text="" unknown="" sensor="registry" key="HKEY_CURRENT_USER\System\State\Phone\Missed Call Count" group="Browsers" color="RGB(255,255,255)">
<Font size="4" font="Helvetica LT Light"/>
<OnEvent event="34" File="move:messageCount=47,175" Command="" />
<OnEvent event="33" File="move:messageCount=47,175" Command="" />
</Text>
<Image x="66" y="199" source="icons\2.png" >
<OnClick event="0" File="\windows\tmail.exe" />
<OnClick event="1" File="mscr\Selectapp2.mscr"/>
</Image>
<Registry name="messageCountButton" x="120" y="191" alignment="right" source="0.png" sensor="registry" key="HKEY_CURRENT_USER\System\State\Messages\SMS\Unread\Count" group="Browsers">
<Font font="folder:messagecount"/>
<OnEvent event="34" File="move:messageCountButton=181,167" Command="" />
<OnEvent event="33" File="move:messageCountButton=181,167" Command="" />
</Registry>
<Text name="messageCount" x="111" y="199" alignment="center" text="" unknown="" sensor="registry" key="HKEY_CURRENT_USER\System\State\Messages\SMS\Unread\Count" group="Browsers" color="RGB(255,255,255)">
<Font size="4" font="Helvetica LT Light"/>
<OnEvent event="34" File="move:messageCount=171,175" Command="" />
<OnEvent event="33" File="move:messageCount=171,175" Command="" />
</Text>
<Image x="133" y="199" source="icons\3.png" >
<OnClick event="0" File="\Program Files\S2P\S2P.exe" />
</Image>
<Image x="190" y="199" source="icons\4.png" >
<OnClick event="0" File="\Windows\Start Menu\Programs\Internet Explorer Mobile.lnk" />
<OnClick event="1" File="mscr\Selectapp3.mscr"/>
</Image>
</Page>
I think that its quite easy to get this look with weatherpanel. There is allready exists a weatherpanel theme that have this look and the background changes depend on the weather. I think it is bliss alive theme. Maybe needs some tweaking but its for sure can look like your picture.
For clock , missed calls and the other stuff, you can use rltoday and make a skin with the graphics that you have in the picture. Again its quite easy to make it(you have allreade the graphics part) and can looks the same like your picture.
And finally I think that you can use XiaMultiTheme(or for sure Ultimate Launch) to load these plugins(weatherpanel and rl today)
It is all one can make by means of XIAMultiTheme. But need make weather wallpaper. Good luck!!!
Hi,
i think its all makeable with rlToday only.
Theres simpleWeather.mscr for weather and changing
"normaly" an weather-icon but when your weather-pics are big,
you can edit it as background-pic for rlTodayScreen.
The Buttons and texts are allways configurable with rlToday.
Maybe 1-2 hours for work ?
Look here, theres a developer-kit also : klick
Edit :
i try the first time to skin in rlToday, so this is the summary.
Not perfect...change the icons to a size what confirm.
Thanks guys!
I am hoping in later versions to have those icons link to different screens in the theme, such as the Windows Media icon linking to a screen with the album art and audio controls, the mail icon linking to a screen showing the most recent text message, and the phone icon to link to a favorite contacts list. Would this be possible in rltoday?
derekwilkinson said:
Thanks guys!
I am hoping in later versions to have those icons link to different screens in the theme, such as the Windows Media icon linking to a screen with the album art and audio controls, the mail icon linking to a screen showing the most recent text message, and the phone icon to link to a favorite contacts list. Would this be possible in rltoday?
Click to expand...
Click to collapse
Not free, but this can all be done with phoneAlarm and PocketWeather, as well ... just to give you an alternative.
-pvs
pvs said:
Not free, but this can all be done with phoneAlarm and PocketWeather, as well ... just to give you an alternative.
-pvs
Click to expand...
Click to collapse
Well, it will not be free when out of RC state, but Wisbar Advance Desktop 2 will make you easy to build everything you want
Hmm, I would like to use free software, so XIAMultiTheme it is. I will start developing the UI first, then work on the scripts for the background. Maybe someone with experience in XIAMultiTheme could help me with the mortsript? That is probably the only thing I don't know how to do (for now, this is my first skin, I don't know what I might run into )
Here is something I did a little while ago using rl today and weather panel if you want to change it. This cab basically changes the background based on the weather. You can change the update interval in the mortscript but is still limited by weather panel update. FYI: Weather Panel needs to be running on the Today screen. I found that if you go into the weather panel file that is for the today screen and delete everthing that it will still update and it will not show up on the today which is what you want. Let me know if you need anything.
http://forum.xda-developers.com/showpost.php?p=2266271&postcount=134
edited the code again,
i hope it may help :
http://rapidshare.de/files/40116689/bigWeather.zip.html
I have the script working, but it seems that XIAMultiTheme won't change the wallpaper... so I guess I will use RLToday to develop the theme. Can I make different pages or tabs in RLToday?
Weather Main Screen
derekwilkinson said:
Hello,
I quickly put together a picture that represents what I want my theme to look like (XiaMultiTheme). I want it to be small, quick, but have a classy look. I could develop this by myself, but it could take awhile, but having someone help would speed this up greatly!
I would like the wallpaper to change depending on the chosen weather location. Is there a mortscript to change the Today Screen Wallpaper depending on the weather? (I know this is available for S2U2).
No icons in this screenshot are original, so I will either have to get permission to use them in a final version or create my own.
Please tell my your thoughts, and contact me if you would like to help develop it!
Click to expand...
Click to collapse
You should check out homeboy BeyondIvisible's Theme for weather to change on the main screen.
http://forum.xda-developers.com/showthread.php?p=2464233#post2464233
derekwilkinson said:
I have the script working, but it seems that XIAMultiTheme won't change the wallpaper... so I guess I will use RLToday to develop the theme. Can I make different pages or tabs in RLToday?
Click to expand...
Click to collapse
yes, you can change the wallpaper in XIAMultiTheme, i try to change the picture or icon in my theme, but maybe this is a stupid way.
first you need to write the mortscript move the existing picture to other folder then copy the new one to the original folder and redraw today screen.
and i think the XMT is a easy way to write a Multi Page Theme
sorry! the above way is a really stupid way, the easy method is your picture is not a wallpaper , that is a icon and change it by registry
i would do it with batterystatus. it is easy to change the wallpaper if you set it as image in the background and the other elements are implemented in short time
Maybe I'm being stupid, but HOW do you find the x/y corrdinates??? Is their an XML editor that you guys use?
I using S2U2 and hope weather paper shown on today , can you modify yours script to yahoo weather , so I don need to install weatherpanel ,can you help me ?

[Q] Simplifying adding lines to UI

Hello
I'm just starting out learning Android, and i only have basic C/C++ programming knowledge, but i've decided to make an app related to my school (just to test Android programming).
I have a UI such as this:
{
"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"
}
And i want to add 1 line between each menu selection. I can do this easily with a <View> and width=match parent and height=1dp in the .xml file (as i've done on the picture showed above), but the problem is that i have around 30-40 xml files where i need this in (Really big menu selection )
Is there any way to simplify this?
I have tried to add my own xml file in the /res/drawable/ folder and that worked out fine with adding the android:background="@xx", but i only want the line inbetween the menu selections, not an entire frame around it.
I tried with the android:shape="line", but i couldn't figure out a way to move it up and down, it was always right in the center of the button.
I hope someone can help me out
- Moon
OK, I guess you want to do it in xml, because you could also add it programatically in a for loop to your list view.
The idea with an own xml file is not bad, though normally you'd want to extend a custom View. This means you create a new xml file with a single text view in your layout folder and then add it to your activity layout via
Code:
<com.example.app.custom_view
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
I don't think you can go shorter using xml. If it is only a list view, you might want to look at some custom list views or at this question here.
Thanks for the reply
I'm still very new to this, so "extend a custom View" says little to me i'm afraid (i'll try and google it and get a better understanding though)
I can easily make a new xml file with a android:shape="line" and set the width to 1dp, but then it ends up like this:
(Just talking about the 1st line)
I don't see any way of forcing it to move further down
I'm currently simply using <LinearLayout> with 7x <Button>. It can most likely be done in 47 other ways, all much smarter, but this currently works for my skill level and for what i need
Would really like to simply create 1 xml file with the properties of the line and then be able to call that xml file whenever i need to input a line in my UI. So if i ever need to change the line width, color or something, i can just change it 1 place and it'll do it all over my app.
I've done this with the actionbar dropdown in the .java files with Extend, but not sure how to go about doing it with xml (prefer xml for the UI)
It's probably extremely easy, but.. ye.. :/
- Moon
Moonbloom said:
Thanks for the reply
I'm still very new to this, so "extend a custom View" says little to me i'm afraid (i'll try and google it and get a better understanding though)
I can easily make a new xml file with a android:shape="line" and set the width to 1dp, but then it ends up like this:
(Just talking about the 1st line)
I don't see any way of forcing it to move further down
I'm currently simply using <LinearLayout> with 7x <Button>. It can most likely be done in 47 other ways, all much smarter, but this currently works for my skill level and for what i need
Would really like to simply create 1 xml file with the properties of the line and then be able to call that xml file whenever i need to input a line in my UI. So if i ever need to change the line width, color or something, i can just change it 1 place and it'll do it all over my app.
I've done this with the actionbar dropdown in the .java files with Extend, but not sure how to go about doing it with xml (prefer xml for the UI)
It's probably extremely easy, but.. ye.. :/
- Moon
Click to expand...
Click to collapse
OK so I googled a bit and it seems to be much easier using a ListView, consider this artcle for how to use it. Then customize the deviders as asked here.
If you really want to stay with the LinearLayout (don't do it!), do it like this:
For the Buttons (not necessarily):
1. create a new xml file (something like "mybutton.xml") in the layout folder.
2. copy your Button code in a single <Button ... /> but leave out the id (and text probably).
3. in your LinearLayout, insert Buttons like this (com.example.app is your appname):
Code:
<com.example.app.mybutton
android:id="@+id/whatever
android:text="@string/thiscanbedoneprogrammaticallyalso"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
For the seperators:
1. same as above ("mydevider.xml")
2. something like this:
Code:
<TextView
android:background = "#FFFFFF"
android:height= "1px"
android:width = "match_parent"
(use 1px and not dp!)
3. same as above (with .mydevider and no text )
I fiddled around with it a bit before seeing your latest post, and got it to work
Added an xml file named "button_divider" and added this code into it:
Code:
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@android:color/white"
/>
then i simply added
Code:
<include layout="@drawable/button_divider" />
where ever i wanted to draw a line, and it works exactly how i wanted it to
(i know it should probably be in the layout folder, but just added it in drawables to test it out, can always move it, not like it does anything differently)
I'll definately look into ListView, seems like it's build exactly for what i need ^^
But now i at least have a working'ish version of what i needed
Thanks alot for the help, i might be back here on these forums again at some point
- Moon
Shouldn't you just use a listview?
SimplicityApks said:
OK so I googled a bit and it seems to be much easier using a ListView, consider this artcle for how to use it. Then customize the deviders as asked here.
If you really want to stay with the LinearLayout (don't do it!), do it like this:
For the Buttons (not necessarily):
1. create a new xml file (something like "mybutton.xml") in the layout folder.
2. copy your Button code in a single <Button ... /> but leave out the id (and text probably).
3. in your LinearLayout, insert Buttons like this (com.example.app is your appname):
Code:
<com.example.app.mybutton
android:id="@+id/whatever
android:text="@string/thiscanbedoneprogrammaticallyalso"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
For the seperators:
1. same as above ("mydevider.xml")
2. something like this:
Code:
<TextView
android:background = "#FFFFFF"
android:height= "1px"
android:width = "match_parent"
(use 1px and not dp!)
3. same as above (with .mydevider and no text )
Click to expand...
Click to collapse
Tried to get this to work, while im working on figuring out how to use ListView instead as it seems (according to the two of you) that it's much better
I ran into a problem though.. I made a new xml file in the layout folder named "master_button", pasted this code in there:
Code:
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textSize="25sp"
android:textColor="@color/Blue"
android:background="@android:color/transparent" />
Then i tried using your solution with <com.example.app.mybutton> (i ofc changed to the real name) but nothing would show up at all.. It seemed to need a class (java file) to be able to do it, but that just went horribly wrong when i tried adding it..
Then i tried to use <Include layout="xx"> as i did with the line earlier.. I can set the android:id="xx" easily, but it seems i cant set the android:text="xx".
Off to try out some more stuff and see if i can get anything working ^^
I think that is because you use the weight in the Button. If you set the width to 0 and it's ignoring the weight you will not see anything Try removing the weight(and probably width and height as well) in the Button and put it in your LinearLayout, where you insert your Button.
Found an easier solution for your Seperators:
I added this to my styles:
Code:
<style name="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>
Then in my layouts is less code and simpler to read.
Code:
<View style="@style/Divider"/>
Click to expand...
Click to collapse
here's the link: linklinklink
Should really just use listview next time. it does it automagically.

ViewPagerIndicator - Set the TabPageIndicator to the center

Hi XDA Developers,
Is it possible to set the TabPageIndicator of ViewPagerIndicator to the center? Like this:
{
"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"
}
And is it possible to set the individual tab width and height? And set that tab to a drawable that support selected/pressed states?
I've not found it yet.
Thanks in advance.
The app on the image is Untis Mobile and can be found on the PlayStore.
I've already ask the creators how they do it but they said the app isn't open source. (But I have found in the source that they do it with TwoDScrollView, but I'm not sure)
Alwaysup said:
Hi XDA Developers,
Is it possible to set the TabPageIndicator of ViewPagerIndicator to the center? Like this:
And is it possible to set the individual tab width and height? And set that tab to a drawable that support selected/pressed states?
I've not found it yet.
Thanks in advance.
The app on the image is Untis Mobile and can be found on the PlayStore.
I've already ask the creators how they do it but they said the app isn't open source. (But I have found in the source that they do it with TwoDScrollView, but I'm not sure)
Click to expand...
Click to collapse
If you know how many tabs you have, then yes (use viewPager.setCurrentItem(total/2))
In terms of styling it, you could do something like this in values/styles.xml...
Code:
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- ..... -->
<item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
</style>
<style name="CustomTabPageIndicator">
<item name="android:gravity">center</item>
<item name="android:background">@drawable/bg_tabindicator_statelist</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:paddingTop">12dp</item>
<item name="android:paddingBottom">12dp</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:fadingEdgeLength">8dp</item>
<item name="android:textAppearance">@style/TextAppearance.TabPageIndicator</item>
<item name="android:maxLines">1</item>
</style>
PicomatStudios said:
If you know how many tabs you have, then yes (use viewPager.setCurrentItem(total/2))
In terms of styling it, you could do something like this in values/styles.xml...
Code:
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- ..... -->
<item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
</style>
<style name="CustomTabPageIndicator">
<item name="android:gravity">center</item>
<item name="android:background">@drawable/bg_tabindicator_statelist</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:paddingTop">12dp</item>
<item name="android:paddingBottom">12dp</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:fadingEdgeLength">8dp</item>
<item name="android:textAppearance">@style/TextAppearance.TabPageIndicator</item>
<item name="android:maxLines">1</item>
</style>
Click to expand...
Click to collapse
Thanks for the styling advice, I've now styled as I wanted. :good:
But when I do viewPager.setCurrentItem(5); (I've ten items) it stays on the middle and I'm not able to select a other day. (I call it in onPageScrolled). Is it possible that the item stays in the middle even if I scroll (just as the example)?
Alwaysup said:
Thanks for the styling advice, I've now styled as I wanted. :good:
But when I do viewPager.setCurrentItem(5); (I've ten items) it stays on the middle and I'm not able to select a other day. (I call it in onPageScrolled). Is it possible that the item stays in the middle even if I scroll (just as the example)?
Click to expand...
Click to collapse
Ah OK I see, as you scroll the selected one needs to be in the middle...
From memory I thought it did that by default, with the exception that if you're at either end of the list it won't scroll the screen unnecessarily.
Do you see something different ?
Looking at the ViewPagerIndicator test app (G. Play) if you go to Tabs/Default and scroll from Albums -> Songs, the selection will stay in the middle. Other movements won't since they are already on the screen.
In your case it might be possible to increase the number of days displayed (from 10 -> say, 20) to produce the same effect ?
PicomatStudios said:
Ah OK I see, as you scroll the selected one needs to be in the middle...
From memory I thought it did that by default, with the exception that if you're at either end of the list it won't scroll the screen unnecessarily.
Do you see something different ?
Looking at the ViewPagerIndicator test app (G. Play) if you go to Tabs/Default and scroll from Albums -> Songs, the selection will stay in the middle. Other movements won't since they are already on the screen.
In your case it might be possible to increase the number of days displayed (from 10 -> say, 20) to produce the same effect ?
Click to expand...
Click to collapse
When I add 20 items it stays on the middle but only from item 4 to item 17, item 1, 2, 3, 18, 19, 20 are not in the middle. See:
Can I add a 3 empty items (or empty space) to ensure that the first and last items are in the middle? Something like this (from the Untis Mobile app):
I'll really appreciate your help. :good:
Alwaysup said:
When I add 20 items it stays on the middle but only from item 4 to item 17, item 1, 2, 3, 18, 19, 20 are not in the middle. See:
Can I add a 3 empty items (or empty space) to ensure that the first and last items are in the middle? Something like this (from the Untis Mobile app):
I'll really appreciate your help. :good:
Click to expand...
Click to collapse
OK, that's the behaviour I would expect (no centering if scrolling not required)... I haven't tried altering that myself.
I was going to suggest posting an issue with the vpi guys but I can see you've already done that !
I suppose you could try programatically setting padding etc at the right points but I'm not sure how well that would turn out.
Hopefully someone will know on github. If not, there's probably no easy way.
PicomatStudios said:
OK, that's the behaviour I would expect (no centering if scrolling not required)... I haven't tried altering that myself.
I was going to suggest posting an issue with the vpi guys but I can see you've already done that !
I suppose you could try programatically setting padding etc at the right points but I'm not sure how well that would turn out.
Hopefully someone will know on github. If not, there's probably no easy way.
Click to expand...
Click to collapse
I've tried to set programmatically the padding using android:paddingLeft and android:paddingRight in CustomTabPageIndicator but that doesn't work.
Indeed, hopefully someone will have an answer. I've also asked on Stack Overflow and they refer me to android-spinnerwheel. If I've no answers on this problem I will look into that.

Header for every layout

Hey guys this is the image which I would like to set at the top of every layout below the action bar...I dont want to include and set it in each and every layout.
So any alternatives for the same. I want this image to be displayed in all oof my application.
{
"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"
}
coolbud012 said:
Hey guys this is the image which I would like to set at the top of every layout below the action bar...I dont want to include and set it in each and every layout.
So any alternatives for the same. I want this image to be displayed in all oof my application.
Click to expand...
Click to collapse
If it is just one view, you can do it similar to the dividers in the third answer to this question. Have a style for the list heading (probably referencing the system or support library resources, depending on the lowest API you use) and then just add the small view wherever you want it. There is also another way using the <include> tag, so you can use a separate xml file to declare your header layout.
SimplicityApks said:
If it is just one view, you can do it similar to the dividers in the third answer to this question. Have a style for the list heading (probably referencing the system or support library resources, depending on the lowest API you use) and then just add the small view wherever you want it. There is also another way using the <include> tag, so you can use a separate xml file to declare your header layout.
Click to expand...
Click to collapse
I dont want to go with include even that way I would have to put the include in every layout.
Should I go with and put this into BaseActivity.java so that it would be loaded with each activity.
Code:
View view = new View(this);
view.setLayoutParams(new LayoutParams(2,LayoutParams.FILL_PARENT));
view.setBackgroundColor(Color.BLACK);
layout.add(view);
Or should I go with this only :
Code:
<style name="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>
Then in my layouts is less code and simpler to read.
<View style="@style/Divider"/>
But the main issues with using the style is that I am using 1 style for layouts in which I am repeating the layout...and I cant use 2 styles for 1 ViewGroup...
I want to know the most optimized way...
coolbud012 said:
I dont want to go with include even that way I would have to put the include in every layout.
Should I go with and put this into BaseActivity.java so that it would be loaded with each activity.
Code:
View view = new View(this);
view.setLayoutParams(new LayoutParams(2,LayoutParams.FILL_PARENT));
view.setBackgroundColor(Color.BLACK);
layout.add(view);
Or should I go with this only :
Code:
<style name="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">?android:attr/listDivider</item>
</style>
Then in my layouts is less code and simpler to read.
<View style="@style/Divider"/>
But the main issues with using the style is that I am using 1 style for layouts in which I am repeating the layout...and I cant use 2 styles for 1 ViewGroup...
I want to know the most optimized way...
Click to expand...
Click to collapse
Well I don't think there is an easy way to get around putting one line in every layout. So I assume that you want to use a single ImageView to show the image, so create a
Code:
<style name="header">
<item name="android:scr">@drawable/yourimage</item>
<!-- additional information like scale Type and such -->
</style>
And then in each layout, just add
<ImageView style="header"/>
Wherever you need it. I think that's the simplest way to do it.
SimplicityApks said:
Well I don't think there is an easy way to get around putting one line in every layout. So I assume that you want to use a single ImageView to show the image, so create a
Code:
<style name="header">
<item name="android:scr">@drawable/yourimage</item>
<!-- additional information like scale Type and such -->
</style>
And then in each layout, just add
<ImageView style="header"/>
Wherever you need it. I think that's the simplest way to do it.
Click to expand...
Click to collapse
Ok thanks for the suggestion...what about the first way I have described above?
else will follow what you have instructed...
coolbud012 said:
Ok thanks for the suggestion...what about the first way I have described above?
else will follow what you have instructed...
Click to expand...
Click to collapse
Ah you're right, you could also do it programmatically. Not sure what the best way would be, but you could create an abstract class HeaderActivity that would contain the code in the onCreate() so all your activities could extend that class instead of Activity or FragmentActivity. You would need to have one ID for all your top level layout, to call findViewById(R.id.top_view).addView(imageView, 0);
In the HeaderActivity. And you could also set your layout directly in its onCreate with an abstract method getLayoutId.
SimplicityApks said:
Ah you're right, you could also do it programmatically. Not sure what the best way would be, but you could create an abstract class HeaderActivity that would contain the code in the onCreate() so all your activities could extend that class instead of Activity or FragmentActivity. You would need to have one ID for all your top level layout, to call findViewById(R.id.top_view).addView(imageView, 0);
In the HeaderActivity. And you could also set your layout directly in its onCreate with an abstract method getLayoutId.
Click to expand...
Click to collapse
seems to be a great idea but...I had dropped out the idea of header and instead simplified the app header a bit...
Have a look at https://play.google.com/store/apps/details?id=com.droidacid.apticalc
U can create one Base Activity which extends "FragmentActivity" or "SherlockFragmentActivity"(if u use it) and then put that header on the top...below it create a fragment and in the whole app just replace that fragment and stay in one activity only..then u just need to have only one layout for the header and you can do the rest very easily....

Categories

Resources