Change composer
This commit is contained in:
parent
b372fc1cf3
commit
b1771c2dcb
|
@ -406,7 +406,7 @@
|
|||
<activity
|
||||
android:name="app.fedilab.android.activities.PixelfedComposeActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:windowSoftInputMode="stateAlwaysHidden"
|
||||
android:fitsSystemWindows="true"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -982,20 +982,30 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
tabLayout.getTabAt(0).select();
|
||||
*/
|
||||
if (social != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
||||
toot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(getApplicationContext(), TootActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
toot.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
CrossActions.doCrossReply(BaseMainActivity.this, null, null, false);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if( social != UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED) {
|
||||
toot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(getApplicationContext(), TootActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
toot.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
CrossActions.doCrossReply(BaseMainActivity.this, null, null, false);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
toot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(getApplicationContext(), PixelfedComposeActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
toot.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -447,7 +447,7 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
|||
holder.pixelfed_comments.setVisibility(View.GONE);
|
||||
}
|
||||
if (status.getMedia_attachments() != null && status.getMedia_attachments().size() > 0){
|
||||
SliderAdapter sliderAdapter = new SliderAdapter(new WeakReference<>(context), status.getMedia_attachments());
|
||||
SliderAdapter sliderAdapter = new SliderAdapter(new WeakReference<>(context), false, status.getMedia_attachments());
|
||||
holder.imageSlider.setSliderAdapter(sliderAdapter);
|
||||
holder.imageSlider.setIndicatorAnimation(IndicatorAnimations.WORM);
|
||||
holder.imageSlider.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);
|
||||
|
|
|
@ -40,10 +40,12 @@ public class SliderAdapter extends SliderViewAdapter<SliderAdapter.SliderAdapter
|
|||
|
||||
private ArrayList<Attachment> attachments;
|
||||
private WeakReference<Context> contextWeakReference;
|
||||
private boolean canDelete;
|
||||
|
||||
SliderAdapter(WeakReference<Context> contextWeakReference, ArrayList<Attachment> attachments) {
|
||||
public SliderAdapter(WeakReference<Context> contextWeakReference, boolean delete, ArrayList<Attachment> attachments) {
|
||||
this.attachments = attachments;
|
||||
this.contextWeakReference = contextWeakReference;
|
||||
this.canDelete = delete;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
android:fillViewport="true"
|
||||
app:ignore="NamespaceTypo">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -33,7 +33,7 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/pickup_picture"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:layout_height="300dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
@ -52,13 +52,45 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/add_photo_indication_pixelfed"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.smarteist.autoimageslider.SliderView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/imageSlider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
app:sliderAnimationDuration="1000"
|
||||
app:sliderAutoCycleDirection="back_and_forth"
|
||||
app:sliderAutoCycleEnabled="true"
|
||||
app:sliderCircularHandlerEnabled="true"
|
||||
app:sliderIndicatorAnimationDuration="600"
|
||||
app:sliderIndicatorGravity="center_horizontal|bottom"
|
||||
app:sliderIndicatorMargin="15dp"
|
||||
app:sliderIndicatorOrientation="horizontal"
|
||||
app:sliderIndicatorPadding="3dp"
|
||||
app:sliderIndicatorRadius="2dp"
|
||||
app:sliderIndicatorSelectedColor="#5A5A5A"
|
||||
app:sliderIndicatorUnselectedColor="#FFF"
|
||||
app:sliderScrollTimeInSec="1"
|
||||
app:sliderStartAutoCycle="false" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal|bottom"
|
||||
android:minHeight="30dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="0dp">
|
||||
<Button
|
||||
android:id="@+id/upload_media"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:gravity="center"
|
||||
android:text="@string/upload_media" />
|
||||
</LinearLayout>
|
||||
<ScrollView
|
||||
android:id="@+id/composer_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/bottom_bar_tooting"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
|
@ -73,7 +105,7 @@
|
|||
android:gravity="top|start"
|
||||
android:hint="@string/toot_placeholder"
|
||||
android:inputType="textMultiLine|textCapSentences"
|
||||
android:minLines="4" />
|
||||
android:minLines="6" />
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
@ -81,7 +113,6 @@
|
|||
android:id="@+id/bottom_bar_tooting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -141,21 +172,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toot_picture"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@color/transparent"
|
||||
android:contentDescription="@string/toot_select_image"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_insert_photo" />
|
||||
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toot_visibility"
|
||||
android:layout_width="28dp"
|
||||
|
@ -212,5 +228,5 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/toot_sensitive" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_photo_camera"
|
||||
android:title="@string/camera"
|
||||
android:icon="@drawable/ic_photo_camera"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_contacts"
|
||||
android:title="@string/contact"
|
||||
android:icon="@drawable/ic_contacts"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_store"
|
||||
android:title="@string/save"
|
||||
android:icon="@drawable/ic_save_white"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_restore"
|
||||
android:title="@string/restore"
|
||||
android:icon="@drawable/ic_restore"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_schedule"
|
||||
android:title="@string/schedule"
|
||||
android:icon="@drawable/ic_schedule"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
|
@ -1230,4 +1230,5 @@
|
|||
<string name="post_visibility_tilte">Visibility of the post</string>
|
||||
<string name="add_photo_pixelfed">Click here to add photos</string>
|
||||
<string name="add_photo_indication_pixelfed">Accepted Formats: jpeg, png, gif \n\nMax File Size: 15 MB \n\nAlbums can contain up to 4 photos or videos</string>
|
||||
<string name="upload_media">Upload media</string>
|
||||
</resources>
|
Loading…
Reference in New Issue