Android T:V Background customisation - android

I have five background images which are displayed back to back after a certain time interval. I have to add a page indicator for backgrounds so that user can know which background is currently selected. The user should also be able to select next backgrounds using tv remote.
I cannot compromise tv look and feel for rail and its contents which are displayed on the screen.
I also need to resize background image. I do not want the image to be full screen and its size should cover half portion of tv only. Background image should overlap first rails content to an extent.
I am not getting any such sample or blogs depicting customization of background. Any help would be really appreciated..!!!

Try to use layout themes for TV.
Android Themes can provide a basis for layouts in your TV apps.
You should use a theme to modify the display of your app activities
that are meant to run on a TV device. This section explains which
themes you should use.
Style and Themes can be:
A style is a collection of attributes that specify the look and format
for a View or window. A style can specify attributes such as height,
padding, font color, font size, background color, and much more. A
style is defined in an XML resource that is separate from the XML that
specifies the layout.
You can see samples codes as well from the documentation.

I added two fragments inside my Activity. One fragment is for displaying background and indicator. While another fragment is extending BrowseFragment of leanback library, and is used to display rails/headers as is depicted in tv app android sample which is generated via android studio.

Related

Does elevation not work within Android Home Screen Widgets?

Tried all sorts of different ways to do this but not matter what view I apply an elevation to (such as android:elevation="10dp") it does not render correctly on a Home Screen Widget.
Is this a known limitation, that home screen widgets do not support elevation. I am running this on an Android L device so its should not be a compatibility issue.
If this is impossible I figure I could use 9-patch or layer-list drawable to achieve a similar but not as good effect.
I've played with all widgets I have on my phone (both with Nova Launcher and Nexus 5 stock launcher, which is Google) and none of them have this feature, even Google apps (excluding Google Now!).
I've added app:elevation="10dp" on my widget and I think that it is not possible to have this feature on Widget directly, without playing with code and fantasy.
If you really want a widget that include elevation design, just "copy" the style of Google Now widget.
I suppose that they have a transparent layout (the black parts on image) wich contains another layout (grey) with elevation and grid filled with CardView with elevation too.
Let me know if you want an example code.

Android custom gui-components?

Im searching for an android gui-library with more components i could use in my app.
Example:
A microcontroller sends the rpm of a motor (via bluetooth) to my smartphone.
And i want to use my smartphone in order to show the received rpm in progressbar-like element.
But the normal progressbar looks ugly, and i would have to progressbar.setClickable(false); .
As i said before
Im searching a library with more gui-elements(optional: i could modify, customize the outward appearance on my own)
Do anybody of you know about such a library ?
Thanks so far.
If you're just concerned about the external appearance of your GUI elements, I don't think there's any support for different UI elements than the ones provided. However, have you looked into a universal Theme and style for your application?
Here are some excerpts from that document:
A style is a collection of properties that specify the look and format
for a View or window. A style can specify properties such as height,
padding, font color, font size, background color, and much more. A
style is defined in an XML resource that is separate from the XML that
specifies the layout.
A theme is a style applied to an entire Activity or application,
rather than an individual View (as in the example above). When a style
is applied as a theme, every View in the Activity or application will
apply each style property that it supports. For example, you can apply
the same CodeFont style as a theme for an Activity and then all text
inside that Activity will have green monospace font.
Here are some resources which talk about themes:
Mobile Orchard Article
Android Engineer Article
Let me know if that's what you wanted. Themes give you almost infinite possibilities to modify outwards appearance.

FragmentDialog different design of UI

I try launch samples as this link, but I have different design of UI. I have this:
But I want have new design as this:
I launch my project on simulator with android api 14.
How can I use the new design as last image?
#WebnetMobile.com friend u can have this view by using a list view and then using a style such that editText element must have width fill parent and hint must have a style element and this elemnt style should have the gravity of 1 and and top left with text size small as u needed (keep looking in your xml and fit it accordingly). also for text color use color:# for hex code u can see on internet to find out the hex code of your desired answer

Yahoo Fantasy App styled buttons

I'm trying to accomplish the style of buttons used in the yahoo fantasy football app. On the nav bar located at the bottom of the screen there are buttons. Now I've extracted the assets from the app so I know that the magnifying glass is of course an image, but there are two. A blue one and a grey one. However the button "underlay" which is transparent doesn't appear to be an image.
Example: http://i.stack.imgur.com/ASNzz.jpg
I want to replicate this type of button, with the following characteristics.
A gradient background (I know how to do this, but I want to be clear that #2 needs to be able to reflect a background that isn't a solid color)
A "button underlay" that is transparent with rounded corners, like the example.
Changing icons (magnifying glass)
And then of course, it being a button. More specifically launching another activity in my app.
I think that Yahoo has copied the iPhone TabBar style for that app, but it's a simple TabHost interface (here's the tutorial)
On the internet you can find many XML examples for the TabBar style, I suggest these ones (that in my opinion are the best)
https://github.com/AdilSoomro/Iphone-Tab-in-Android : the graphical best one IMHO
https://github.com/honcheng/ScrollableTabHost-for-Android : in this one the TabBar is horizonally scollable
http://www.anddev.org/code-snippets-for-android-f33/iphone-tabs-for-android-t14678.html : a very easy one to implement
But I have a thing to ask you: is for your application necessary to copy the iPhone style? I leave here the link to Londatiga's QuickActions which are the same style as the contacts app, twitter app, gallery app, and many many more - and it's a recommended style by the Google's engineers. It's more "androidish" ;)

Title of Android AppWidget below widget-icon

I am working on a small application which should be represented by an AppWidget.
The AppWidget should look like many other widgets on my HTC Desire. Most of them consist of an icon and a title below the icon. The title always looks identical, it is white text on a black rounded banner. I have not found a way to get this layout without painting all by myself. What do I have to do, to get the app title shown below the AppWidget?
Thank in advance,
Wolfgang
Per a previous answer here this is actually discouraged by the Android UI guidelines: An App shortcut has such text below it, and it may change in future Android releases or in custom skins such as HTC Sense or MOTOblur. A widget should be a wholly contained graphical element without a text label below it. You need to find a way to make graphics / text in your widget which are self identifying to the user.

Categories

Resources