Skip to content

Commit

Permalink
功能[关于界面]: 点击贡献者跳转贡献者主页
Browse files Browse the repository at this point in the history
  • Loading branch information
Vera-Firefly committed Oct 1, 2024
1 parent 4e2a35a commit 9b10c8c
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private void setSettings() {
setAllCaps(false);

int[] sizes = getExtendedViewData().getSizeCompounds();
sizes[0] = resources.getDimensionPixelSize(R.dimen._30sdp);
sizes[0] = resources.getDimensionPixelSize(R.dimen._35sdp);
getExtendedViewData().setSizeCompounds(sizes);
postProcessDrawables();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.EditText;

import androidx.annotation.NonNull;
Expand All @@ -19,13 +21,40 @@

public class AboutFragment extends Fragment {
public static final String TAG = "ABOUT_FRAGMENT";
private static final String GITHUB_URL_PLT = "https://github.com/PojavLauncherTeam";
private static final String GITHUB_URL_VF = "https://github.com/Vera-Firefly";
private static final String GITHUB_URL_MOV = "https://github.com/MovTery";
private static final String GITHUB_URL_EURYA = "https://github.com/Eurya2233369";
private static final String GITHUB_URL_COLORYR = "https://github.com/Coloryr";
private static final String GITHUB_URL_MIO = "https://github.com/ShirosakiMio";
private static final String GITHUB_URL_T = "https://github.com/Tungstend";
public AboutFragment() {
super(R.layout.fragment_about);
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {

Button mContributorButton1 = view.findViewById(R.id.contributor_pojavteam);
Button mContributorButton2 = view.findViewById(R.id.contributor_vera_firefly);
Button mContributorButton3 = view.findViewById(R.id.contributor_movtery);
Button mContributorButton4 = view.findViewById(R.id.contributor_eurya2233369);
Button mContributorButton5 = view.findViewById(R.id.contributor_coloryr);
Button mContributorButton6 = view.findViewById(R.id.contributor_mio);
Button mContributorButton7 = view.findViewById(R.id.contributor_tungstend);

mContributorButton1.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_PLT));
mContributorButton2.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_VF));
mContributorButton3.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_MOV));
mContributorButton4.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_EURYA));
mContributorButton5.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_COLORYR));
mContributorButton6.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_MIO));
mContributorButton7.setOnClickListener(v -> Tools.openURL(requireActivity(), GITHUB_URL_T));

mContributorButton2.setOnLongClickListener((v) -> {
Tools.openURL(requireActivity(), Tools.URL_HOME);
return true;
});

}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions app_pojavlauncher/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_pojavteam"
android:text="PojavLauncherTeam"
/>

Expand All @@ -77,6 +78,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_verafirefly"
android:text="Vera-Firefly"
/>

Expand All @@ -85,6 +87,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_movtery"
android:text="MovTery"
/>

Expand All @@ -93,6 +96,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_lingmuqiuzhu"
android:text="Eurya2233369"
/>

Expand All @@ -101,6 +105,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_coloryr"
android:text="Coloryr"
/>

Expand All @@ -109,15 +114,17 @@
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/image_about_mio"
android:text="ShirosakiMio"
/>

<com.firefly.ui.button.LauncherMenuButton
android:id="@+id/contributor_tungsten"
android:id="@+id/contributor_tungstend"
android:layout_width="match_parent"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:text="Tungsten"
android:drawableStart="@drawable/image_about_tungstend"
android:text="Tungstend"
/>

</LinearLayout>
Expand Down

0 comments on commit 9b10c8c

Please sign in to comment.