File tree Expand file tree Collapse file tree 6 files changed +69
-8
lines changed
kotlin/com/rayfantasy/icode/ui/fragment Expand file tree Collapse file tree 6 files changed +69
-8
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,21 @@ import com.rayfantasy.icode.R
99import kotlinx.android.synthetic.main.fragment_about.*
1010
1111
12- class AboutFragment : FragmentBase () {
13- override fun onCreateView (inflater : LayoutInflater , container : ViewGroup ? ,
14- savedInstanceState : Bundle ? ): View ? {
15- // Inflate the layout for this fragment
16- /* AboutFragment_iv_version?.text = getVersion()*/
17- return inflater.inflate(R .layout.fragment_about, container, false )
12+ class AboutFragment : PreferenceFragment () {
13+ override fun onViewCreated (view : View ? , savedInstanceState : Bundle ? ) {
14+ super .onViewCreated(view, savedInstanceState)
15+ addPreferencesFromResource(R .xml.about)
16+ val OSWeb = findPreference(" OSWeb" )
17+ OSWeb .onPreferenceClickListener = OnPreferenceClickListener {
18+ var uri = Uri .parse(" https://github.com/RayFantasyStudio/iCode-Android" )
19+ var intent = Intent (Intent .ACTION_VIEW , uri)
20+ startActivity(intent)
21+ true
22+ }
1823 }
1924
2025 override fun onViewCreated (view : View ? , savedInstanceState : Bundle ? ) {
2126 super .onViewCreated(view, savedInstanceState)
22- tv_version.text = getString( R .string.version, BuildConfig . VERSION_NAME )
27+
2328 }
2429}
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class SettingFragment : PreferenceFragment() {
5858 LicensesDialog .Builder (activity).setNotices(R .raw.licenses).setIncludeOwnLicense(true ).build().show()
5959 true
6060 }
61+ S_pref_ver .text = getString(R .string.version, BuildConfig .VERSION_NAME )
6162 highlight = findPreference(PREF_HIGHLIGHT ) as ListPreference
6263 highlight.entries = highlightThemes
6364 highlight.entryValues = highlightThemes
Original file line number Diff line number Diff line change 88 android : layout_width =" 185dp"
99 android : layout_height =" 185dp"
1010 android : id =" @+id/AboutFragment_iv"
11- android : src =" @mipmap/ic_launcher "
11+ android : src =" @mipmap/ic_studio "
1212 android : layout_gravity =" center_horizontal|top"
1313 android : layout_marginTop =" 30dp" />
1414
2828 android : id =" @+id/tv_version"
2929 android : layout_gravity =" center"
3030 android : layout_marginTop =" 50dp" />
31+ <android .support.v7.widget.AppCompatButton
32+ android:id=" @+id/_btn"
33+ android:layout_height=" wrap_content"
34+ android:padding=" 12dp"
35+ android:text=" @string/login"
36+ android:layout_marginTop=" 10dp"
37+ android:layout_width=" match_parent" />
3138</FrameLayout >
Original file line number Diff line number Diff line change 133133 <string name =" exit" >退出</string >
134134
135135 <!-- 自动更新-->
136+ <string name =" T_pref_ver" >版本号</string >
137+ <string name =" S_pref_ver" >Null</string >
136138 <string name =" repo_download_failed_http" >Downloading %1$s failed: %2$d (%3$s)</string >
137139 <string name =" repo_download_failed" >Downloading %1$s failed: %2$s</string >
138140 <string name =" title_new_version" >发现新版本:%1$s</string >
139141 <string name =" msg_new_version" >%1$s\n\n大小:%2$s</string >
140142 <string name =" positive_new_version" >更新</string >
143+
144+ <!-- 团队、作者-->
145+ <string name =" S_OSWeb" >查看开源项目</string >
146+ <string name =" T_OSWeb" >点击查看开源项目</string >
147+ <string name =" pref_studio" >团队</string >
148+ <string name =" pref_member" >作者</string >
149+ <string name =" S_author_ztc" >ztc1997</string >
150+ <string name =" T_author_ztc" >Alex Zhang</string >
151+ <string name =" S_author_dzh" >Takayama</string >
152+ <string name =" T_author_dzh" >Allen Tom</string >
153+ <string name =" S_author_fjy" >LolliKit</string >
154+ <string name =" T_author_fjy" >JunyuanFeng</string >
141155
142156</resources >
Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' ?>
2+ <PreferenceScreen xmlns : android =' http://schemas.android.com/apk/res/android' >
3+
4+ <com .rayfantasy.icode.ui.preference.PreferenceCategory android : title =' @string/pref_studio' >
5+ <ImageView
6+ android:src=" @mipmap/studio"
7+ <Preference
8+ android:key=" OSWeb"
9+ android:summary=" @string/S_OSWeb"
10+ android:title=" @string/T_OSWeb"
11+ </com.rayfantasy.icode.ui.preference.PreferenceCategory>
12+ <com .rayfantasy.icode.ui.preference.PreferenceCategory android : title =' @string/pref_member' >
13+ <Preference
14+ android:key=" author_zrc"
15+ android:summary=" @string/S_author_ztc"
16+ android:title=" @string/T_author_ztc" />
17+ <Preference
18+ android:key=" author_dzh"
19+ android:summary=" @string/S_author_dzh"
20+ android:title=" @string/T_author_dzh" />
21+ <Preference
22+ android:key=" author_fjy"
23+ android:summary=" @string/S_author_fjy"
24+ android:title=" @string/T_author_fjy" />
25+ </com .rayfantasy.icode.ui.preference.PreferenceCategory>
26+
27+ </PreferenceScreen >
Original file line number Diff line number Diff line change 11<?xml version =' 1.0' encoding =' utf-8' ?>
22<PreferenceScreen xmlns : android =' http://schemas.android.com/apk/res/android' >
3+ <com .rayfantasy.icode.ui.preference.PreferenceCategory android : title =' @string/action_settings' >
4+ <Preference
5+ android:key=" pref_ver"
6+ android:summary=" @string/S_pref_ver"
7+ android:title=" @string/S_pref_ver" />
8+ </com .rayfantasy.icode.ui.preference.PreferenceCategory>
9+
310 <com .rayfantasy.icode.ui.preference.PreferenceCategory android : title =' @string/action_settings' >
411 <Preference
512 android : key =" pref_clear_cache"
You can’t perform that action at this time.
0 commit comments