Android Open Source - Llama Custom Typeface Text View






From Project

Back to project page Llama.

License

The source code is released under:

MIT License

If you think the Android project Llama listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package io.github.nick11roberts.llamaspawningbuttonthing;
/*  w  w  w. ja  va 2  s  .  co m*/
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;

public class CustomTypefaceTextView extends TextView {

    public CustomTypefaceTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init(attrs);
    }

    public CustomTypefaceTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(attrs);

    }

    public CustomTypefaceTextView(Context context) {
        super(context);
        init(null);
    }

    private void init(AttributeSet attrs) {
        if (attrs!=null) {

            Typeface myTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/Fipps-Regular.otf");
            setTypeface(myTypeface);

        }
    }

}




Java Source Code List

io.github.nick11roberts.llamaspawningbuttonthing.AnuRandom.java
io.github.nick11roberts.llamaspawningbuttonthing.ApplicationTest.java
io.github.nick11roberts.llamaspawningbuttonthing.AsyncTaskParams.java
io.github.nick11roberts.llamaspawningbuttonthing.CustomTypefaceSpan.java
io.github.nick11roberts.llamaspawningbuttonthing.CustomTypefaceTextView.java
io.github.nick11roberts.llamaspawningbuttonthing.ListenerService.java
io.github.nick11roberts.llamaspawningbuttonthing.LlamaActivity.java
io.github.nick11roberts.llamaspawningbuttonthing.LlamaWearActivity.java
io.github.nick11roberts.llamaspawningbuttonthing.RandomLlamaAttributes.java
io.github.nick11roberts.llamaspawningbuttonthing.RetrieveQRandResponse.java
io.github.nick11roberts.llamaspawningbuttonthing.RetrieveQRandTask.java
io.github.nick11roberts.llamaspawningbuttonthing.SendToDataLayerThread.java
io.github.nick11roberts.llamaspawningbuttonthing.UniqueViewIdCreator.java