草庐IT

custom-font

全部标签

android - 无法在带有大文本 : "Font size too large to fit in cache" 的 Android TextView 中显示 Unicode 字符(表情符号)

我试图在TextView中显示单个Unicode字符(表情符号),文本大小较大:mEmojiTextView=(TextView)findViewById(R.id.emoji_text_view);mEmojiTextView.setTextSize(200);mEmojiTextView.setText("\uD83D\uDE01");字符没有出现在屏幕上,我在logcat中得到这个错误:E/OpenGLRenderer﹕Fontsizetoolargetofitincache.width,height=545,513有效的最大尺寸是mEmojiTextView.setTextSi

android - Html.fromHtml 函数的 "font"标记中有哪些字体可用?

Html.fromHtml几乎没有任何关于它支持哪些标签的文档。据说在很多网站上它确实支持“font”标签(比如here),但是在这个标签中设置“face”属性时我找不到可用的字体。我可以假定哪些字体始终可用?其中哪些仅来自特定的Android版本?某处有他们的名单吗?编辑:似乎答案应该在“/system/etc/fonts.xml”文件中。这是它在Android6.0.1上的内容:Roboto-Thin.ttfRoboto-ThinItalic.ttfRoboto-Light.ttfRoboto-LightItalic.ttfRoboto-Regular.ttfRoboto-Ital

android - 错误 :Execution failed for task ':app:processDebugResources' when using font folder inside res

我已将SDK更新到AndroidO开发者预览版,并开始使用单个TextView进行简单演示。当我在res文件夹中包含font时,它开始显示Error:Executionfailedfortask':app:processDebugResources'.>com.android.ide.common.process.ProcessException:Failedtoexecuteaapt这是我的build.gradleandroid{compileSdkVersion25buildToolsVersion"25.0.2"defaultConfig{...minSdkVersion15ta

java - ArrayList<custom-object> 的 Parcelable 实现

我认为这只是一个愚蠢的错误,但ArrayList总是以null结尾。这让我发疯所以我想寻求帮助。项目等级:importandroid.os.Parcel;importandroid.os.Parcelable;publicclassStoryTagimplementsParcelable{privateStringtagTitle;privateintoccurrence;publicStoryTag(){}publicStoryTag(Parcelin){tagTitle=in.readString();occurrence=in.readInt();}publicStringget

android - 将自定义 ant 任务添加到我的 Android 项目中的 custom_rules.xml

我想为我的Android项目向Ant脚本添加一个任务,以便从源代码生成Javadoc。为此,我修改了custom_rules.xml归档为并将以下行添加到ant.properties:javadoc.dir=javadoc现在当我运行antjavadoc,我收到以下错误消息:$antjavadocBuildfile:e:\devel\src\java\bbct\android\common\test\build.xmlBUILDFAILEDe:\devel\src\java\bbct\android\common\test\build.xml:69:Thefollowingerroro

android - ListView : How to add data on custom ArrayAdapter?

为了拥有丰富多彩的ListView,我创建了自己的ArrayAdapter,但是当我想使用adapter.clear()或adapter.add()时,它会出现错误.这是代码和错误。XML文件:适配器:classstableArrayAdapterextendsArrayAdapter{HashMapmIdMap=newHashMap();publicstableArrayAdapter(Contextcontext,inttextViewResourceId,String[]objects){super(context,textViewResourceId,objects);for(

安卓 : how to use Tamil font

这是我的泰米尔语htmlunicode字符串முதல்பக்கசெய்திகள்我正在使用这段代码:TextViewtext=(TextView)findViewById(R.id.text);//initializetoyourtextviewTypefacetf=Typeface.createFromAsset(this.getAssets(),"fonts/tamil.ttf");text.setTypeface(tf);text.setText("முதல்பக்கசெய்திகள்");在Android中,这可能吗? 最佳答案

android - 如何在andEngine中使用Font和Text?

这就是我尝试这样做的方式:fontTextureAtlas=newBitmapTextureAtlas(1024,1024,TextureOptions.BILINEAR_PREMULTIPLYALPHA);font=FontFactory.createFromAsset(fontTextureAtlas,this,"times.ttf",45f,true,Color.WHITE);getEngine().getTextureManager().loadTexture(fontTextureAtlas);然后,在代码中:Texttext=newText(10,10,font,"Some

android - CalendarContract.EventsColumns.CUSTOM_APP_URI 的用途是什么?

标题说明了一切:CalendarContract.EventsColumns.CUSTOM_APP_URI的用途是什么?我问是因为我正在寻找一个地方,我的应用程序可以将一些特定于应用程序的数据填充到事件表中。也许这是一个无用的问题,因为当然,我需要确保其他应用程序不会破坏我的数据。也许更好的问题是:如何将特定于应用程序的数据存储在日历事件表中? 最佳答案 如CalendarContract中所述:/***ActivityAction:Displaytheeventtotheuserinthecustomappas*specified

android - appcompat-v7 : Custom view not properly aligned in ActionBar

我正在尝试使用基于AppcompatToolbar的actionBar这是我的toolbar.xml我将其包含在我的activity.xml文件中。然后在我的Activity的OnCreate方法中,我将自定义PagerStrip设置为ActionBarActionBaractionBar=getSupportActionBar();actionBar.setCustomView(R.layout.pager_strip);actionBar.setDisplayShowCustomEnabled(true);tabs=(PagerSlidingTabStrip)actionBar.g