added initial scheduled status viewer support, layout cleanup, bug fix

This commit is contained in:
nuclearfog 2023-09-29 21:40:43 +02:00
parent fb90a7d99e
commit 782a7b3120
No known key found for this signature in database
GPG Key ID: 03488A185C476379
33 changed files with 346 additions and 228 deletions

View File

@ -129,6 +129,10 @@
android:screenOrientation="portrait"
android:theme="@style/AppTheme" />
<activity android:name=".ui.activities.ScheduleActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" />
<receiver
android:name=".notification.PushNotificationReceiver"
android:enabled="true"

View File

@ -19,6 +19,7 @@ public class ScheduledMastodonStatus implements ScheduledStatus {
private static final long serialVersionUID = -1340937182294786469L;
private long id;
private long time;
private String text;
private String language = "";
private int visibility;
@ -37,6 +38,7 @@ public class ScheduledMastodonStatus implements ScheduledStatus {
String idStr = json.getString("id");
String visibilityStr = json.getString("visibility");
text = StringUtils.extractText(json.optString("text", ""));
time = StringUtils.getIsoTime(json.optString("scheduled_at", ""));
sensitive = params.optBoolean("sensitive", false);
spoiler = params.optBoolean("spoiler_text", false);
@ -88,6 +90,12 @@ public class ScheduledMastodonStatus implements ScheduledStatus {
}
@Override
public long getPublishTime() {
return time;
}
@Override
public String getText() {
return text;

View File

@ -14,6 +14,8 @@ public interface ScheduledStatus extends Serializable {
*/
long getId();
long getPublishTime();
/**
* @return status text
*/

View File

@ -42,12 +42,12 @@ public class HashtagActivity extends AppCompatActivity implements SearchView.OnQ
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.page_hashtag);
setContentView(R.layout.page_tab_view);
ViewGroup root = findViewById(R.id.page_hashtag_root);
Toolbar toolbar = findViewById(R.id.page_hashtag_toolbar);
TabSelector tabSelector = findViewById(R.id.page_hashtag_tab);
viewPager = findViewById(R.id.page_hashtag_pager);
ViewGroup root = findViewById(R.id.page_tab_view_root);
Toolbar toolbar = findViewById(R.id.page_tab_view_toolbar);
TabSelector tabSelector = findViewById(R.id.page_tab_view_tabs);
viewPager = findViewById(R.id.page_tab_view_pager);
hashtagAction = new HashtagAction(this);
settings = GlobalSettings.get(this);

View File

@ -117,13 +117,13 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.page_main);
Toolbar toolbar = findViewById(R.id.home_toolbar);
Toolbar toolbar = findViewById(R.id.page_tab_view_toolbar);
navigationView = findViewById(R.id.home_navigator);
header = (ViewGroup) navigationView.getHeaderView(0);
floatingButton = findViewById(R.id.home_post);
floatingButton = findViewById(R.id.page_tab_view_post_button);
drawerLayout = findViewById(R.id.main_layout);
viewPager = findViewById(R.id.home_pager);
tabSelector = findViewById(R.id.home_tab);
viewPager = findViewById(R.id.page_tab_view_pager);
tabSelector = findViewById(R.id.page_tab_view_tabs);
profileImage = header.findViewById(R.id.navigation_profile_image);
username = header.findViewById(R.id.navigation_profile_username);
screenname = header.findViewById(R.id.navigation_profile_screenname);
@ -442,7 +442,7 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
intent.putExtra(ProfileActivity.KEY_ID, settings.getLogin().getId());
activityResultLauncher.launch(intent);
drawerLayout.close();
} else if (v.getId() == R.id.home_post) {
} else if (v.getId() == R.id.page_tab_view_post_button) {
Intent intent = new Intent(this, StatusEditor.class);
startActivity(intent);
}
@ -464,8 +464,10 @@ public class MainActivity extends AppCompatActivity implements ActivityResultCal
AppStyles.setTheme(header);
tabSelector.addTabIcons(settings.getLogin().getConfiguration().getHomeTabIcons());
tabSelector.updateTheme();
if (!settings.floatingButtonEnabled()) {
floatingButton.setVisibility(View.INVISIBLE);
if (settings.floatingButtonEnabled()) {
floatingButton.setVisibility(View.VISIBLE);
} else {
floatingButton.setVisibility(View.GONE);
}
if (!settings.getLogin().getConfiguration().isFilterSupported()) {
navigationView.getMenu().findItem(R.id.menu_navigator_filter).setVisible(false);

View File

@ -0,0 +1,36 @@
package org.nuclearfog.twidda.ui.activities;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.viewpager2.widget.ViewPager2;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.ui.adapter.viewpager.ScheduleAdapter;
/**
* @author nuclearfog
*/
public class ScheduleActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.page_tab_view);
Toolbar toolbar = findViewById(R.id.page_tab_view_toolbar);
ViewPager2 viewPager = findViewById(R.id.page_tab_view_pager);
View tabSelector = findViewById(R.id.page_tab_view_tabs);
ScheduleAdapter adapter = new ScheduleAdapter(this);
viewPager.setAdapter(adapter);
tabSelector.setVisibility(View.GONE);
toolbar.setTitle("");
setSupportActionBar(toolbar);
}
}

View File

@ -78,12 +78,12 @@ public class SearchActivity extends AppCompatActivity implements OnClickListener
@Override
protected void onCreate(@Nullable Bundle b) {
super.onCreate(b);
setContentView(R.layout.page_search);
ViewGroup root = findViewById(R.id.search_layout);
TabSelector tabSelector = findViewById(R.id.search_tab);
View floatingButton = findViewById(R.id.search_post_button);
toolbar = findViewById(R.id.search_toolbar);
viewPager = findViewById(R.id.search_pager);
setContentView(R.layout.page_tab_view);
ViewGroup root = findViewById(R.id.page_tab_view_root);
TabSelector tabSelector = findViewById(R.id.page_tab_view_tabs);
View floatingButton = findViewById(R.id.page_tab_view_post_button);
toolbar = findViewById(R.id.page_tab_view_toolbar);
viewPager = findViewById(R.id.page_tab_view_pager);
settings = GlobalSettings.get(this);
hashtagAction = new HashtagAction(this);
@ -241,7 +241,7 @@ public class SearchActivity extends AppCompatActivity implements OnClickListener
@Override
public void onClick(View v) {
if (v.getId() == R.id.search_post_button) {
if (v.getId() == R.id.page_tab_view_post_button) {
Intent intent = new Intent(this, StatusEditor.class);
if (search.startsWith("#"))
intent.putExtra(StatusEditor.KEY_TEXT, search + " ");

View File

@ -108,11 +108,11 @@ public class UserlistActivity extends AppCompatActivity implements ActivityResul
@Override
protected void onCreate(@Nullable Bundle b) {
super.onCreate(b);
setContentView(R.layout.page_listdetail);
ViewGroup root = findViewById(R.id.listdetail_root);
TabSelector tabSelector = findViewById(R.id.listdetail_tab);
toolbar = findViewById(R.id.listdetail_toolbar);
viewPager = findViewById(R.id.listdetail_pager);
setContentView(R.layout.page_tab_view);
ViewGroup root = findViewById(R.id.page_tab_view_root);
TabSelector tabSelector = findViewById(R.id.page_tab_view_tabs);
toolbar = findViewById(R.id.page_tab_view_toolbar);
viewPager = findViewById(R.id.page_tab_view_pager);
settings = GlobalSettings.get(this);
confirmDialog = new ConfirmDialog(this, this);

View File

@ -54,11 +54,11 @@ public class UserlistsActivity extends AppCompatActivity implements ActivityResu
@Override
protected void onCreate(@Nullable Bundle b) {
super.onCreate(b);
setContentView(R.layout.page_list);
ViewGroup root = findViewById(R.id.list_view);
Toolbar toolbar = findViewById(R.id.list_toolbar);
TabSelector tabSelector = findViewById(R.id.list_tab);
viewPager = findViewById(R.id.list_pager);
setContentView(R.layout.page_tab_view);
ViewGroup root = findViewById(R.id.page_tab_view_root);
Toolbar toolbar = findViewById(R.id.page_tab_view_toolbar);
TabSelector tabSelector = findViewById(R.id.page_tab_view_tabs);
viewPager = findViewById(R.id.page_tab_view_pager);
settings = GlobalSettings.get(this);

View File

@ -110,11 +110,11 @@ public class UsersActivity extends AppCompatActivity implements OnTabSelectedLis
@Override
protected void onCreate(Bundle savedInst) {
super.onCreate(savedInst);
setContentView(R.layout.page_users);
ViewGroup root = findViewById(R.id.page_users_root);
Toolbar toolbar = findViewById(R.id.page_users_toolbar);
tabSelector = findViewById(R.id.page_exclude_tab);
viewPager = findViewById(R.id.page_users_pager);
setContentView(R.layout.page_tab_view);
ViewGroup root = findViewById(R.id.page_tab_view_root);
Toolbar toolbar = findViewById(R.id.page_tab_view_toolbar);
tabSelector = findViewById(R.id.page_tab_view_tabs);
viewPager = findViewById(R.id.page_tab_view_pager);
filterLoader = new UserFilterAction(this);
settings = GlobalSettings.get(this);

View File

@ -0,0 +1,91 @@
package org.nuclearfog.twidda.ui.adapter.recyclerview;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import androidx.recyclerview.widget.RecyclerView.Adapter;
import org.nuclearfog.twidda.model.ScheduledStatus;
import org.nuclearfog.twidda.model.lists.ScheduledStatuses;
import org.nuclearfog.twidda.ui.adapter.recyclerview.holder.OnHolderClickListener;
import org.nuclearfog.twidda.ui.adapter.recyclerview.holder.PlaceHolder;
import org.nuclearfog.twidda.ui.adapter.recyclerview.holder.ScheduleHolder;
/**
* @author nuclearfog
*/
public class ScheduleAdapter extends Adapter<ViewHolder> implements OnHolderClickListener {
private static final int ITEM_GAP = 1;
private static final int ITEM_SCHEDULE = 2;
private OnScheduleClickListener listener;
private ScheduledStatuses items = new ScheduledStatuses();
private int loadingIndex = -1;
public ScheduleAdapter(OnScheduleClickListener listener) {
this.listener = listener;
}
@Override
public int getItemViewType(int index) {
if (items.get(index) == null)
return ITEM_GAP;
return ITEM_SCHEDULE;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == ITEM_SCHEDULE) {
return new ScheduleHolder(parent, this);
} else {
return new PlaceHolder(parent, this, false);
}
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
if (holder instanceof ScheduleHolder) {
} else if (holder instanceof PlaceHolder) {
PlaceHolder placeHolder = (PlaceHolder) holder;
placeHolder.setLoading(loadingIndex == position);
}
}
@Override
public int getItemCount() {
return items.size();
}
@Override
public void onItemClick(int position, int type, int... extras) {
}
@Override
public boolean onPlaceholderClick(int index) {
return false;
}
public interface OnScheduleClickListener {
int SELECT = 1;
int REMOVE = 2;
void onScheduleClick(ScheduledStatus status, int type);
}
}

View File

@ -0,0 +1,59 @@
package org.nuclearfog.twidda.ui.adapter.recyclerview.holder;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import org.nuclearfog.twidda.R;
import org.nuclearfog.twidda.backend.utils.AppStyles;
import org.nuclearfog.twidda.backend.utils.StringUtils;
import org.nuclearfog.twidda.config.GlobalSettings;
import org.nuclearfog.twidda.model.ScheduledStatus;
/**
* @author nuclearfog
*/
public class ScheduleHolder extends ViewHolder implements OnClickListener {
private TextView time, text;
private OnHolderClickListener listener;
public ScheduleHolder(ViewGroup parent, OnHolderClickListener listener) {
super(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_schedule, parent, false));
this.listener = listener;
GlobalSettings settings = GlobalSettings.get(parent.getContext());
CardView cardLayout = (CardView) itemView;
ViewGroup container = itemView.findViewById(R.id.item_schedule_container);
time = itemView.findViewById(R.id.item_schedule_time);
text = itemView.findViewById(R.id.item_schedule_text);
AppStyles.setTheme(container, Color.TRANSPARENT);
cardLayout.setCardBackgroundColor(settings.getCardColor());
}
@Override
public void onClick(View v) {
}
/**
*
*/
public void setContent(ScheduledStatus status) {
time.setText(StringUtils.formatExpirationTime(time.getResources(), status.getPublishTime()));
text.setText(status.getText());
}
}

View File

@ -0,0 +1,19 @@
package org.nuclearfog.twidda.ui.adapter.viewpager;
import androidx.fragment.app.FragmentActivity;
import org.nuclearfog.twidda.ui.fragments.ScheduleFragment;
/**
* @author nuclearfog
*/
public class ScheduleAdapter extends ViewPagerAdapter {
/**
*
*/
public ScheduleAdapter(FragmentActivity fragmentActivity) {
super(fragmentActivity);
fragments.add(new ScheduleFragment());
}
}

View File

@ -226,6 +226,8 @@ public class HashtagFragment extends ListFragment implements OnHashtagClickListe
} else if (result.mode == HashtagActionResult.UNFOLLOW) {
Toast.makeText(requireContext(), R.string.info_hashtag_unfollowed, Toast.LENGTH_SHORT).show();
adapter.removeItem(result.hashtag);
} else if (result.mode == HashtagActionResult.ERROR) {
ErrorUtils.showErrorMessage(requireContext(), result.exception);
}
}

View File

@ -0,0 +1,31 @@
package org.nuclearfog.twidda.ui.fragments;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* @author nuclearfog
*/
public class ScheduleFragment extends ListFragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
@Override
protected void onReload() {
}
@Override
protected void onReset() {
}
}

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M10,0.4c-5.302,0 -9.6,4.298 -9.6,9.6s4.298,9.6 9.6,9.6c5.301,0 9.6,-4.298 9.6,-9.601C19.6,4.698 15.301,0.4 10,0.4zM10,17.599c-4.197,0 -7.6,-3.402 -7.6,-7.6c0,-4.197 3.402,-7.6 7.6,-7.6l0,0V10l6.792,-3.396C17.305,7.627 17.6,8.777 17.6,10C17.6,14.197 14.197,17.599 10,17.599z"
android:fillColor="#FFFFFF"/>
</vector>

View File

@ -33,7 +33,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dialog_poll_list_height"
android:layout_marginTop="@dimen/dialog_poll_layout_margins"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout

View File

@ -4,7 +4,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="@dimen/item_card_layout_padding"
android:orientation="vertical"
style="@style/CardViewStyle">
<ImageView

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:padding="@dimen/item_emoji_layout_padding"
android:layout_marginStart="@dimen/item_emoji_layout_margin_left_right"
android:layout_marginEnd="@dimen/item_emoji_layout_margin_left_right">

View File

@ -8,7 +8,6 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/item_list_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/listitem_padding">

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">

View File

@ -3,7 +3,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="@dimen/item_card_preivew_padding"
android:orientation="vertical"
style="@style/CardViewStyle">
<ImageView

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardViewStyle">
<LinearLayout
android:id="@+id/item_schedule_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/item_schedule_layout_padding">
<TextView
android:id="@+id/item_schedule_time"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/item_schedule_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/page_hashtag_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/page_hashtag_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/page_hashtag_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/page_hashtag_tabselector_height"
app:viewpager="@id/page_hashtag_pager"/>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/page_hashtag_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="SpeakableTextPresentCheck" />
</LinearLayout>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/list_view"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.UserlistsActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/list_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/listpage_toolbar_height" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/list_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/tabselector_height"
app:viewpager="@id/list_pager"/>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/list_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/listdetail_root"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.UserlistActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/listdetail_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/listdetail_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/tabselector_height"
app:viewpager="@id/listdetail_pager" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/listdetail_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/login_root"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.LoginActivity">

View File

@ -8,50 +8,7 @@
android:fitsSystemWindows="false"
tools:context=".ui.activities.MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/home_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/mainpage_toolbar_height"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/home_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/tabselector_height"
app:viewpager="@id/home_pager"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/home_toolbar"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/home_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/home_tab"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/home_post"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="@drawable/post"
android:contentDescription="@string/menu_status"
android:layout_margin="@dimen/mainpage_floating_button_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<include layout="@layout/page_tab_view" />
<com.google.android.material.navigation.NavigationView
android:id="@+id/home_navigator"

View File

@ -285,9 +285,8 @@
<org.nuclearfog.twidda.ui.views.LockableConstraintLayout
android:id="@+id/page_status_body"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="400dp">
android:layout_height="wrap_content">
<Button
android:id="@+id/page_status_reply"
@ -347,8 +346,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/page_status_favorite"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:layout="@layout/page_list" />
app:layout_constraintEnd_toEndOf="parent" />
</org.nuclearfog.twidda.ui.views.LockableConstraintLayout>

View File

@ -1,48 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/search_layout"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:id="@+id/page_tab_view_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.SearchActivity">
android:fitsSystemWindows="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/search_toolbar"
android:id="@+id/page_tab_view_toolbar"
android:layout_width="0dp"
android:layout_height="@dimen/searchpage_toolbar_height"
android:layout_height="@dimen/toolbar_height"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/search_tab"
android:id="@+id/page_tab_view_tabs"
android:layout_width="0dp"
android:layout_height="@dimen/tabselector_height"
app:viewpager="@id/search_pager"
android:layout_height="wrap_content"
app:viewpager="@id/page_tab_view_pager"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/search_toolbar"
app:layout_constraintTop_toBottomOf="@id/page_tab_view_toolbar"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/search_pager"
android:id="@+id/page_tab_view_pager"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/search_tab"
app:layout_constraintTop_toBottomOf="@id/page_tab_view_tabs"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/search_post_button"
android:id="@+id/page_tab_view_post_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/page_tab_view_floating_button_margin"
android:visibility="gone"
android:src="@drawable/post"
android:contentDescription="@string/menu_status"
android:layout_margin="@dimen/searchpage_floating_button_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/page_users_root"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.UsersActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/page_users_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<org.nuclearfog.twidda.ui.views.TabSelector
android:id="@+id/page_exclude_tab"
android:layout_width="match_parent"
android:layout_height="@dimen/tabselector_height"
app:viewpager="@id/page_users_pager" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/page_users_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="SpeakableTextPresentCheck" />
</LinearLayout>

View File

@ -4,7 +4,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true"
android:keepScreenOn="true"
tools:context=".ui.activities.VideoViewer">

View File

@ -3,7 +3,6 @@
<!--global dimens-->
<dimen name="toolbar_height">56dp</dimen>
<dimen name="toolbar_height_small">48dp</dimen>
<dimen name="tabselector_height">40dp</dimen>
<dimen name="tabs_indicator_height">2dp</dimen>
<dimen name="edittext_background_padding">5dp</dimen>
<dimen name="edittext_textsize">16sp</dimen>
@ -58,7 +57,7 @@
<dimen name="profile_textsize_big">14sp</dimen>
<dimen name="profile_textsize_small">12sp</dimen>
<dimen name="profile_icon_size">14sp</dimen>
<dimen name="profile_tabselector_height">52dp</dimen>
<dimen name="profile_tabselector_height">52sp</dimen>
<dimen name="profile_floating_button_margin">20dp</dimen>
<integer name="profile_text_bio_lines">6</integer>
@ -142,6 +141,9 @@
<!--dimens of item_dropdown-->
<dimen name="dropdown_drawable_padding">5dp</dimen>
<!--dimens of item_schedule-xml-->
<dimen name="item_schedule_layout_padding">5dp</dimen>
<!--dimens of page_login.xml-->
<dimen name="loginpage_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="loginpage_layout_margin">8dp</dimen>
@ -178,18 +180,13 @@
<dimen name="item_placeholder_margin">10dp</dimen>
<dimen name="item_placeholder_button_textsize">16sp</dimen>
<!--dimens of page_search.xml-->
<dimen name="searchpage_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="searchpage_floating_button_margin">20dp</dimen>
<!--dimens of page_tab_view-->
<dimen name="page_tab_view_floating_button_margin">20dp</dimen>
<!--dimens of page_main.xml-->
<dimen name="mainpage_toolbar_height">@dimen/toolbar_height</dimen>
<dimen name="mainpage_floating_button_margin">20dp</dimen>
<dimen name="mainpage_navigation_padding_item">20dp</dimen>
<!--dimens of page_hashtag.xml-->
<dimen name="page_hashtag_tabselector_height">52dp</dimen>
<!--dimens of page_list.xml-->
<dimen name="listpage_toolbar_height">@dimen/toolbar_height</dimen>