Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ dependencies {
exclude group: 'commons-logging', module: 'commons-logging'
}

implementation("com.github.nextcloud:android-library:2.22.2") {
implementation("com.github.nextcloud:android-library:4596e80dec") {
exclude group: 'org.ogce', module: 'xpp3'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import androidx.lifecycle.ViewModelProvider;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.nextcloud.android.common.ui.theme.utils.ColorRole;
import com.nextcloud.android.sso.AccountImporter;
import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException;

Expand Down Expand Up @@ -149,7 +150,7 @@ private void changeAccountSetting(@NonNull Account localAccount, @StringRes int
mainColor$.removeObservers(this);
final var util = BrandingUtil.of(color, this);
util.material.colorTextInputLayout(binding.inputWrapper);
util.material.colorProgressBar(binding.progress);
util.material.colorProgressBar(binding.progress, ColorRole.PRIMARY);
});

binding.inputWrapper.setHint(title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ private void initializeArguments() {
repository.getSharesForNotesAndSaveShareEntities();

runOnUiThread(() -> {
binding.title.setText(R.string.activity_sharing_title);
binding.fileName.setText(note.getTitle());
binding.searchContainer.setVisibility(View.VISIBLE);
binding.sharesList.setVisibility(View.VISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.os.Bundle
import android.text.TextUtils
import android.view.View
import androidx.lifecycle.lifecycleScope
import com.nextcloud.android.common.ui.theme.utils.ColorRole
import com.nextcloud.android.sso.helper.SingleAccountHelper
import com.owncloud.android.lib.common.utils.Log_OC
import com.owncloud.android.lib.resources.shares.OCShare
Expand Down Expand Up @@ -46,7 +47,8 @@ import java.util.Date
* 2. This will handle both Advanced Permissions and Send New Email functionality for existing shares to modify them.
*/
@Suppress("TooManyFunctions")
class NoteShareDetailActivity : BrandedActivity(),
class NoteShareDetailActivity :
BrandedActivity(),
ExpirationDatePickerDialogFragment.OnExpiryDateListener {

companion object {
Expand Down Expand Up @@ -86,6 +88,8 @@ class NoteShareDetailActivity : BrandedActivity(),

binding = ActivityNoteShareDetailBinding.inflate(layoutInflater)
setContentView(binding.root)
setSupportActionBar(binding.toolbar)
binding.toolbar.setNavigationOnClickListener({ v -> backPressed() })
val arguments = intent.extras

arguments?.let {
Expand Down Expand Up @@ -122,6 +126,9 @@ class NoteShareDetailActivity : BrandedActivity(),
}
}

private fun backPressed() {
finish()
}

override fun applyBrand(color: Int) {
val util = BrandingUtil.of(color, this)
Expand All @@ -136,6 +143,8 @@ class NoteShareDetailActivity : BrandedActivity(),
colorTextView(shareProcessAdvancePermissionTitle)

themeCheckbox(shareProcessAllowResharingCheckbox)

colorTextView(title, ColorRole.ON_SURFACE)
}

util.androidx.run {
Expand All @@ -152,6 +161,8 @@ class NoteShareDetailActivity : BrandedActivity(),

colorMaterialButtonPrimaryFilled(shareProcessBtnNext)
colorMaterialButtonPrimaryOutlined(shareProcessBtnCancel)

themeToolbar(toolbar)
}
}
util.platform.colorViewBackground(window.decorView)
Expand Down Expand Up @@ -192,6 +203,9 @@ class NoteShareDetailActivity : BrandedActivity(),
} else {
binding.shareProcessSetExpDateSwitch.visibility = View.GONE
}

binding.noteText.setText(share?.note)

shareProcessStep = SCREEN_TYPE_PERMISSION
}

Expand Down Expand Up @@ -448,12 +462,9 @@ class NoteShareDetailActivity : BrandedActivity(),
}
}


private fun getReSharePermission(): Int {
return SharePermissionsBuilder().apply {
setSharePermission(true)
}.build()
}
private fun getReSharePermission(): Int = SharePermissionsBuilder().apply {
setSharePermission(true)
}.build()

/**
* method to validate the step 1 screen information
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/drawable/file_calendar.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!--
~ Nextcloud - Android Client
~
~ SPDX-FileCopyrightText: 2018-2024 Google LLC
~ SPDX-FileCopyrightText: 2018-2025 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#757575"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="#FF000000"
android:pathData="M9,11L7,11v2h2v-2zM13,11h-2v2h2v-2zM17,11h-2v2h2v-2zM19,4h-1L18,2h-2v2L8,4L8,2L6,2v2L5,4c-1.11,0 -1.99,0.9 -1.99,2L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,6c0,-1.1 -0.9,-2 -2,-2zM19,20L5,20L5,9h14v11z" />
android:fillColor="@android:color/white"
android:pathData="M320,560Q303,560 291.5,548.5Q280,537 280,520Q280,503 291.5,491.5Q303,480 320,480Q337,480 348.5,491.5Q360,503 360,520Q360,537 348.5,548.5Q337,560 320,560ZM480,560Q463,560 451.5,548.5Q440,537 440,520Q440,503 451.5,491.5Q463,480 480,480Q497,480 508.5,491.5Q520,503 520,520Q520,537 508.5,548.5Q497,560 480,560ZM640,560Q623,560 611.5,548.5Q600,537 600,520Q600,503 611.5,491.5Q623,480 640,480Q657,480 668.5,491.5Q680,503 680,520Q680,537 668.5,548.5Q657,560 640,560ZM200,880Q167,880 143.5,856.5Q120,833 120,800L120,240Q120,207 143.5,183.5Q167,160 200,160L240,160L240,80L320,80L320,160L640,160L640,80L720,80L720,160L760,160Q793,160 816.5,183.5Q840,207 840,240L840,800Q840,833 816.5,856.5Q793,880 760,880L200,880ZM200,800L760,800Q760,800 760,800Q760,800 760,800L760,400L200,400L200,800Q200,800 200,800Q200,800 200,800ZM200,320L760,320L760,240Q760,240 760,240Q760,240 760,240L200,240Q200,240 200,240Q200,240 200,240L200,320ZM200,320L200,240Q200,240 200,240Q200,240 200,240L200,240Q200,240 200,240Q200,240 200,240L200,320Z" />
</vector>
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/ic_close_24px.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
~ Nextcloud Notes - Android Client
~
~ SPDX-FileCopyrightText: 2018-2025 Google LLC
~ SPDX-License-Identifier: Apache-2.0
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M256,760L200,704L424,480L200,256L256,200L480,424L704,200L760,256L536,480L760,704L704,760L480,536L256,760Z" />
</vector>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_note_share.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:text="@string/activity_sharing_title"
android:textColor="@color/fontAppbar"
android:textSize="18sp"
tools:text="Share Note" />
android:textSize="18sp" />

<TextView
android:id="@+id/file_name"
Expand Down
50 changes: 37 additions & 13 deletions app/src/main/res/layout/activity_note_share_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,29 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:minHeight="400dp">
android:focusableInTouchMode="true">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_close_24px">

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacer_2x"
android:ellipsize="end"
android:lines="1"
android:text="@string/activity_sharing_details_title"
android:textColor="@color/fontAppbar"
android:textSize="18sp" />

</com.google.android.material.appbar.MaterialToolbar>

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
Expand All @@ -22,7 +43,7 @@
android:padding="@dimen/spacer_2x"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toBottomOf="@id/toolbar">

<LinearLayout
android:orientation="vertical"
Expand Down Expand Up @@ -219,34 +240,37 @@
android:visibility="gone"/>

<LinearLayout
android:orientation="horizontal"
android:layout_marginTop="@dimen/spacer_2x"
android:gravity="end"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacer_2x"
android:orientation="horizontal"
android:weightSum="1.0">

<com.google.android.material.button.MaterialButton
android:id="@+id/share_process_btn_cancel"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="@dimen/button_width"
android:layout_height="wrap_content"
android:layout_width="@dimen/zero"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/note_share_detail_activity_cancel"
app:cornerRadius="@dimen/button_corner_radius" />

<com.google.android.material.button.MaterialButton
android:id="@+id/share_process_btn_next"
android:layout_width="@dimen/button_extra_width"
android:layout_height="wrap_content"
android:layout_width="@dimen/zero"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/spacer_1x"
android:layout_weight=".5"
android:text="@string/note_share_detail_activity_common_next"
android:theme="@style/Widget.Material3.Button.IconButton.Filled"
app:cornerRadius="@dimen/button_corner_radius"/>
app:cornerRadius="@dimen/button_corner_radius" />

</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_navigation_view_margin" />
android:layout_height="?android:attr/actionBarSize" />

</LinearLayout>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@
<string name="ecosystem_apps_more">More Nextcloud Apps</string>
<string name="ecosystem_apps_display_more">More</string>
<string name="activity_sharing_title">Sharing</string>
<string name="activity_sharing_details_title">Sharing Details</string>
<string name="share_expires">Share expires on %1$s</string>
<string name="dismiss">Dismiss</string>
</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
kotlinVersion = '2.3.0'
commonsVersion = '2.4.1'
androidCommonsVersion = '1.1.1'
nextcloudAndroidCommonLib = "0.30.0"
nextcloudAndroidCommonLib = "0.31.0"
singleSignOnVersion = "1.3.4"
}
repositories {
Expand Down
Loading
Loading