Merge branch 'master' into 43-file-browser

This commit is contained in:
M M Arif
2019-10-07 11:26:24 +05:00
11 changed files with 898 additions and 188 deletions

View File

@@ -49,6 +49,7 @@ public class AboutFragment extends Fragment {
final TextView appVerBuild;
final TextView donationLink;
final TextView donationLinkPatreon;
final TextView translateLink;
final TextView creditsButton;
final TextView sponsorsButton;
final TextView appWebsite;
@@ -64,6 +65,7 @@ public class AboutFragment extends Fragment {
creditsButton = v.findViewById(R.id.creditsButton);
donationLink = v.findViewById(R.id.donationLink);
donationLinkPatreon = v.findViewById(R.id.donationLinkPatreon);
translateLink = v.findViewById(R.id.translateLink);
sponsorsButton = v.findViewById(R.id.sponsorsButton);
appWebsite = v.findViewById(R.id.appWebsite);
appRepo = v.findViewById(R.id.appRepo);
@@ -90,6 +92,16 @@ public class AboutFragment extends Fragment {
}
});
translateLink.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setData(Uri.parse(getResources().getString(R.string.corwdinLink)));
startActivity(intent);
}
});
appWebsite.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent();

View File

@@ -30,7 +30,7 @@ public class SettingsFragment extends Fragment {
private Context ctx = null;
private static String[] langList = {"English", "French", "German", "Russian"};
private static String[] langList = {"Arabic", "Chinese", "English", "French", "German", "Russian"};
private static int langSelectedChoice = 0;
private static String[] timeList = {"Pretty", "Normal"};
@@ -68,7 +68,7 @@ public class SettingsFragment extends Fragment {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_BROWSABLE);
intent.setData(Uri.parse(getResources().getString(R.string.appRepoContributingLink)));
intent.setData(Uri.parse(getResources().getString(R.string.corwdinLink)));
startActivity(intent);
}
});
@@ -244,6 +244,12 @@ public class SettingsFragment extends Fragment {
tinyDb.putInt("langId", i);
switch (langList[i]) {
case "Arabic":
tinyDb.putString("locale", "ar");
break;
case "Chinese":
tinyDb.putString("locale", "zh");
break;
case "French":
tinyDb.putString("locale", "fr");
break;