I develop a calculator application and I want customize my EditText like digital number in this picture:
What should I do? Thanks
You would need to find a font matching the one you are looking for (just search for digital font tff files) and apply that font. How to do that can be found here.
You need make the elevation and circle corner of Button,Try Defining Shadows.And also the specific font or image instead to custom the digital number.
Related
I am trying to create app which provide text formatting (like font style , font size , font color). So I want default fonts provided by android as a list to be shown in drop-down. Selecting font from drop-down will change the Text dynamically.
Can anyone help , how can I achieve this either via XML or programmatically ?
See the image how it must look like
font list is saved in Typeface class as a static field Map<Stirng, Typeface> sSystemFontMap. you just need to get this field. See my answer here.
There are only three system wide fonts in Android SDK.
normal
serif
monospace
More info : click here
This is a pack of free weather icons that I like.
It's made for CSS/HTML.
How can I type out those special characters in a textview? f00d, f02e etc
Yes, you can use a custom font for that icon pack.
Check any related tutorial about using a custom font in android, or this thread for example.
Also you can use a dedicated library like Calligraphy.
I am using floatlabelededittext in my application. My requirement is to set 2 different fonts for hint and text. Is it possible? Then how?
To have 2 different fonts for text and hint you need to use custom TypefaceSpan.
Set a font to a text by using usual setTypeface method
Set a font to a hint by using SpannableString
I already answered to that question Android EditText hint uses the same font that the EditText has
You can also keep the same font and change the hint's size and style independently. To know how, please, see my answer here
I don't think it is possible right now. But if you look at the source code of floatlabeledittext here https://github.com/wrapp/floatlabelededittext/blob/master/library/src/com/wrapp/floatlabelededittext/FloatLabeledEditText.java you see that it will be easy to add such feature.
All you need to do is to use setTypeface on the hint label mHintTextView.
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.
i want to create a simple rich text editor in android, just like this application on google play store: https://play.google.com/store/apps/details?id=com.spn.richnotepad&hl=en
and i am very new in android so anyone can provide some idea about it.
Thank You
It's not difficult at all but before you start I highly recommend you to read the guide from Android Developer site:
https://developer.android.com/training/basics/data-storage/index.html
You will learn how to save data which is a very important part of your project.
Then you have to learn all about EditText (allows the user to type text into your app) and TextView (displays text on screen).
http://developer.android.com/guide/topics/ui/controls/text.html
When your app is finished you can add some additional functionality:
Spelling Suggestions
https://developer.android.com/training/keyboard-input/index.html
Text Formatting
http://www.chrisumbel.com/article/android_textview_rich_text_spannablestring
Font Style
http://code.tutsplus.com/tutorials/quick-tip-customize-android-fonts--mobile-1601
Some useful links:
http://developer.android.com/reference/android/widget/EditText.html
http://developer.android.com/reference/android/widget/TextView.html
I also advice you this Notepad Tutorial which will guide you step by step to construct a simple notes list that lets the user add new notes.
http://developer.android.com/training/notepad/index.html
Check out this one https://github.com/chinalwb/Android-Rich-text-Editor, it is still in progress but you may get some pointers from there. Thanks.
Supported styles:
Bold
Italic
Underline
Strikethrough
Numeric list
Bullet list
Align left
Align center
Align right
Insert image
Background color
Hyper link
#
Quote
Foreground color
Emoji icon
Superscript
Subscript
Font size
Video
Image from internet
Dividing line
All styles support save as HTML file
Set init html content and continue editing or displaying
Demo for part of the supported features
Found some quick solutions :
droid-writer
cwac-richedit
Also check following discussions:
Rich Text Box in android
Implementing a rich text editor in Android?