I just added an ImageButton to my AppWidget and there seems to be a problem. i made them as png's with transparent backgrounds and made a selector xml file like this:
ic_call_contact.xml
Code:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/ic_call_contact_pressed"/>
<item android:drawable="@drawable/ic_call_contact_unpressed"/>
</selector>
and then added it to my widget like this:
Code:
<ImageButton android:id="@+id/call_contact"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/ic_call_contact"/>
the images are as follows:
{
"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
but when it renders on the desktop there is a grey box surounding the imagebutton where there should be transparency of the png. any thoughts?
I checked both images under gimp with a fine tooth comb and could not find any grey borders, only transparency. Perhaps could be the ImageButton rather than the use of ImageView... you could add a setOnTouchListener for an ImageView. Another thought is to check and see if you are overriding the theme. Outside of that, I'm a little green with Android widgets.
spr0k3t said:
I checked both images under gimp with a fine tooth comb and could not find any grey borders, only transparency. Perhaps could be the ImageButton rather than the use of ImageView... you could add a setOnTouchListener for an ImageView. Another thought is to check and see if you are overriding the theme. Outside of that, I'm a little green with Android widgets.
Click to expand...
Click to collapse
thats not a bad idea to just use an ImageView... it'll just be more work to get the button to change when pressed. ill give it a go and check back.
thanks
Found the ideal solution. You have to define your own background (android:background="") or set the transparency of the button. That way you don't have to use the ImageView. Verified it on this end.
spr0k3t said:
Found the ideal solution. You have to define your own background (android:background="") or set the transparency of the button. That way you don't have to use the ImageView. Verified it on this end.
Click to expand...
Click to collapse
the problem with the android:background is that this is going to be on the homescreen where any sort of wallpaper can be up. so i wanted to just have the button float with a bit of transparency around it. and you cant have the android:background be set to ""
i did however mess with some something in the adjacent TextView to the ImageButton and it got rid of the grey box.... but when resizing the widget to a larger size the grey box expands to a random size. not the entire gap from the ImageButton to the edge of the widget but just a bit.
ill have to get around to trying the ImageView in the morn
----
it definitly is an issue with ImageButton and AppWidgets. i just replaced the ImageButton with an ImageView with the same src images and it displays just fine
----
ill be able to make the ImageView act like an ImageButton with setOnTouchListener() and then defining the ACTION_UP and ACTION_DOWN for the OnTouchListener's MotionEvent. this seems a bit much but if it works and displays properly then ill be happy
Yeah, I'm finding widgets are fickle like that. May have to make a layout scheme for various portrait and landscape sizing to handle the awkward changes.
spr0k3t said:
Yeah, I'm finding widgets are fickle like that. May have to make a layout scheme for various portrait and landscape sizing to handle the awkward changes.
Click to expand...
Click to collapse
i always forget this when i work on widgets but i cant access the Views directly like a normal Activity. it is all done through RemoteViews and is thus limited to setting values of already existing Views. So basically i cant get a reference to the ImageView to implement the setOnTouchListener()... bleh.
but you did give me an idea. i have to abandon the whole nested linear layout i am using and use a relative layout. that way hopefully things wont get messed around when the content changes and the widget is resized
Related
Guys n Gals,
I've knocked together a small program further to ZeBoxx's request.
It's used to set the colour of the soft keys etc, by command line/shortcuts/launchers.
eg VJBaseHue.exe 187
will give you a nice purple colour
{
"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"
}
On my website.
V
really a cool proggy
I am currently testing code by code...I've tried to key in 3 different conbination code...doesn't seem to work though... now am testing the color coding.
Zack, I don't understand. You mean you're trying to find the right hue code by code? The colour wheel on my website might help you, or basically load up any art program, screengrab your theme, and use the colour picker to find the colour your want. Even the standard Windows Colour Picker in MSPaint will show the hue you need.
Post some screenshots in your VGA themes thread if you have any luck :wink:
V
I think I got it now :wink:
guess I must be dreaming lol.I was looking for dark blue and not realise that hue does not come with such colors lol...
Thanks Vijay am doing some minor test wiht my themes I'll post some screen shots soon :wink:
I was looking at VJBaseHue trying to figure out how to get the two bars 100% black (still no luck) when I found something else. Modifying the SHColor value has an effect on the tray above the soft keys. Normally it is an ugly line across the today screen that forces up the scroll bar at the same time, the icons like wirelles use the space. After randomly modifying SHColor the line dissapeared and so did the scroll bar. Also the icons moved down and to the right to be in the corner taking up less space. It seems strange that a colour setting can change the whole layout of the today screen, do yo know the reason for this VJ?
I don't know offhand Odeean, I imagine it might be some kinda buffer overflow etc..
Let me know what values you use, and if I ever get the WinMob source in my hands, I'll have a look!
V
Don't worry, I can't copy/paste from my reg editors and the value is too long to be bothered reading and typing I also have not been able to repeat what happened, I only now seem to be able to make it do the opposite. When I have no tray, modifing it brings it back.
Hi,
Is there an any application which can make my top bar transparent.
It would be very useful and will look good with full screen wallpapers.
Check out this thread here:
http://rotlaus-software.de/forum/viewtopic.php?pid=4477#p4477
The OP mentioned a program called Skinmobile5. I tried to search for it but to no avail. Maybe you'll have better luck.
samy.3660 said:
Hi,
Is there an any application which can make my top bar transparent.
It would be very useful and will look good with full screen wallpapers.
Click to expand...
Click to collapse
try wisbar advance
how can you do this with wisbar? i've tired but cant figure it out
just use a transparent or semi-transparent png as your top bar.
There is a skin called GANT that does that already.
twolf said:
just use a transparent or semi-transparent png as your top bar.
There is a skin called GANT that does that already.
Click to expand...
Click to collapse
Can u post it here or guide me where can i find one.
here it is:
http://www.lakeridgesoftware.com/forum/showthread.php?t=12054
Google is my friend...
twolf said:
here it is:
http://www.lakeridgesoftware.com/forum/showthread.php?t=12054
Google is my friend...
Click to expand...
Click to collapse
Actually it is using WA, and i want something that wont change my top bar just make it transparent for the use of wallpapers. And wisbar is the whole different thing.
jerkules said:
Check out this thread here:
http://rotlaus-software.de/forum/viewtopic.php?pid=4477#p4477
The OP mentioned a program called Skinmobile5. I tried to search for it but to no avail. Maybe you'll have better luck.
Click to expand...
Click to collapse
Skinmobile web page as I know is http://stingray.freeshell.org/skinmobile/
and skinmobile5 is here http://rs300.rapidshare.com/files/86968737/SkinMobile5.zip but dont know if it makes your topbar transparent
Zool said:
Skinmobile web page as I know is http://stingray.freeshell.org/skinmobile/
and skinmobile5 is here http://rs300.rapidshare.com/files/86968737/SkinMobile5.zip but dont know if it makes your topbar transparent
Click to expand...
Click to collapse
i tried that application and found a few issues
1. no transparent option
2. has to run in background
3. not in english
i'd really like to have a transparent top bar so if anyone knows how that'd be sweet (w/o WA3). also, can you make it smaller? such as on the the s2u2 screen.
I think there is no software like that, if someone is willing to make one it would be awesome.
yeller said:
i tried that application and found a few issues
1. no transparent option
2. has to run in background
3. not in english
i'd really like to have a transparent top bar so if anyone knows how that'd be sweet (w/o WA3). also, can you make it smaller? such as on the the s2u2 screen.
Click to expand...
Click to collapse
{
"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 did this work on my skin here:
http://rotlaus-software.de/forum/viewtopic.php?id=1099
You should download last version of Skinmobile5. (attached)
after copying skinmobile5 to your device, open skinmobile5.ini file
Code:
[Image]
// absoluten Pfad zum Hintergrundbild hier angeben:
Background = \Windows\tdywater.gif
// eigenes 32Bit-Icon statt der Windows-Fahne
Icon = \Storage Card\Program Files\SkinMobile5\Home.ico
[Settings]
HiddenStart = Yes
TaskbarImageOnly = Yes
TaskbarOffset = 15
LowerbarImageOnly = Yes
LowerbarOffset = 26
Blurness = 50
Set Background to your default background (\Windows\tdywater.gif)
Set Icon to your favorite startmenu icon. otherwise put // at end of this line to use default icon.
Now you should play with these settings:
TaskbarOffset, LowerbarOffset change the numbers and save skinmobile5.ini file. run skinmobile5.exe to see if topbar and bottom bar backgrounds fit to your main background if not close skinmobile5 and change those numbers again and run skinmobile5.
Thanks alot pi3ch, but i cannot get to more than this(see pic).
Does this software make top bar transparent or same as the wall paper.
this software set background/colors for topbar. if you set background path to the location of your today theme background your topbar looks like transparent. As what I did in my own skin.
How about completely removing the bars? Try usin vjaytoggletoday
..
PREVIEW!!!!
This theme requires WA2 or WA3 and WAD... hop on over to lakeridgesoftware.com if you dont have them... but to give you a run down, I wanted to have something that allowed me to hide the clutter when im not using my phone, pull up ALL of my favorite apps in an organized fashion. Easily set different backgrounds and set themes, as well being as lightweight and efficient as wad will let me be. With WAD2 around the corner, I was going to abandon this project, but decided to finish what I started. Here are a few screenshots, it will be uploaded tonight...
The current theme is a marvel/dc comics for the portrait... and a bleach theme for the landscape. The buttons were designed by torx and akuma, and were resized to fit accordingly... also, there are plenty more buttons so you can change them to your liking very easily... pm me if you have any questions or requests...
{
"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"
}
this is the main portrait homepage...
this is the main landscape page...
this is a preview of what it will look like when you hit the task/office button...
the text will pop up and the icon will invert and lift to let you know that you are on the desired page... if you click the button again, the dock will hide like its displayed... each page will do this
this is a sample of the phone page when its docked...and undocked in landscape... instead of the raised text, the title next to the clock will switch and the icon will raise and invert... app buttons like "favs" can launch the speed dial of the cube in portrait... although as stated before, all buttons are configurable...
well... this is just a preview... let me know that you think
LooKs very nice, it will be nicer if u can make a s2u2 clock and background skin
Looks awesome
Cobra2 said:
LooKs very nice, it will be nicer if u can make a s2u2 clock and background skin
Click to expand...
Click to collapse
s2u2 is easily configured... youll be able to choose any of the wallpapers in s2u2... the clock is a font file... ill have to look into how to implement it into s2u2... if anyone has suggestions on how to do it... pm me
Michaelr219 said:
PREVIEW!!!!
This theme requires WA2 or WA3 and WAD... hop on over to lakeridgesoftware.com if you dont have them... but to give you a run down, I wanted to have something that allowed me to hide the clutter when im not using my phone, pull up ALL of my favorite apps in an organized fashion. Easily set different backgrounds and set themes, as well being as lightweight and efficient as wad will let me be. With WAD2 around the corner, I was going to abandon this project, but decided to finish what I started. Here are a few screenshots, it will be uploaded tonight...
The current theme is a marvel/dc comics for the portrait... and a bleach theme for the landscape. The buttons were designed by torx and akuma, and were resized to fit accordingly... also, there are plenty more buttons so you can change them to your liking very easily... pm me if you have any questions or requests...
this is the main portrait homepage...
this is the main landscape page...
this is a preview of what it will look like when you hit the task/office button...
the text will pop up and the icon will invert and lift to let you know that you are on the desired page... if you click the button again, the dock will hide like its displayed... each page will do this
this is a sample of the phone page when its docked...and undocked in landscape... instead of the raised text, the title next to the clock will switch and the icon will raise and invert... app buttons like "favs" can launch the speed dial of the cube in portrait... although as stated before, all buttons are configurable...
well... this is just a preview... let me know that you think
Click to expand...
Click to collapse
When will these be available for download?
As stated in the subject, I'd like to implement in my project that little auto-dismissing text popup that sometimes appears when applying an action in certain apps.
It's a simple floating text with a dark rectangle as background positioned in the bottom part of the app that remains between activities/application switches and goes away automatically after X seconds.
Does anybody know how it's called?
It was called Toast.
You can easily custom a toast to have a interface like whatever you want, look Titanium Backup for example.
Default usage like below:
Code:
Toast.makeText(mContext, "Hello", Toast.LENGTH_LONG).show();
As a side note, the App-Msg(Crouton) library provides a good alternative to toasts : in that it is context-centric, the message will only be displayed on the activity/fragment it was generated from, whereas if the user quits your app while a toast is displayed, for example, the toast will be displayed on his launcher or on he app he switched to, which could be confusing.
Its usage is also very simple :
Code:
AppMsg.makeText(/*Activity*/, /*CharSequence*/, /*AppMsg.Style*/).show();
Maybe this library can be helpful on my app. I have a custom toast, which still displayed after I choose to leave the activity via a button. So with this library the toast dissapear when the activity goes to background? And also can customize the look of toast?
dancer_69 said:
Maybe this library can be helpful on my app. I have a custom toast, which still displayed after I choose to leave the activity via a button. So with this library the toast dissapear when the activity goes to background? And also can customize the look of toast?
Click to expand...
Click to collapse
Yeah exactly.
And yes, you can modify the appearance of the toast to a certain extent (background color, gravity and display length afaik) using the static methods already setup in the library, but nothing prevents you from forking the library and modifying it to suit your needs.
You can also choose to have a toast which will only be dismissed when the user clicks it.
There are 3 types of preset styles for the croutons (from left to right in the image below) :
AppMsg.STYLE_ALERT (red) AppMsg.STYLE_CONFIRM (yellow) AppMsg.STYLE_INFO (green)
{
"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"
}
But you can create your own using something like this :
Changing length & color :
Code:
AppMsg.Style style = new AppMsg.Style(AppMsg.LENGTH_SHORT, R.color.holo_blue); [COLOR="SeaGreen"]// the default length is [I]AppMsg.LENGTH_LONG[/COLOR][/I]
colors.xml :
Code:
<resources>
<color name="holo_blue">#33B5E5</color>
</resources>
Changing gravity :
Code:
appMsg.setLayoutGravity(Gravity.BOTTOM); [COLOR="SeaGreen"] // the crouton is displayed at the top by default[/COLOR]
Result in the thumbnail
Thanks to Evgeny Shishkin for his work on this library by the way.
Hello,
I want to set the BackgroundColor of ListView items, but I want to keep the color which appears when I click the items.
How can I do that?
Auroratic said:
Hello,
I want to set the BackgroundColor of ListView items, but I want to keep the color which appears when I click the items.
How can I do that?
Click to expand...
Click to collapse
Rather than replace a "stateListDrawable" with a color or static drawable, replace it with another state list that has the "states" you require
deanwray said:
Rather than replace a "stateListDrawable" with a color or static drawable, replace it with another state list that has the "states" you require
Click to expand...
Click to collapse
I've got it, but I have one problem: The colour on state_pressed should be the default system colour (this one: android.R.drawable.list_selector_background)
How can I do that?
Auroratic said:
I've got it, but I have one problem: The colour on state_pressed should be the default system colour (this one: android.R.drawable.list_selector_background)
How can I do that?
Click to expand...
Click to collapse
I'm not sure what your asking, if you have read about stateListDrawabes and have understood it, also maybe even looked at examples, then you should know ? Open that resource, or even clone it and edit it how you want.
deanwray said:
I'm not sure what your asking, if you have read about stateListDrawabes and have understood it, also maybe even looked at examples, then you should know ? Open that resource, or even clone it and edit it how you want.
Click to expand...
Click to collapse
I have the following:
Code:
StateListDrawable stateList = new StateListDrawable();
stateList.addState(new int[] {
android.R.attr.state_pressed
}, new ColorDrawable(android.R.drawable.btn_default));
stateList.addState(new int[0], new ColorDrawable(Color.YELLOW));
textView.setBackgroundDrawable(stateList);
The background is yellow, but when I press on the textView, the background turns into transparent (it should be like this when i press:
{
"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"
}
)
Auroratic said:
I have the following:
Code:
StateListDrawable stateList = new StateListDrawable();
stateList.addState(new int[] {
android.R.attr.state_pressed
}, new ColorDrawable(android.R.drawable.btn_default));
stateList.addState(new int[0], new ColorDrawable(Color.YELLOW));
textView.setBackgroundDrawable(stateList);
The background is yellow, but when I press on the textView, the background turns into transparent (it should be like this when i press:
)
Click to expand...
Click to collapse
well fyi you should look at the view type "states" as not sure you want android.R.attr.state_pressed ... neways you probably want state_focused and state_enabled for an editText view, but really google should provide you with simple absolute answers
hope that clears it up neways
deanwray said:
well fyi you should look at the view type "states" as not sure you want android.R.attr.state_pressed ... neways you probably want state_focused and state_enabled for an editText view, but really google should provide you with simple absolute answers
hope that clears it up neways
Click to expand...
Click to collapse
I have that now:
Code:
StateListDrawable stateList = new StateListDrawable();
stateList.addState(new int[] {
android.R.attr.state_pressed
}, context.getResources().getDrawable(android.R.drawable.list_selector_background));
but when I press on the TextView, the background goes orange
Auroratic said:
I have that now:
Code:
StateListDrawable stateList = new StateListDrawable();
stateList.addState(new int[] {
android.R.attr.state_pressed
}, context.getResources().getDrawable(android.R.drawable.list_selector_background));
but when I press on the TextView, the background goes orange
Click to expand...
Click to collapse
now your setting a state with a state "list" so not sure that will ever work.. needs to be a simple drawable