How to use typeface in notification? - android

Is it possible to use typeface in notification message, so that I can change the font? I have searched all over internet but couldnt get any solution or code.So that I cant tell you, what I have tried so far. Any help would be appreciated. Thank you...
Edit: I have found here that we can use custom layouts for notification.So, is it possible to access textview in custom layout, and use typeface?

Notifications contain textViews and you can always setTypeface on textViews.

Related

Create a Seekbar WIDGET

I am wondering if there is a way to create a Seekbar (slider) widget for an app. I know how to create a Seekbar in my app activity but how can I change this Seekbar-value with a widget? I tried to find some information about it in the internet but I couldn't find anything. So I don't know if it is even possible to create Seekbar widgets...
In advance thanks for your answer!
If by "widgets" you mean app widgets, SeekBar is not one of the supported views that you can use in an app widget.
you can use a Progressbar with custom style to show a progress value in your widget.

Is it possible to insert/paste image on a custom EditText?

I wanted to create a custom text view. A little bit advance just as the text editor found here in StackOverflow, I can insert text and even images. I wanted to name this as WordView and create this as a library so I can reuse this across multiple projects.
Unfortunately I am not so sure if the base class allows this. I need a way to insert/paste images directly in the EditText. I am planning to write a custom View, although it seems laborious, I am not quite certain if this is possible at all and if I am going into the right track.
Have anyone tried similar before?
According to the Android Documentation for a TextView You can have a drawable object inside the TextView in the following ways
DrawableBottom
DrawableEnd
DrawableLeft
DrawableRight
DrawableStart
DrawableTop
There are other methods you can use, check out:
1. Programmatically set left drawable in a TextView
2. How to programmatically set drawableLeft on Android button?
3. http://androidsbs.blogspot.co.za/2013/12/androiddrawableleft-set-drawable-to.html
You could possibly implement this using HTML. I'm not sure about the paste functionality but generally it might work.

How to change EditText look programmatically?

I want to change default edittext look(Image:Look which i need to change) from box like look(Image:Look whic i need)...
This must be done programmatically,...I dont know how to do this...please help me
Edit : Sorry typed the title wrong
Edit:Why this is not a useful question??
who voted this question down...anybody please fix this by voting up...I cant post questions
I would create a 9patch image and then set the background drawable programmatically. Please look at this tutorial and see if it's of any help.
http://wptrafficanalyzer.in/blog/changing-background-color-and-border-color-of-an-edittext-widget-using-state-list-in-android/
EDIT: doing a little more research I've found that you can get the desired look&feel by just creating a shape in drawable.xml file. You can find some samples here: http://letustech.wordpress.com/2012/09/16/customedittext/ ... then just call setBackgroundResource on the EditText to set it programmatically.
Create a 9 patch drawble and use that as your background.Call setBackDrawable() to use it

Whats the Android Style attribute for selected link background color?

I have a TextView which I dynamically add clickable links via Linkify (with a custom TransformFilter). This all works great. What I would like to do now is change the background color of the link when its clicked. In CSS it would be done via the :active pseudo-selector.
I would think I can specify this in styles.xml but I dont know what the parameter name is.
Just had this problem myself and the solution for me (but I didn't use Linkify) was the android:textColorHighlight attribute. I used android:linksClickable="true" instead of Linkify though. That won't probably make any difference.
This might solve your problem .
Basically you have to define a ColorStateList (a xml to be used as a drawable). For your TextView

What android widget is this?

does anybody know what android widget/view this is:
i want to be able to implement a similar widget for my own needs but i dont know what kind of view/widget it is. All i see is that it is embeded on the ContactContract class as a quickContact object.
Anyone used one of these and customized it? if so, how? Thanks in advance
edit: is it also possible to include more than 5 items as shown below and have it scrollable horizontaly
This is QuickAction. Here you can find implementation of it. And there is repository on Github with source code.
I'm not quite sure, but it seems a custom toast
http://developer.android.com/guide/topics/ui/notifiers/toasts.html

Categories

Resources