Use TootButton for quick compose
This commit is contained in:
parent
66439e1939
commit
079dcaee89
|
@ -6,7 +6,6 @@ import android.content.SharedPreferences;
|
|||
import android.graphics.Color;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
|
@ -26,6 +25,7 @@ import com.keylesspalace.tusky.appstore.EventHub;
|
|||
import com.keylesspalace.tusky.appstore.PreferenceChangedEvent;
|
||||
import com.keylesspalace.tusky.appstore.QuickReplyEvent;
|
||||
import com.keylesspalace.tusky.components.compose.ComposeActivity;
|
||||
import com.keylesspalace.tusky.components.compose.view.TootButton;
|
||||
import com.keylesspalace.tusky.db.AccountEntity;
|
||||
import com.keylesspalace.tusky.db.AccountManager;
|
||||
import com.keylesspalace.tusky.entity.Announcement;
|
||||
|
@ -61,6 +61,7 @@ public class QuickTootHelper {
|
|||
private ImageButton prevButton;
|
||||
private ImageButton nextButton;
|
||||
private TextView announcementsCountText;
|
||||
private TootButton quickTootButton;
|
||||
|
||||
private SharedPreferences defPrefs;
|
||||
private String domain;
|
||||
|
@ -86,7 +87,7 @@ public class QuickTootHelper {
|
|||
prevButton = root.findViewById(R.id.button_prev_announcements);
|
||||
nextButton = root.findViewById(R.id.button_next_announcements);
|
||||
announcementsCountText = root.findViewById(R.id.text_view_announcements_count);
|
||||
Button quickTootButton = root.findViewById(R.id.toot_button);
|
||||
quickTootButton = root.findViewById(R.id.toot_button);
|
||||
|
||||
context = root.getContext();
|
||||
this.defPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
@ -256,6 +257,7 @@ public class QuickTootHelper {
|
|||
|
||||
private void updateVisibilityButton() {
|
||||
Status.Visibility visibility = getCurrentVisibility();
|
||||
quickTootButton.setStatusVisibility(visibility);
|
||||
switch (visibility) {
|
||||
case PUBLIC:
|
||||
visibilityButton.setImageResource(R.drawable.ic_public_24dp);
|
||||
|
|
|
@ -110,12 +110,12 @@
|
|||
app:layout_constraintEnd_toStartOf="@id/toot_button"
|
||||
app:layout_constraintStart_toEndOf="@id/visibility_button" />
|
||||
|
||||
<Button
|
||||
<com.keylesspalace.tusky.components.compose.view.TootButton
|
||||
android:id="@+id/toot_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/action_send_public"
|
||||
android:textColor="@android:color/white"
|
||||
style="@style/TuskyButton"
|
||||
android:layout_width="@dimen/toot_button_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue