some changes to fedilab features panel

This commit is contained in:
Kasun 2019-06-08 23:07:28 +05:30
parent 491c4054f0
commit 55e3c2baca
2 changed files with 75 additions and 55 deletions

View File

@ -1002,7 +1002,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
ImageButton custom_feature_schedule = dialogViewFeatures.findViewById(R.id.custom_feature_schedule);
ImageButton custom_feature_mention = dialogViewFeatures.findViewById(R.id.custom_feature_mention);
ImageButton custom_feature_cache = dialogViewFeatures.findViewById(R.id.custom_feature_cache);
ImageButton custom_feature_information = dialogViewFeatures.findViewById(R.id.custom_feature_information);
dialogBuilderFeatures.setView(dialogViewFeatures);
AlertDialog dialogFeatures = dialogBuilderFeatures.create();
if (status.isBookmarked())
@ -1043,11 +1042,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
dialogFeatures.dismiss();
});
custom_feature_information.setOnClickListener(view -> {
tootInformation(status);
dialogFeatures.dismiss();
});
dialogFeatures.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialogFeatures.setCancelable(true);
dialogFeatures.show();

View File

@ -1,72 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal">
<ImageButton
android:id="@+id/custom_feature_translate"
android:src="@drawable/ic_translate_white"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="5dp"
android:tooltipText="@string/translate"
android:contentDescription="@string/translate"/>
<ImageButton
android:id="@+id/custom_feature_bookmark"
android:src="@drawable/ic_bookmark_white"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="5dp"
android:tooltipText="@string/bookmark_add"
style="@style/Widget.AppCompat.Button.Colored"
android:contentDescription="@string/bookmark_add"/>
<ImageButton
android:id="@+id/custom_feature_timed_mute"
android:src="@drawable/ic_timelapse"
android:layout_width="40dp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_height="40dp"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/timed_mute"
android:src="@drawable/ic_timelapse"
android:tooltipText="@string/timed_mute"
android:contentDescription="@string/timed_mute"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/custom_feature_schedule"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_schedule"
android:src="@drawable/ic_schedule"
android:layout_width="40dp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_height="40dp"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/schedule"
android:src="@drawable/ic_schedule"
android:tooltipText="@string/schedule_boost"
android:contentDescription="@string/schedule"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_timed_mute"
app:layout_constraintRight_toLeftOf="@id/custom_feature_translate"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_translate"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/translate"
android:src="@drawable/ic_translate_white"
android:tooltipText="@string/translate"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_schedule"
app:layout_constraintRight_toLeftOf="@id/custom_feature_bookmark"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_bookmark"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/bookmark_add"
android:src="@drawable/ic_bookmark_white"
android:tooltipText="@string/bookmark_add"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_translate"
app:layout_constraintRight_toLeftOf="@id/custom_feature_mention"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_mention"
android:src="@drawable/ic_mention_white"
android:layout_width="40dp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_height="40dp"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/mention_account"
android:src="@drawable/ic_mention_white"
android:tooltipText="@string/mention_status"
android:contentDescription="@string/mention_account"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_bookmark"
app:layout_constraintRight_toLeftOf="@id/custom_feature_cache"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/custom_feature_cache"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:background="@color/mastodonC4"
android:contentDescription="@string/refresh_cache"
android:src="@drawable/ic_refresh"
android:layout_width="40dp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_height="40dp"
android:layout_margin="5dp"
android:tooltipText="@string/refresh_cache"
android:contentDescription="@string/refresh_cache"/>
<ImageButton
android:id="@+id/custom_feature_information"
android:src="@drawable/ic_info_white"
android:layout_width="40dp"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_height="40dp"
android:layout_margin="5dp"
android:tooltipText="@string/see_boost_and_fav"
android:contentDescription="@string/see_boost_and_fav"/>
</LinearLayout>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/custom_feature_mention"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>