-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP file captions - added new fragment
Signed-off-by: rapterjet2004 <[email protected]>
- Loading branch information
1 parent
128e57d
commit efc7021
Showing
4 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/nextcloud/talk/ui/dialog/FileAttachmentPreviewFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Nextcloud Talk application | ||
* | ||
* @author Julius Linus | ||
* Copyright (C) 2023 Julius Linus <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.nextcloud.talk.ui.dialog | ||
|
||
import android.app.Dialog | ||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.DialogFragment | ||
|
||
class FileAttachmentPreviewFragment : DialogFragment() { | ||
|
||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
// todo | ||
return super.onCreateDialog(savedInstanceState) | ||
} | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
// todo | ||
return super.onCreateView(inflater, container, savedInstanceState) | ||
} | ||
|
||
companion object { | ||
@JvmStatic | ||
fun newInstance() = FileAttachmentPreviewFragment() | ||
val TAG: String = FilterConversationFragment::class.java.simpleName | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
app/src/main/res/layout/dialog_file_attachment_preview.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Nextcloud Talk application | ||
~ | ||
~ @author Julius Linus | ||
~ Copyright (C) 2023 Julius Linus <[email protected]> | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation, either version 3 of the License, or | ||
~ at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
tools:background="@color/white" | ||
tools:visibility="visible"> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="@dimen/standard_margin" | ||
android:text="@string/nc_add_file" | ||
android:textSize="@dimen/md_title_textsize" /> | ||
|
||
<com.google.android.material.divider.MaterialDivider | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/dialog_file_attachment_preview_filenames" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="@dimen/standard_margin" | ||
android:textSize="@dimen/headline_text_size" | ||
tools:text="a.png\nb.png\nc.png"/> | ||
|
||
<com.google.android.material.textfield.TextInputLayout | ||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="@dimen/standard_margin"> | ||
|
||
<com.google.android.material.textfield.TextInputEditText | ||
android:id="@+id/dialog_file_attachment_preview_caption" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:hint="@string/nc_caption" /> | ||
|
||
</com.google.android.material.textfield.TextInputLayout> | ||
|
||
<com.google.android.material.divider.MaterialDivider | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/standard_half_margin" | ||
android:gravity="end" | ||
android:orientation="horizontal" | ||
android:paddingStart="@dimen/dialog_padding" | ||
android:paddingEnd="@dimen/dialog_padding" | ||
android:paddingBottom="@dimen/dialog_padding_top_bottom"> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/button_close" | ||
style="@style/Button.Borderless" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:minHeight="@dimen/min_size_clickable_area" | ||
android:text="@string/nc_no" /> | ||
|
||
<com.google.android.material.button.MaterialButton | ||
android:id="@+id/button_send" | ||
style="@style/Button.Borderless" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:minHeight="@dimen/min_size_clickable_area" | ||
android:text="@string/nc_yes" /> | ||
|
||
</LinearLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters