Skip to content

Commit da35ea9

Browse files
committed
撤消造成错误的about修改
1 parent bf1243b commit da35ea9

File tree

7 files changed

+13
-74
lines changed

7 files changed

+13
-74
lines changed

app/src/main/kotlin/com/rayfantasy/icode/ui/fragment/AboutFragment.kt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,16 @@ import com.rayfantasy.icode.R
99
import kotlinx.android.synthetic.main.fragment_about.*
1010

1111

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-
}
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)
2318
}
2419

2520
override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
2621
super.onViewCreated(view, savedInstanceState)
27-
22+
tv_version.text = getString(R.string.version, BuildConfig.VERSION_NAME)
2823
}
2924
}

app/src/main/kotlin/com/rayfantasy/icode/ui/fragment/SettingFragment.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ 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)
6261
highlight = findPreference(PREF_HIGHLIGHT) as ListPreference
6362
highlight.entries = highlightThemes
6463
highlight.entryValues = highlightThemes

app/src/main/res/layout/fragment_about.xml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
tools:context=".ui.fragment.AboutFragment">
66

77
<ImageView
8-
android:layout_width="185dp"
9-
android:layout_height="185dp"
10-
android:id="@+id/AboutFragment_iv"
11-
android:src="@mipmap/ic_studio"
12-
android:layout_gravity="center_horizontal|top"
13-
android:layout_marginTop="30dp" />
8+
android:layout_width="185dp"
9+
android:layout_height="185dp"
10+
android:id="@+id/AboutFragment_iv"
11+
android:src="@mipmap/ic_launcher"
12+
android:layout_gravity="center_horizontal|top"
13+
android:layout_marginTop="30dp"/>
1414

1515
<TextView
1616
android:layout_width="wrap_content"
@@ -28,11 +28,4 @@
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"/>
3831
</FrameLayout>
-748 KB
Binary file not shown.

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,10 @@
133133
<string name="exit">退出</string>
134134

135135
<!--自动更新-->
136-
<string name="T_pref_ver">版本号</string>
137-
<string name="S_pref_ver">Null</string>
138136
<string name="repo_download_failed_http">Downloading %1$s failed: %2$d (%3$s)</string>
139137
<string name="repo_download_failed">Downloading %1$s failed: %2$s</string>
140138
<string name="title_new_version">发现新版本:%1$s</string>
141139
<string name="msg_new_version">%1$s\n\n大小:%2$s</string>
142140
<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>
155141

156142
</resources>

app/src/main/res/xml/about.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/src/main/res/xml/settings.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
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-
103
<com.rayfantasy.icode.ui.preference.PreferenceCategory android:title='@string/action_settings'>
114
<Preference
125
android:key="pref_clear_cache"

0 commit comments

Comments
 (0)