Icon Next to the Search Orb in Android TV App - android

How can I add an icon next to the search orb, just as displayed below? I'd like to display a login page when the user clicks on the icon.

You can't, if you want to use the standard widgets offered by the Leanback library, such as BrowseFragment.
There is a way of creating your own version of the BrowseFragment widget, so that it is fully customizable and you can add as many buttons as you like, but it is definitely not easy to do. I've written a series of posts on this subject, which you can find here:
Building for Android TV
There is also a demo project that already gives you a starting point for the custom interface. The code can be found on this GitHub repo (episode_4 is probably what you're looking for).

Related

How to implement the Android Material design's "inset Search box" using the Android's builtin Search Framework?

Note: I have seen this and this question, and my question is not their duplicate (They do not solve my confusion).
From the Android Material Design specification for search,
The search text field is presented inside of an inset search box,
ready to receive focus.
and this picture is shown:
They have also shown this kind of SearchViews at many different places in the material design specification e.g. here
But I can't locate a guide/tutorial describing how to make something like this. From my web search, I have found this SO answer, but they are using an EditText and ImageView, they are not even using a SearchView widget.
The biggest question in this case is that what about the Search Framework the Android API's provide, which is explained in this guide. This builtin search framework provides a very easy way to implement all the functionality associated with providing Search in an app, i.e. it provides a way to integrate our search with the Android system so that the system handles the user's search queries into SearchView, delivers them to the Searchable Activity, provides a way to add the voice search and search suggestions functionality, etc.
So now in order to use the Material design "inset search box", do we have to write code to handle user input into the SearchView/EditText, enable voice search, recent suggestions and suggestions from app's data? or is there a way to integrate the EditText (we are using as the search widget) with the system to have assisted search?

Xamarin Forms ToolBarItem (Number over the Icon) Notification

I wish to display notifications as shown in the image link below using Xamarin Forms shared project. Is there a way to add text/number over the icon of the toolbar item?
Follow this link to view example since i cant post images.
This is not possible out of the box in Xamarin Forms at the moment (v1.4). You can however create a custom renderer in your iOS and Android project that does the trick.
This article might help you: Creating a Cross-Platform Application Bar for Xamarin
On TabBarItem (for iOS) there is a possibility to set BadgeValue which probably is what you are looking for. This property does not exist on ToolBarItem.
Another, uglier, solution is to add images with different numbers and in your view model select the appropriate image.

Android searchbar like google app

I want to develop search bar like bellow image just like showing in Google search bar. How to achieve this. Please some can provide sample code or related links to achieve it.
I assume the actual question here is not how to create a widget (if it is, check the official Android documentation on widgets), but how you can enable a widget to receive text input, which, as far as i am aware, is not possible using standard widget elements.
You will probably have to try the way discussed over here - creating a transparent activity when your widget is tapped.

Search style EditText

I would like to use the "search" style EditText, with the thin line underneath and a microphone icon on the right (although I would replace that icon with a different function), used in apps like Youtube and Google maps.
Is this a native element of this in any versions of Android? I can't seem to find a reference to it anywhere, although I did find this:
Android EditText like Google Search EditText
Which basically says to create it yourself, which I've done, however if there's a more "native" search EditText I'm unaware of, I'd rather use that...
Thanks for your help.
If you want to have this Search-EditText inside of an app, here you will find all information needed:
http://developer.android.com/guide/topics/search/index.html
Google provides configuration examples for both Android 2.X without ActionBar and later Androids with ActionBar. Under "Creating a Search Interface" you will find the section "Adding Voice Search" which brings in the microphone icon, though I don't know how to override its functionality.

What do they utilize to build android apps with custom graphics and controls ?

What I mean to say while you're just getting started with the development and say you add a slider theres a predefined skin for that and you can place it somewhere on the screen, but in some apps there are things like a knob in a place of slider which you can rotate to do the same stuff what the slider does . How do they do that, does it require openGL or something I am not asking for a complete tutorial or something just curious on what stuff goes into building such thing
Mostly, if something is not provided out of the box, you will have to build your own control.
For example, you mention a Knob. That isn't available in the Android SDK. Such a control could prove to be useful.
Here is a tutorial to build such a custom Control: http://go-lambda.blogspot.in/2012/02/rotary-knob-widget-on-android.html
This is an image of the final result from the tutorial linked above:
Here is an example of a custom slider / seek bar: http://permadi.com/blog/2011/11/android-sdk-custom-slider-bar-seekbar/
This should give you a rough idea on how to go about creating your own custom views.
And finally, what I personally find the best possible resource for keeping track of almost all good Custom Views is here: http://www.androidviews.net/
The androidviews.net website has shut down. Android Arsenal is a new website that lists several third party Android libraries.

Categories

Resources