mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix issue #129 - Improve behaviour when composing media descriptions
This commit is contained in:
parent
a680b11e96
commit
ed76c97e8b
3 changed files with 32 additions and 20 deletions
|
@ -60,7 +60,7 @@
|
|||
<activity
|
||||
android:name=".activities.ComposeActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:windowSoftInputMode="adjustPan|adjustResize"
|
||||
android:label="@string/compose" />
|
||||
<activity
|
||||
android:name=".activities.StatusInfoActivity"
|
||||
|
|
|
@ -484,6 +484,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
builderInner.setView(popupMediaDescriptionBinding.getRoot());
|
||||
|
||||
popupMediaDescriptionBinding.mediaDescription.setFilters(new InputFilter[]{new InputFilter.LengthFilter(1500)});
|
||||
popupMediaDescriptionBinding.mediaDescription.requestFocus();
|
||||
Glide.with(popupMediaDescriptionBinding.mediaPicture.getContext())
|
||||
.asBitmap()
|
||||
.load(attachmentPath)
|
||||
|
@ -492,7 +493,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
@Override
|
||||
public void onResourceReady(@NonNull Bitmap resource, Transition<? super Bitmap> transition) {
|
||||
popupMediaDescriptionBinding.mediaPicture.setImageBitmap(resource);
|
||||
popupMediaDescriptionBinding.mediaPicture.setImageAlpha(60);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,27 +14,39 @@
|
|||
You should have received a copy of the GNU General Public License along with Fedilab; if not,
|
||||
see <http://www.gnu.org/licenses>.
|
||||
-->
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
tools:context=".activities.ComposeActivity">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/media_picture"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@string/media_description"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/media_description"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/media_picture"
|
||||
android:layout_centerInParent="true"
|
||||
android:inputType="textMultiLine" />
|
||||
tools:context=".activities.ComposeActivity">
|
||||
|
||||
</RelativeLayout>
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/media_picture"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:contentDescription="@string/media_description"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toTopOf="@+id/media_description"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/media_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/media_picture"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:inputType="textMultiLine|textCapSentences"
|
||||
android:minLines="3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/media_picture" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in a new issue