mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #8435 from nextcloud/dependabot/gradle/androidx.appcompat-appcompat-1.3.0
Bump appcompat from 1.2.0 to 1.3.0
This commit is contained in:
commit
3902664bc0
3 changed files with 29 additions and 40 deletions
|
@ -286,7 +286,7 @@ dependencies {
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.3.0'
|
implementation 'com.google.android.material:material:1.3.0'
|
||||||
implementation 'com.jakewharton:disklrucache:2.0.2'
|
implementation 'com.jakewharton:disklrucache:2.0.2'
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.exifinterface:exifinterface:1.3.2'
|
implementation 'androidx.exifinterface:exifinterface:1.3.2'
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
|
||||||
|
|
|
@ -25,26 +25,28 @@ import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.owncloud.android.R;
|
import com.owncloud.android.R;
|
||||||
|
import com.owncloud.android.databinding.CommunityLayoutBinding;
|
||||||
import com.owncloud.android.utils.DisplayUtils;
|
import com.owncloud.android.utils.DisplayUtils;
|
||||||
import com.owncloud.android.utils.theme.ThemeButtonUtils;
|
import com.owncloud.android.utils.theme.ThemeButtonUtils;
|
||||||
import com.owncloud.android.utils.theme.ThemeColorUtils;
|
import com.owncloud.android.utils.theme.ThemeColorUtils;
|
||||||
import com.owncloud.android.utils.theme.ThemeUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity providing information about ways to participate in the app's development.
|
* Activity providing information about ways to participate in the app's development.
|
||||||
*/
|
*/
|
||||||
public class CommunityActivity extends DrawerActivity {
|
public class CommunityActivity extends DrawerActivity {
|
||||||
|
|
||||||
|
private CommunityLayoutBinding binding;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.community_layout);
|
binding = CommunityLayoutBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
// setup toolbar
|
// setup toolbar
|
||||||
setupToolbar();
|
setupToolbar();
|
||||||
|
@ -58,17 +60,16 @@ public class CommunityActivity extends DrawerActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupContent() {
|
private void setupContent() {
|
||||||
TextView rcView = findViewById(R.id.community_release_candidate_text);
|
binding.communityReleaseCandidateText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
rcView.setMovementMethod(LinkMovementMethod.getInstance());
|
|
||||||
|
|
||||||
TextView contributeIrcView = findViewById(R.id.community_contribute_irc_text);
|
TextView contributeIrcView = binding.communityContributeIrcText;
|
||||||
contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
|
contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
contributeIrcView.setText(Html.fromHtml(getString(R.string.community_contribute_irc_text) + " " +
|
contributeIrcView.setText(Html.fromHtml(getString(R.string.community_contribute_irc_text) + " " +
|
||||||
getString(R.string.community_contribute_irc_text_link,
|
getString(R.string.community_contribute_irc_text_link,
|
||||||
ThemeColorUtils.primaryColorToHexString(this),
|
ThemeColorUtils.primaryColorToHexString(this),
|
||||||
getString(R.string.irc_weblink))));
|
getString(R.string.irc_weblink))));
|
||||||
|
|
||||||
TextView contributeForumView = findViewById(R.id.community_contribute_forum_text);
|
TextView contributeForumView = binding.communityContributeForumText;
|
||||||
contributeForumView.setMovementMethod(LinkMovementMethod.getInstance());
|
contributeForumView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
contributeForumView.setText(Html.fromHtml(getString(R.string.community_contribute_forum_text) + " " +
|
contributeForumView.setText(Html.fromHtml(getString(R.string.community_contribute_forum_text) + " " +
|
||||||
getString(R.string.community_contribute_forum_text_link,
|
getString(R.string.community_contribute_forum_text_link,
|
||||||
|
@ -76,7 +77,7 @@ public class CommunityActivity extends DrawerActivity {
|
||||||
getString(R.string.help_link),
|
getString(R.string.help_link),
|
||||||
getString(R.string.community_contribute_forum_forum))));
|
getString(R.string.community_contribute_forum_forum))));
|
||||||
|
|
||||||
TextView contributeTranslationView = findViewById(R.id.community_contribute_translate_text);
|
TextView contributeTranslationView = binding.communityContributeTranslateText;
|
||||||
contributeTranslationView.setMovementMethod(LinkMovementMethod.getInstance());
|
contributeTranslationView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
contributeTranslationView.setText(Html.fromHtml(
|
contributeTranslationView.setText(Html.fromHtml(
|
||||||
getString(R.string.community_contribute_translate_link,
|
getString(R.string.community_contribute_translate_link,
|
||||||
|
@ -85,7 +86,7 @@ public class CommunityActivity extends DrawerActivity {
|
||||||
getString(R.string.community_contribute_translate_translate)) + " " +
|
getString(R.string.community_contribute_translate_translate)) + " " +
|
||||||
getString(R.string.community_contribute_translate_text)));
|
getString(R.string.community_contribute_translate_text)));
|
||||||
|
|
||||||
TextView contributeGithubView = findViewById(R.id.community_contribute_github_text);
|
TextView contributeGithubView = binding.communityContributeGithubText;
|
||||||
contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
|
contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
contributeGithubView.setText(Html.fromHtml(
|
contributeGithubView.setText(Html.fromHtml(
|
||||||
getString(R.string.community_contribute_github_text,
|
getString(R.string.community_contribute_github_text,
|
||||||
|
@ -93,43 +94,34 @@ public class CommunityActivity extends DrawerActivity {
|
||||||
ThemeColorUtils.primaryColorToHexString(this),
|
ThemeColorUtils.primaryColorToHexString(this),
|
||||||
getString(R.string.contributing_link)))));
|
getString(R.string.contributing_link)))));
|
||||||
|
|
||||||
MaterialButton reportButton = findViewById(R.id.community_testing_report);
|
MaterialButton reportButton = binding.communityTestingReport;
|
||||||
ThemeButtonUtils.colorPrimaryButton(reportButton, this);
|
ThemeButtonUtils.colorPrimaryButton(reportButton, this);
|
||||||
reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link));
|
reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link));
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetBetaFDroidClick(View view) {
|
binding.communityBetaFdroid.setOnClickListener(
|
||||||
DisplayUtils.startLinkIntent(this, R.string.fdroid_beta_link);
|
l -> DisplayUtils.startLinkIntent(this, R.string.fdroid_beta_link));
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetRCFDroidClick(View view) {
|
binding.communityReleaseCandidateFdroid.setOnClickListener(
|
||||||
DisplayUtils.startLinkIntent(this, R.string.fdroid_link);
|
l -> DisplayUtils.startLinkIntent(this, R.string.fdroid_link));
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetRCPlayStoreClick(View view) {
|
binding.communityReleaseCandidatePlaystore.setOnClickListener(
|
||||||
DisplayUtils.startLinkIntent(this, R.string.play_store_register_beta);
|
l -> DisplayUtils.startLinkIntent(this, R.string.play_store_register_beta));
|
||||||
}
|
|
||||||
|
|
||||||
public void onGetBetaApkClick(View view) {
|
binding.communityBetaApk.setOnClickListener(
|
||||||
DisplayUtils.startLinkIntent(this, R.string.beta_apk_link);
|
l -> DisplayUtils.startLinkIntent(this, R.string.beta_apk_link));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
boolean retval = true;
|
boolean retval = true;
|
||||||
switch (item.getItemId()) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
case android.R.id.home: {
|
|
||||||
if (isDrawerOpen()) {
|
if (isDrawerOpen()) {
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
} else {
|
} else {
|
||||||
openDrawer();
|
openDrawer();
|
||||||
}
|
}
|
||||||
break;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
retval = super.onOptionsItemSelected(item);
|
retval = super.onOptionsItemSelected(item);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true"
|
||||||
|
android:focusable="true">
|
||||||
|
|
||||||
<!-- The main content view -->
|
<!-- The main content view -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -140,7 +141,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/bg_default"
|
android:background="@color/bg_default"
|
||||||
android:onClick="onGetRCFDroidClick"
|
|
||||||
android:padding="@dimen/zero"
|
android:padding="@dimen/zero"
|
||||||
android:src="@drawable/fdroid"
|
android:src="@drawable/fdroid"
|
||||||
android:contentDescription="@string/community_rc_fdroid" />
|
android:contentDescription="@string/community_rc_fdroid" />
|
||||||
|
@ -150,7 +150,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/bg_default"
|
android:background="@color/bg_default"
|
||||||
android:onClick="onGetRCPlayStoreClick"
|
|
||||||
android:padding="@dimen/zero"
|
android:padding="@dimen/zero"
|
||||||
android:src="@drawable/playstore"
|
android:src="@drawable/playstore"
|
||||||
android:contentDescription="@string/community_rc_play_store" />
|
android:contentDescription="@string/community_rc_play_store" />
|
||||||
|
@ -181,7 +180,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/bg_default"
|
android:background="@color/bg_default"
|
||||||
android:onClick="onGetBetaFDroidClick"
|
|
||||||
android:padding="@dimen/zero"
|
android:padding="@dimen/zero"
|
||||||
android:src="@drawable/fdroid"
|
android:src="@drawable/fdroid"
|
||||||
android:contentDescription="@string/community_dev_fdroid" />
|
android:contentDescription="@string/community_dev_fdroid" />
|
||||||
|
@ -191,7 +189,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/bg_default"
|
android:background="@color/bg_default"
|
||||||
android:onClick="onGetBetaApkClick"
|
|
||||||
android:padding="@dimen/zero"
|
android:padding="@dimen/zero"
|
||||||
android:src="@drawable/apk"
|
android:src="@drawable/apk"
|
||||||
android:contentDescription="@string/community_dev_direct_download" />
|
android:contentDescription="@string/community_dev_direct_download" />
|
||||||
|
|
Loading…
Reference in a new issue