Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 @@ -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>
32 changes: 32 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12521,6 +12521,14 @@
<sha256 value="e7ab2429aded8474972439b212bc68e7bd7dd9663abf0cdbd1d448df2476acab" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="4596e80dec">
<artifact name="android-library-4596e80dec.aar">
<sha256 value="8f8f2cbf7caae9355ce01e1e4ae8fc9aa569845a27eba0d2817ae8c4e8062967" origin="Generated by Gradle"/>
</artifact>
<artifact name="android-library-4596e80dec.module">
<sha256 value="3d6cff63bad0d5a3846b4a8c2f9b912f61607cc277cf86932193588830513aee" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="ffc47c75fabbcbcdcd32b30e9836fde58d5c59d5">
<artifact name="android-library-ffc47c75fabbcbcdcd32b30e9836fde58d5c59d5.aar">
<sha256 value="97068670e06306878153d4ea2aa8a2e00252f023deb18123b64f2f5e5920458e" origin="Generated by Gradle" reason="Artifact is not signed"/>
Expand Down Expand Up @@ -17834,6 +17842,14 @@
<sha256 value="e8380e2a808a10c4516a1eb177b21ebb86ffc162cf2b6b01e8cf28f412d348c2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-parcelize-runtime" version="2.3.0">
<artifact name="kotlin-parcelize-runtime-2.3.0.jar">
<sha256 value="aec9fabdfea276f359c2ca62ec487cabc7826316dffb5accc965372eef778246" origin="Generated by Gradle"/>
</artifact>
<artifact name="kotlin-parcelize-runtime-2.3.0.pom">
<sha256 value="9bf50bd0623ac86c98f7c0cea23aca2e21bac8b2c1c60da40528a92e68f0ea87" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-reflect" version="1.6.10">
<artifact name="kotlin-reflect-1.6.10.jar">
<sha256 value="3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
Expand Down Expand Up @@ -18485,6 +18501,14 @@
<sha256 value="237c4f35166957beccc26ec9f16c4d8dd4c9b52359f7c71d01dce77d8ab07662" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="2.3.0">
<artifact name="kotlin-stdlib-jdk7-2.3.0.jar">
<sha256 value="5886a23865e68668a235c25645f4e367e8b4b19b9b12098633fb0f74f1a554b1" origin="Generated by Gradle"/>
</artifact>
<artifact name="kotlin-stdlib-jdk7-2.3.0.pom">
<sha256 value="35bfc6220d5abb84a6fcc146e820a1557fc472530b250d0fc4ff8e0385115fe7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk8" version="1.8.20">
<artifact name="kotlin-stdlib-jdk8-1.8.20.jar">
<sha256 value="e398b67977622718bf18ff99b739c7d9da060f33fb458a2e25203221c16af010" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -18586,6 +18610,14 @@
<sha256 value="44de864180cfe763cf07c1268cf279b98a9555a423bb2c811deddb55ac2cc859" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk8" version="2.3.0">
<artifact name="kotlin-stdlib-jdk8-2.3.0.jar">
<sha256 value="9c12ce489a51dd49df1a11f439122631a4ec86da8cd089dadc6a9a187cb7d88c" origin="Generated by Gradle"/>
</artifact>
<artifact name="kotlin-stdlib-jdk8-2.3.0.pom">
<sha256 value="66e6de6742645bb44e564639ca939aa90936389513942f74f34b66d7994e0aa0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-tooling-core" version="2.1.0">
<artifact name="kotlin-tooling-core-2.1.0.jar">
<sha256 value="4176c612098cb92df38a485ff8b10aaa24abb400f610d48f5088aeb07c8002c8" origin="Generated by Gradle"/>
Expand Down
Loading