FragmentDialog different design of UI - android

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

Related

android searchview - what is the xml attribute layout and suggestionRowLayout, how to use?

Lets take a look at this screenshot of xml attributes i would like to make use of:
so as we can see searchview has two custom layout properties we can use to customize it .
layout and the other 2. suggestionRowLayout
so if i pass it a suggestionRowLayout for example, what ids do i pass to it ? for example, if a suggestions row was a simple image and text what ids should i give the text and image ? and likewise for layout. im searching for a way to customize the recent suggestions i have created using a SearchRecentSuggestionsProvider.

Android T:V Background customisation

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.

Customize textview in android

I want to customize my textview as per my requirement. I have to add padding or margin dynamically when text is too long and it should look like my screenshot which I have attached here. Can anyone help me how can I implement it and below is my screenshot.
Try using this. It is customizable.
I used it so that I can have different color texts inside my "textview" , and also I used it, cause I did on it a code to resize the text size, so that it fits in the screen height. But if that was possible, I'm pretty sure what you want to do is also possible.
https://github.com/DavidPizarro/AutoLabelUI

EditText XML Design

I'm looking to create an EditText that looks like the following & was just wondering if it was possible & if anybody might be able to provide example XML code to create the following.
Note: The cursor doesn't have to be blue, if it can be that's cool, but definitely not required.
This is just an EditText with a custom background (the underline with the curved shape). You would just use a standard EditText, and add your custom drawable (however you make that - either a PNG, 9Patch, ShapeDrawable, etc) as the "background" element. The text label would just be a TextView you put in your layout above the EditText.
However, I would steer you to use the new "TextInputLayout" provided in the Design Support Lib. This has a ton of built in functionality, and as a bonus, your app will be consistent with Material Design standards.

Section Header using Android XML?

enter code hereLooking through the Android UI guidelines I came across this section / example:
In the example above, there are a few headers called 'SECTION' with a horizontal line underneath them.
Im still getting grips with the appropriate way to replicate this -
Is there something specific like a Header XML element to use that will automatically style the font and horizontal line? Or is something like this generally more primitive, i.e. A TextView with a 1 pixel horizontal image (ImageView?) underneath it?
Possible duplicate question of this one: Android 4.0 Sub-Title (section) Label Styling
In short: try adding attribute style="?android:attr/listSeparatorTextViewStyle" to the TextView element, which you wish to make look like that, in the XML layout file.

Categories

Resources