update
This commit is contained in:
parent
2262751065
commit
5230a4f2a7
|
@ -7,6 +7,7 @@ import android.graphics.BitmapFactory;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
import com.tungsten.fcl.R;
|
import com.tungsten.fcl.R;
|
||||||
import com.tungsten.fcl.setting.Profile;
|
import com.tungsten.fcl.setting.Profile;
|
||||||
import com.tungsten.fcl.ui.PageManager;
|
import com.tungsten.fcl.ui.PageManager;
|
||||||
|
@ -100,19 +101,7 @@ public class RemoteModInfoPage extends FCLTempPage implements View.OnClickListen
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
icon.setImageDrawable(null);
|
icon.setImageDrawable(null);
|
||||||
new Thread(() -> {
|
Glide.with(getContext()).load(addon.getIconUrl()).into(icon);
|
||||||
try {
|
|
||||||
URL url = new URL(addon.getIconUrl());
|
|
||||||
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
|
|
||||||
httpURLConnection.setDoInput(true);
|
|
||||||
httpURLConnection.connect();
|
|
||||||
InputStream inputStream = httpURLConnection.getInputStream();
|
|
||||||
Bitmap icon = BitmapFactory.decodeStream(inputStream);
|
|
||||||
Schedulers.androidUIThread().execute(() -> RemoteModInfoPage.this.icon.setImageBitmap(icon));
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
ModTranslations.Mod mod = translations.getModByCurseForgeId(addon.getSlug());
|
ModTranslations.Mod mod = translations.getModByCurseForgeId(addon.getSlug());
|
||||||
name.setText(mod != null && LocaleUtils.isChinese(getContext()) ? mod.getDisplayName() : addon.getTitle());
|
name.setText(mod != null && LocaleUtils.isChinese(getContext()) ? mod.getDisplayName() : addon.getTitle());
|
||||||
description.setText(addon.getDescription());
|
description.setText(addon.getDescription());
|
||||||
|
|
|
@ -1,232 +1,231 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:background="@color/ui_bg_color"
|
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/ui_bg_color"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingEnd="10dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/left"
|
android:id="@+id/left"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0"
|
app:layout_constraintHorizontal_bias="0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintWidth_percent="0.3">
|
app:layout_constraintWidth_percent="0.3">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/search_layout"
|
android:id="@+id/search_layout"
|
||||||
android:background="@drawable/bg_container_white"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_container_white">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:padding="10dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/mods_name"
|
android:text="@string/mods_name"
|
||||||
app:auto_text_tint="true"/>
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLEditText
|
<com.tungsten.fcllibrary.component.view.FCLEditText
|
||||||
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:id="@+id/name"
|
app:auto_edit_tint="true" />
|
||||||
app:auto_edit_tint="true"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:id="@+id/download_source_text"
|
android:id="@+id/download_source_text"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/settings_launcher_download_source"
|
android:text="@string/settings_launcher_download_source"
|
||||||
app:auto_text_tint="true"/>
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
||||||
|
android:id="@+id/download_source"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp" />
|
||||||
android:id="@+id/download_source"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/world_game_version"
|
android:text="@string/world_game_version"
|
||||||
app:auto_text_tint="true"/>
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
||||||
|
android:id="@+id/game_version"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp" />
|
||||||
android:id="@+id/game_version"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/mods_category"
|
android:text="@string/mods_category"
|
||||||
app:auto_text_tint="true"/>
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
||||||
|
android:id="@+id/category"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp" />
|
||||||
android:id="@+id/category"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/search_sort"
|
android:text="@string/search_sort"
|
||||||
app:auto_text_tint="true"/>
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
<com.tungsten.fcllibrary.component.view.FCLSpinner
|
||||||
|
android:id="@+id/sort"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp" />
|
||||||
android:id="@+id/sort"/>
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
android:visibility="gone"
|
|
||||||
app:ripple="true"
|
|
||||||
android:id="@+id/install_modpack"
|
android:id="@+id/install_modpack"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/install_modpack"/>
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="@string/install_modpack"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
app:ripple="true"
|
|
||||||
android:id="@+id/search"
|
android:id="@+id/search"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/search"/>
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="@string/search"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/list_layout"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
app:layout_constraintStart_toEndOf="@+id/left"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/left">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||||
android:id="@+id/list_layout"
|
android:id="@+id/page"
|
||||||
android:orientation="vertical"
|
android:layout_width="0dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_container_white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/search_page_n"
|
||||||
|
app:auto_text_background_tint="true"
|
||||||
|
app:auto_text_tint="true" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/previous"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
|
||||||
app:auto_text_background_tint="true"
|
|
||||||
app:auto_text_tint="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/bg_container_white"
|
|
||||||
android:id="@+id/page"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/search_page_n"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
|
||||||
app:ripple="true"
|
|
||||||
app:auto_padding="false"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:id="@+id/previous"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/search_previous_page"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
|
||||||
app:ripple="true"
|
|
||||||
app:auto_padding="false"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:id="@+id/next"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/search_next_page"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
|
||||||
app:ripple="true"
|
|
||||||
app:auto_padding="false"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:id="@+id/first"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/search_first_page"/>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLButton
|
|
||||||
app:ripple="true"
|
|
||||||
app:auto_padding="false"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:id="@+id/last"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/search_last_page"/>
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:id="@+id/list"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:divider="@android:color/transparent"
|
|
||||||
android:dividerHeight="0dp"/>
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLProgressBar
|
|
||||||
android:id="@+id/progress"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true" />
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/search_previous_page"
|
||||||
|
app:auto_padding="false"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
<com.tungsten.fcllibrary.component.view.FCLImageButton
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
android:id="@+id/retry"
|
android:id="@+id/next"
|
||||||
android:src="@drawable/ic_baseline_refresh_24"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"/>
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/search_next_page"
|
||||||
|
app:auto_padding="false"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
|
android:id="@+id/first"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/search_first_page"
|
||||||
|
app:auto_padding="false"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
|
<com.tungsten.fcllibrary.component.view.FCLButton
|
||||||
|
android:id="@+id/last"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/search_last_page"
|
||||||
|
app:auto_padding="false"
|
||||||
|
app:ripple="true" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/list"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:divider="@android:color/transparent"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/left"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/list_layout" />
|
||||||
|
|
||||||
|
<com.tungsten.fcllibrary.component.view.FCLProgressBar
|
||||||
|
android:id="@+id/progress"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.tungsten.fcllibrary.component.view.FCLImageButton
|
||||||
|
android:id="@+id/retry"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_baseline_refresh_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue