Android Studio如何轻松整理字符串到string.xml中

来源:互联网 发布:电脑什么软件跑分准 编辑:程序博客网 时间:2024/06/07 07:33

在Android studio中提供快捷键 Alt+Enter。步骤:
1. 在xml中选中需要提取的字符串,然后使用快捷键Alt+Enter。
2. 在弹出的窗口中选择Extract string resource.
3. 填写resource name。

<TextView        android:id="@+id/costReport"        style="@style/home_word_style"        android:gravity="center"        android:layout_width="match_parent"        android:layout_height="40dp"        android:text="费用填报"        />

这里写图片描述

0 0
原创粉丝点击