日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android tv字体,best登陆「永久地址0365.tv」android默认字体android使用代码使用新的字体的常用代码...

發(fā)布時間:2023/12/10 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android tv字体,best登陆「永久地址0365.tv」android默认字体android使用代码使用新的字体的常用代码... 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

頁面類

類名稱:MainActivity

package com.example.android_fonts_test;

import android.support.v7.app.ActionBarActivity;import android.content.Context;import android.graphics.Typeface;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;import android.widget.TextView;

public class MainActivity extends ActionBarActivity {

private Context mContext;??private TextView test_font_1;?private TextView test_font_2;?private TextView test_font_3;???? @Override??? protected void onCreate(Bundle savedInstanceState) {??????? super.onCreate(savedInstanceState);??????? setContentView(R.layout.activity_main);??????? ??????? mContext = this;??????? ??????? // 字體??????? Typeface typeface_1 = Typeface.createFromAsset(mContext.getAssets(),"fonts/Beyond Wonderland.ttf");??????? ??????? test_font_1 = (TextView)findViewById(R.id.test_font_1);??????? test_font_1.setTypeface(typeface_1);??????? ??????? ??????? Typeface typeface_2 = Typeface.createFromAsset(mContext.getAssets(),"fonts/Channel.ttf");??????? test_font_2 = (TextView)findViewById(R.id.test_font_2);??????? test_font_2.setTypeface(typeface_2);??????? ??????? Typeface typeface_3 = Typeface.createFromAsset(mContext.getAssets(),"fonts/JFHolNte.ttf");??????? test_font_3 = (TextView)findViewById(R.id.test_font_3);??????? test_font_3.setTypeface(typeface_3);??????? ??? }

@Override??? public boolean onCreateOptionsMenu(Menu menu) {??????? // Inflate the menu; this adds items to the action bar if it is present.??????? getMenuInflater().inflate(R.menu.main, menu);??????? return true;??? }

@Override??? public boolean onOptionsItemSelected(MenuItem item) {??????? // Handle action bar item clicks here. The action bar will??????? // automatically handle clicks on the Home/Up button, so long??????? // as you specify a parent activity in AndroidManifest.xml.??????? int id = item.getItemId();??????? if (id == R.id.action_settings) {??????????? return true;??????? }??????? return super.onOptionsItemSelected(item);??? }}

總結(jié)

以上是生活随笔為你收集整理的android tv字体,best登陆「永久地址0365.tv」android默认字体android使用代码使用新的字体的常用代码...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。