我正在使用此网站上的这种流行方法制作启动画面:
Splash Screens the Right Way

我想显示翻译后的文本“正在加载”到其他语言。在前面的评论部分中有人问过这个问题,作者回答说,但是我不知道该怎么做。他的答复是:https://www.bignerdranch.com/blog/splash-screens-the-right-way/#comment-2633426495

如何在屏幕上绘制文本? (如果可能的话)或如那里所说,如何将其“包括”在图形中?

另一种方法更好吗?

最佳答案

Here is my splash activity xml
This is an easy solution and places the text bellow the image.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/colorIcons"
tools:context=".SplashActivity">

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerVertical="true"
    android:gravity="center"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/splashImage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="30dp"
        android:gravity="center_horizontal"
        android:scaleType="fitCenter"
        android:src="@mipmap/ic_launcher">
    </ImageView>

    <TextView
        android:id="@+id/splashText"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:text="@string/app_name"
        android:textColor="@color/colorPrimary_text"
        android:textSize="36sp" />
</LinearLayout>

10-07 23:05