suspend use of incompatible sources
This commit is contained in:
@@ -272,7 +272,7 @@ class MainActivity : AppCompatActivity() {
|
||||
)
|
||||
Snackbar.make(fbtn,"请检查网络连接",Snackbar.LENGTH_LONG).show()
|
||||
val handler = Handler()
|
||||
handler.postDelayed({ loadPost(context, tags, page) },5000)
|
||||
handler.postDelayed({ loadPost(context, tags, page) },1000)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<List<Post>>, response: Response<List<Post>>) {
|
||||
|
||||
@@ -30,7 +30,7 @@ class SettingsActivity : AppCompatActivity(), AdapterView.OnItemSelectedListener
|
||||
val spinner = findViewById<Spinner>(R.id.source)
|
||||
//设置spinner列表
|
||||
val adapter = ArrayAdapter(this,R.layout.spinner_item_layout,name_sourceArray)
|
||||
adapter.setDropDownViewResource(R.layout.spinner_item_layout)
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
spinner.adapter = adapter
|
||||
spinner.onItemSelectedListener = this
|
||||
|
||||
@@ -49,12 +49,12 @@ class SettingsActivity : AppCompatActivity(), AdapterView.OnItemSelectedListener
|
||||
|
||||
override fun onItemSelected(p0: AdapterView<*>?, p1: View?, p2: Int, p3: Long) {
|
||||
configSp.edit().putString("source",url_sourceArray[p2]).apply()
|
||||
if (p2==2){
|
||||
configSp.edit().putString("type","1").apply()
|
||||
}else{
|
||||
configSp.edit().putString("type","0").apply()
|
||||
// if (p2==2){
|
||||
// configSp.edit().putString("type","1").apply()
|
||||
// }else{
|
||||
configSp.edit().putString("type","0").apply()
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onNothingSelected(p0: AdapterView<*>?) {
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="6"
|
||||
android:textSize="24sp"
|
||||
android:textSize="20sp"
|
||||
android:text="加载源"/>
|
||||
<Spinner
|
||||
android:id="@+id/source"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="4"
|
||||
android:textSize="24sp"
|
||||
android:textSize="20sp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="inherit"
|
||||
android:textSize="24sp"/>
|
||||
android:textSize="20sp"/>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<resources>
|
||||
<string-array name="pic_source">
|
||||
<item>yande.re</item>
|
||||
<item>danbooru</item>
|
||||
<item>gelbooru</item>
|
||||
<!-- <item>danbooru</item>-->
|
||||
<!-- <item>gelbooru</item>-->
|
||||
<item>konachan</item>
|
||||
</string-array>
|
||||
<string-array name="url_source">
|
||||
<item>https://yande.re/</item>
|
||||
<item>https://danbooru.donmai.us/</item>
|
||||
<item>https://gelbooru.com/</item>
|
||||
<!-- <item>https://danbooru.donmai.us/</item>-->
|
||||
<!-- <item>https://gelbooru.com/</item>-->
|
||||
<item>https://konachan.com/</item>
|
||||
|
||||
</string-array>
|
||||
|
||||
Reference in New Issue
Block a user