Change composer
This commit is contained in:
parent
b372fc1cf3
commit
b1771c2dcb
|
@ -406,7 +406,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:name="app.fedilab.android.activities.PixelfedComposeActivity"
|
android:name="app.fedilab.android.activities.PixelfedComposeActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="stateAlwaysHidden"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|
|
@ -982,20 +982,30 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
tabLayout.getTabAt(0).select();
|
tabLayout.getTabAt(0).select();
|
||||||
*/
|
*/
|
||||||
if (social != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
if (social != UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
|
||||||
toot.setOnClickListener(new View.OnClickListener() {
|
if( social != UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED) {
|
||||||
@Override
|
toot.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View view) {
|
@Override
|
||||||
Intent intent = new Intent(getApplicationContext(), TootActivity.class);
|
public void onClick(View view) {
|
||||||
startActivity(intent);
|
Intent intent = new Intent(getApplicationContext(), TootActivity.class);
|
||||||
}
|
startActivity(intent);
|
||||||
});
|
}
|
||||||
toot.setOnLongClickListener(new View.OnLongClickListener() {
|
});
|
||||||
@Override
|
toot.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
public boolean onLongClick(View v) {
|
@Override
|
||||||
CrossActions.doCrossReply(BaseMainActivity.this, null, null, false);
|
public boolean onLongClick(View v) {
|
||||||
return false;
|
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 {
|
} else {
|
||||||
toot.setOnClickListener(new View.OnClickListener() {
|
toot.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@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);
|
holder.pixelfed_comments.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (status.getMedia_attachments() != null && status.getMedia_attachments().size() > 0){
|
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.setSliderAdapter(sliderAdapter);
|
||||||
holder.imageSlider.setIndicatorAnimation(IndicatorAnimations.WORM);
|
holder.imageSlider.setIndicatorAnimation(IndicatorAnimations.WORM);
|
||||||
holder.imageSlider.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);
|
holder.imageSlider.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);
|
||||||
|
|
|
@ -40,10 +40,12 @@ public class SliderAdapter extends SliderViewAdapter<SliderAdapter.SliderAdapter
|
||||||
|
|
||||||
private ArrayList<Attachment> attachments;
|
private ArrayList<Attachment> attachments;
|
||||||
private WeakReference<Context> contextWeakReference;
|
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.attachments = attachments;
|
||||||
this.contextWeakReference = contextWeakReference;
|
this.contextWeakReference = contextWeakReference;
|
||||||
|
this.canDelete = delete;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
app:ignore="NamespaceTypo">
|
app:ignore="NamespaceTypo">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pickup_picture"
|
android:id="@+id/pickup_picture"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="450dp"
|
android:layout_height="300dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
>
|
>
|
||||||
|
@ -52,13 +52,45 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/add_photo_indication_pixelfed"/>
|
android:text="@string/add_photo_indication_pixelfed"/>
|
||||||
</LinearLayout>
|
</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
|
<ScrollView
|
||||||
android:id="@+id/composer_container"
|
android:id="@+id/composer_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/bottom_bar_tooting"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_marginLeft="0dp"
|
android:layout_marginLeft="0dp"
|
||||||
android:layout_marginRight="0dp"
|
android:layout_marginRight="0dp"
|
||||||
|
@ -73,7 +105,7 @@
|
||||||
android:gravity="top|start"
|
android:gravity="top|start"
|
||||||
android:hint="@string/toot_placeholder"
|
android:hint="@string/toot_placeholder"
|
||||||
android:inputType="textMultiLine|textCapSentences"
|
android:inputType="textMultiLine|textCapSentences"
|
||||||
android:minLines="4" />
|
android:minLines="6" />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +113,6 @@
|
||||||
android:id="@+id/bottom_bar_tooting"
|
android:id="@+id/bottom_bar_tooting"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -141,21 +172,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
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
|
<ImageButton
|
||||||
android:id="@+id/toot_visibility"
|
android:id="@+id/toot_visibility"
|
||||||
android:layout_width="28dp"
|
android:layout_width="28dp"
|
||||||
|
@ -212,5 +228,5 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/toot_sensitive" />
|
android:text="@string/toot_sensitive" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</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="post_visibility_tilte">Visibility of the post</string>
|
||||||
<string name="add_photo_pixelfed">Click here to add photos</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="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>
|
</resources>
|
Loading…
Reference in New Issue