Customer icon notification:android - android

Can please add a badge to a notification icon like it appear in this image(in the red cercle)
thanks for advance

You should set the number field:
http://developer.android.com/reference/android/app/Notification.html#number

Related

Double Push Notification Icon

I have designed my android push notification icon according to the guidelines for sdk >= lollipop.
The notification status icon on top of my mobile phone is works perfect ... which is set as smallicon
I have assigned color icon as largeicon to be shown with the message. But this lageicon shows the small icon along with it at the right hand bottom corner as shown in the attachment ( image only for ref) enter image description here
How do I remove this small icon ???
Thanks for help
Sohan kumar
make the small icon invisible after building the notification. below code will help you:
int smallIconId = context.getResources().getIdentifier("right_icon", "id", android.R.class.getPackage().getName());
if (smallIconId != 0) {
notification.contentView.setViewVisibility(smallIconId, View.INVISIBLE);
notification.bigContentView.setViewVisibility(smallIconId, View.INVISIBLE);
}

How to clear color for TopDrawable of Textview?

In my application I change color of Top drawable of Textview using below code.
tvTopDrawable.setColorFilter("#E1BEE7", Mode.SRC_ATOP);
Now I want to clear this color from my drawable.
I have tried tvTopDrawable.clearColorFilter();
But it seems its not working sometime.
I used that same image in other Activity of my Application.
Where to write clearColorFilter() so it clears the color from drawable,Can anyone help with this?
Thanks in Advance.
Try setting color filter to transparent
tvTopDrawable.setColorFilter("#00E1BEE7", Mode.SRC_ATOP);

MPAndroidChart how to set label color?

got the following code:
graph = (LineChart) convertView.findViewById(R.id.graph);
graph.getPaint(Chart.PAINT_LEGEND_LABEL).setColor(Color.BLUE);
graph.getPaint(Chart.PAINT_YLABEL).setColor(Color.BLUE);
graph.getPaint(Chart.PAINT_XLABEL).setColor(Color.BLUE);
But still the color of X/Y-value-lables and also the lable of the legend stay in black color. Do I miss something? Is there an other way to set the color of these?
This line for example works and results in blue value-lables for each data-point:
graph.getPaint(Chart.PAINT_VALUES).setColor(Color.BLUE);
Thanks in advance!
Try this to set the colors of axis and legend:
chart.getAxisLeft().setTextColor(...); // left y-axis
chart.getXAxis().setTextColor(...);
chart.getLegend().setTextColor(...);
chart.getDescription().setTextColor(...);
If you want to set the color of the drawn values inside the chart, check out the setting colors documentation or the setting data documentation.
Incase for a pie chat to change its label colors you can do this
pieChart.getLegend().setTextColor(Color.WHITE);

Changing colour for label in android

Can we change the colour of title in an Android application.
I want to change the colour of label which has contents Abc Supply Company.
This label is in Manifest file. Can we change the colour for this label.
Looking forward to your reply.
thanks.
I think you want to change color of Application Label that comes in every screen.If i am right then there is no solution
In this case you have use theme for activity in android manifest file like this to remove that label
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen"
Then design you own custom Label in Layout and then you can do whatever you want to do.
Hope this help you :)
Solution for this is known as Custom Title bar in Android, check this article: http://coderzheaven.com/2011/06/custom-title-bar-in-android/
Of course you can do.
You need to get reference of your
Textview yourTextView = ( TextView ) findViewById( R.id.YOUR_TEXT_VIEW );
and then call the function setTextColor( YOUR COLOR );

Activity Label Text Alignment

I want to know whether there is a way to change the alignment of activiy label, like other views can be aligned by android:gravity attribute..
NOTE: Except android:label=" Header "
Thanks in advance..
You have to customize Title Bar for that.
See the Examples Here :
http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/
http://coderzheaven.com/2011/06/16/custom-title-bar-in-android/
You can customize according to your need.

Categories

Resources