App内切换语言
转载请注明出处 http://www.cnblogs.com/cnwutianhao/p/6746981.html 前几天客户提需求,对App增加一个功能,这个功能目前市面上已经很常见,那就是应用内切换语言。啥意思,就是 英、中、法、德、日。。。语言随意切换。 (本案例采用Data-Bingding模式,麻麻再也不用担心我findViewBy不到Id了哈哈,开个玩笑) 先上示例图: 代码实现: 布局文件(Data-Binding模式),很简单就是两行文字 <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.tnnowu.android.switchlanguage.MainActivity"> <TextView android:id="@+id/titleTextView" android:layout_width=