community page
This commit is contained in:
parent
5d362d4d39
commit
a70840040e
|
@ -1,18 +1,44 @@
|
|||
package com.tungsten.fcl.ui.setting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import com.tungsten.fcl.R;
|
||||
import com.tungsten.fclcore.task.Task;
|
||||
import com.tungsten.fcllibrary.component.ui.FCLCommonPage;
|
||||
import com.tungsten.fcllibrary.component.view.FCLLinearLayout;
|
||||
import com.tungsten.fcllibrary.component.view.FCLUILayout;
|
||||
|
||||
public class CommunityPage extends FCLCommonPage {
|
||||
public class CommunityPage extends FCLCommonPage implements View.OnClickListener {
|
||||
|
||||
private FCLLinearLayout discord;
|
||||
private FCLLinearLayout qq;
|
||||
|
||||
public CommunityPage(Context context, int id, FCLUILayout parent, int resId) {
|
||||
super(context, id, parent, resId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
discord = findViewById(R.id.discord);
|
||||
qq = findViewById(R.id.qq);
|
||||
discord.setOnClickListener(this);
|
||||
qq.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Task<?> refresh(Object... param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v == discord) {
|
||||
|
||||
}
|
||||
if (v == qq) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/ui_bg_color"
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="@string/community_hint"
|
||||
android:background="@drawable/bg_container_white"
|
||||
app:auto_text_tint="true"
|
||||
app:auto_text_background_tint="true"/>
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:background="@drawable/bg_container_white_clickable"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/discord"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:auto_linear_background_tint="true">
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/community_discord"
|
||||
android:layout_gravity="center"
|
||||
android:singleLine="true"
|
||||
app:auto_text_tint="true"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_baseline_arrow_forward_24"
|
||||
android:layout_gravity="center"
|
||||
app:auto_src_tint="true"/>
|
||||
|
||||
</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="15dp"
|
||||
android:background="@drawable/bg_container_white_clickable"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/qq"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/discord"
|
||||
app:auto_linear_background_tint="true">
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/community_qq"
|
||||
android:layout_gravity="center"
|
||||
android:singleLine="true"
|
||||
app:auto_text_tint="true"/>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<com.tungsten.fcllibrary.component.view.FCLImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_baseline_arrow_forward_24"
|
||||
android:layout_gravity="center"
|
||||
app:auto_src_tint="true"/>
|
||||
|
||||
</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
|
||||
|
||||
</com.tungsten.fcllibrary.component.view.FCLLinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -99,6 +99,8 @@
|
|||
<string name="button_select_all">全选</string>
|
||||
|
||||
<string name="community">社区</string>
|
||||
<string name="community_hint">加入社区以获取最新版本,反馈 bug 等。如果你要加入社区,请遵守社区规定。\n注:由于 QQ 群聊人数有限,加入 QQ 群需先赞助10元或以上金额。</string>
|
||||
<string name="community_qq">QQ 群</string>
|
||||
|
||||
<string name="control_create">创建新布局</string>
|
||||
<string name="control_delete">你确定要删除该布局吗?</string>
|
||||
|
|
|
@ -110,6 +110,9 @@
|
|||
<string name="button_select_all">Select All</string>
|
||||
|
||||
<string name="community">Community</string>
|
||||
<string name="community_hint">Join our community to get latest version, report bugs, etc. Please follow the community rules if you join.</string>
|
||||
<string name="community_discord" translatable="false">Discord</string>
|
||||
<string name="community_qq">QQ-Group</string>
|
||||
|
||||
<string name="control_create">Create Controller</string>
|
||||
<string name="control_delete">Are you sure to delete this controller?</string>
|
||||
|
|
Loading…
Reference in New Issue