mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Barebone swiping left or right to go to previous or next post in ViewPostDetailActivity.
This commit is contained in:
parent
b6c00df82f
commit
968519b2eb
@ -37,7 +37,7 @@ android {
|
||||
dependencies {
|
||||
/** AndroidX **/
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.biometric:biometric:1.1.0-rc01'
|
||||
implementation 'androidx.biometric:biometric:1.2.0-alpha01'
|
||||
implementation 'androidx.browser:browser:1.3.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
@ -52,7 +52,8 @@ dependencies {
|
||||
implementation "androidx.room:room-runtime:$roomVersion"
|
||||
annotationProcessor "androidx.room:room-compiler:$roomVersion"
|
||||
implementation 'androidx.work:work-runtime:2.4.0'
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha04'
|
||||
implementation 'com.google.android.material:material:1.3.0-rc01'
|
||||
implementation "androidx.viewpager2:viewpager2:1.1.0-alpha01"
|
||||
|
||||
/** ExoPlayer **/
|
||||
def exoplayerVersion = "2.10.8"
|
||||
|
@ -64,6 +64,7 @@ import ml.docilealligator.infinityforreddit.fragments.SubscribedSubredditsListin
|
||||
import ml.docilealligator.infinityforreddit.fragments.UserListingFragment;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewImgurImageFragment;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewImgurVideoFragment;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewPostDetailFragment;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewRedditGalleryImageOrGifFragment;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewRedditGalleryVideoFragment;
|
||||
import ml.docilealligator.infinityforreddit.services.DownloadMediaService;
|
||||
@ -248,4 +249,6 @@ public interface AppComponent {
|
||||
void inject(ViewImgurImageFragment viewImgurImageFragment);
|
||||
|
||||
void inject(ViewRedditGalleryImageOrGifFragment viewRedditGalleryImageOrGifFragment);
|
||||
|
||||
void inject(ViewPostDetailFragment viewPostDetailFragment);
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ public class EditCommentActivity extends BaseActivity {
|
||||
public static final String EXTRA_FULLNAME = "EF";
|
||||
public static final String EXTRA_POSITION = "EP";
|
||||
|
||||
static final String EXTRA_EDITED_COMMENT_CONTENT = "EECC";
|
||||
static final String EXTRA_EDITED_COMMENT_POSITION = "EECP";
|
||||
public static final String EXTRA_EDITED_COMMENT_CONTENT = "EECC";
|
||||
public static final String EXTRA_EDITED_COMMENT_POSITION = "EECP";
|
||||
|
||||
@BindView(R.id.coordinator_layout_edit_comment_activity)
|
||||
CoordinatorLayout coordinatorLayout;
|
||||
|
@ -50,9 +50,9 @@ import retrofit2.Retrofit;
|
||||
|
||||
public class EditPostActivity extends BaseActivity {
|
||||
|
||||
static final String EXTRA_TITLE = "ET";
|
||||
static final String EXTRA_CONTENT = "EC";
|
||||
static final String EXTRA_FULLNAME = "EF";
|
||||
public static final String EXTRA_TITLE = "ET";
|
||||
public static final String EXTRA_CONTENT = "EC";
|
||||
public static final String EXTRA_FULLNAME = "EF";
|
||||
|
||||
@BindView(R.id.coordinator_layout_edit_post_activity)
|
||||
CoordinatorLayout coordinatorLayout;
|
||||
|
@ -968,11 +968,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
private void changeSortType() {
|
||||
int currentPostType = sectionsPagerAdapter.getCurrentPostType();
|
||||
Bundle bundle = new Bundle();
|
||||
if (currentPostType != PostDataSource.TYPE_FRONT_PAGE) {
|
||||
bundle.putBoolean(SortTypeBottomSheetFragment.EXTRA_NO_BEST_TYPE, true);
|
||||
} else {
|
||||
bundle.putBoolean(SortTypeBottomSheetFragment.EXTRA_NO_BEST_TYPE, false);
|
||||
}
|
||||
bundle.putBoolean(SortTypeBottomSheetFragment.EXTRA_NO_BEST_TYPE, currentPostType != PostDataSource.TYPE_FRONT_PAGE);
|
||||
SortTypeBottomSheetFragment sortTypeBottomSheetFragment = new SortTypeBottomSheetFragment();
|
||||
sortTypeBottomSheetFragment.setArguments(bundle);
|
||||
sortTypeBottomSheetFragment.show(getSupportFragmentManager(), sortTypeBottomSheetFragment.getTag());
|
||||
@ -980,43 +976,43 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_search_main_activity:
|
||||
Intent intent = new Intent(this, SearchActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
case R.id.action_sort_main_activity:
|
||||
changeSortType();
|
||||
return true;
|
||||
case R.id.action_refresh_main_activity:
|
||||
if (mMenu != null) {
|
||||
mMenu.findItem(R.id.action_lazy_mode_main_activity).setTitle(R.string.action_start_lazy_mode);
|
||||
}
|
||||
sectionsPagerAdapter.refresh();
|
||||
mFetchUserInfoSuccess = false;
|
||||
loadUserData();
|
||||
return true;
|
||||
case R.id.action_lazy_mode_main_activity:
|
||||
MenuItem lazyModeItem = mMenu.findItem(R.id.action_lazy_mode_main_activity);
|
||||
if (isInLazyMode) {
|
||||
sectionsPagerAdapter.stopLazyMode();
|
||||
isInLazyMode = false;
|
||||
lazyModeItem.setTitle(R.string.action_start_lazy_mode);
|
||||
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.id.action_search_main_activity) {
|
||||
Intent intent = new Intent(this, SearchActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} else if (itemId == R.id.action_sort_main_activity) {
|
||||
changeSortType();
|
||||
return true;
|
||||
} else if (itemId == R.id.action_refresh_main_activity) {
|
||||
if (mMenu != null) {
|
||||
mMenu.findItem(R.id.action_lazy_mode_main_activity).setTitle(R.string.action_start_lazy_mode);
|
||||
}
|
||||
sectionsPagerAdapter.refresh();
|
||||
mFetchUserInfoSuccess = false;
|
||||
loadUserData();
|
||||
return true;
|
||||
} else if (itemId == R.id.action_lazy_mode_main_activity) {
|
||||
MenuItem lazyModeItem = mMenu.findItem(R.id.action_lazy_mode_main_activity);
|
||||
if (isInLazyMode) {
|
||||
sectionsPagerAdapter.stopLazyMode();
|
||||
isInLazyMode = false;
|
||||
lazyModeItem.setTitle(R.string.action_start_lazy_mode);
|
||||
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
|
||||
collapsingToolbarLayout.setLayoutParams(params);
|
||||
} else {
|
||||
if (sectionsPagerAdapter.startLazyMode()) {
|
||||
isInLazyMode = true;
|
||||
lazyModeItem.setTitle(R.string.action_stop_lazy_mode);
|
||||
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL);
|
||||
collapsingToolbarLayout.setLayoutParams(params);
|
||||
} else {
|
||||
if (sectionsPagerAdapter.startLazyMode()) {
|
||||
isInLazyMode = true;
|
||||
lazyModeItem.setTitle(R.string.action_stop_lazy_mode);
|
||||
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL);
|
||||
collapsingToolbarLayout.setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case R.id.action_change_post_layout_main_activity:
|
||||
PostLayoutBottomSheetFragment postLayoutBottomSheetFragment = new PostLayoutBottomSheetFragment();
|
||||
postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag());
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
} else if (itemId == R.id.action_change_post_layout_main_activity) {
|
||||
PostLayoutBottomSheetFragment postLayoutBottomSheetFragment = new PostLayoutBottomSheetFragment();
|
||||
postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -113,6 +113,7 @@ import ml.docilealligator.infinityforreddit.comment.FetchComment;
|
||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||
import ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView;
|
||||
import ml.docilealligator.infinityforreddit.customviews.MarkwonLinearLayoutManager;
|
||||
import ml.docilealligator.infinityforreddit.fragments.ViewPostDetailFragment;
|
||||
import ml.docilealligator.infinityforreddit.post.Post;
|
||||
import ml.docilealligator.infinityforreddit.post.PostDataSource;
|
||||
import ml.docilealligator.infinityforreddit.utils.APIUtils;
|
||||
@ -143,6 +144,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
private static final int VIEW_TYPE_VIEW_ALL_COMMENTS = 17;
|
||||
|
||||
private AppCompatActivity mActivity;
|
||||
private ViewPostDetailFragment mFragment;
|
||||
private Executor mExecutor;
|
||||
private Retrofit mRetrofit;
|
||||
private Retrofit mOauthRetrofit;
|
||||
@ -238,7 +240,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
private float mScale;
|
||||
private ExoCreator mExoCreator;
|
||||
|
||||
public CommentAndPostRecyclerViewAdapter(AppCompatActivity activity, Executor executor, CustomThemeWrapper customThemeWrapper,
|
||||
public CommentAndPostRecyclerViewAdapter(AppCompatActivity activity, ViewPostDetailFragment fragment, Executor executor, CustomThemeWrapper customThemeWrapper,
|
||||
Retrofit retrofit, Retrofit oauthRetrofit, Retrofit gfycatRetrofit,
|
||||
Retrofit redgifsRetrofit,
|
||||
RedditDataRoomDatabase redditDataRoomDatabase, RequestManager glide,
|
||||
@ -249,6 +251,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
SharedPreferences nsfwAndSpoilerSharedPreferences, ExoCreator exoCreator,
|
||||
CommentRecyclerViewAdapterCallback commentRecyclerViewAdapterCallback) {
|
||||
mActivity = activity;
|
||||
mFragment = fragment;
|
||||
mExecutor = executor;
|
||||
mRetrofit = retrofit;
|
||||
mOauthRetrofit = oauthRetrofit;
|
||||
@ -3765,9 +3768,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
if (bottomConstraintLayout.getLayoutParams().height == 0) {
|
||||
bottomConstraintLayout.getLayoutParams().height = LinearLayout.LayoutParams.WRAP_CONTENT;
|
||||
topScoreTextView.setVisibility(View.GONE);
|
||||
((ViewPostDetailActivity) mActivity).delayTransition();
|
||||
mFragment.delayTransition();
|
||||
} else {
|
||||
((ViewPostDetailActivity) mActivity).delayTransition();
|
||||
mFragment.delayTransition();
|
||||
bottomConstraintLayout.getLayoutParams().height = 0;
|
||||
topScoreTextView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -3944,7 +3947,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
if (mActivity != null && mActivity instanceof ViewPostDetailActivity) {
|
||||
mIsSingleCommentThreadMode = false;
|
||||
mSingleCommentId = null;
|
||||
((ViewPostDetailActivity) mActivity).changeToNomalThreadMode();
|
||||
mFragment.changeToNomalThreadMode();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -92,6 +92,7 @@ import ml.docilealligator.infinityforreddit.bottomsheetfragments.ShareLinkBottom
|
||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||
import ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView;
|
||||
import ml.docilealligator.infinityforreddit.events.PostUpdateEventToDetailActivity;
|
||||
import ml.docilealligator.infinityforreddit.fragments.PostFragment;
|
||||
import ml.docilealligator.infinityforreddit.post.Post;
|
||||
import ml.docilealligator.infinityforreddit.post.PostDataSource;
|
||||
import ml.docilealligator.infinityforreddit.user.UserDao;
|
||||
@ -128,6 +129,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
}
|
||||
};
|
||||
private AppCompatActivity mActivity;
|
||||
private PostFragment mFragment;
|
||||
private Executor mExecutor;
|
||||
private Retrofit mOauthRetrofit;
|
||||
private Retrofit mRetrofit;
|
||||
@ -207,7 +209,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
private ExoCreator mExoCreator;
|
||||
private Callback mCallback;
|
||||
|
||||
public PostRecyclerViewAdapter(AppCompatActivity activity, Executor executor, Retrofit oauthRetrofit, Retrofit retrofit,
|
||||
public PostRecyclerViewAdapter(AppCompatActivity activity, PostFragment fragment, Executor executor, Retrofit oauthRetrofit, Retrofit retrofit,
|
||||
Retrofit gfycatRetrofit, Retrofit redgifsRetrofit,
|
||||
RedditDataRoomDatabase redditDataRoomDatabase,
|
||||
CustomThemeWrapper customThemeWrapper, Locale locale, int imageViewWidth,
|
||||
@ -218,6 +220,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
super(DIFF_CALLBACK);
|
||||
if (activity != null) {
|
||||
mActivity = activity;
|
||||
mFragment = fragment;
|
||||
mExecutor = executor;
|
||||
mOauthRetrofit = oauthRetrofit;
|
||||
mRetrofit = retrofit;
|
||||
@ -1629,7 +1632,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
canStartActivity = false;
|
||||
|
||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST, mFragment.getPostList());
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, getAdapterPosition());
|
||||
mActivity.startActivity(intent);
|
||||
}
|
||||
@ -2645,7 +2648,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
canStartActivity = false;
|
||||
|
||||
Intent intent = new Intent(mActivity, ViewPostDetailActivity.class);
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_DATA, post);
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST, mFragment.getPostList());
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_LIST_POSITION, getAdapterPosition());
|
||||
mActivity.startActivity(intent);
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime));
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SEARCH_POST, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mRedditDataRoomDatabase, mCustomThemeWrapper, locale,
|
||||
windowWidth, accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -503,7 +503,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
}
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mRedditDataRoomDatabase, mCustomThemeWrapper, locale,
|
||||
windowWidth, accessToken, accountName, postType, postLayout, displaySubredditName,
|
||||
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -567,7 +567,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
sortType = new SortType(SortType.Type.valueOf(sort));
|
||||
}
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mRedditDataRoomDatabase, mCustomThemeWrapper, locale,
|
||||
windowWidth, accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -631,7 +631,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
}
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_USER_POST_BASE + username, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mRedditDataRoomDatabase, mCustomThemeWrapper, locale,
|
||||
windowWidth, accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -686,7 +686,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
}
|
||||
postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_FRONT_PAGE_POST, defaultPostLayout);
|
||||
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mAdapter = new PostRecyclerViewAdapter(activity, this, mExecutor, mOauthRetrofit, mRetrofit, mGfycatRetrofit,
|
||||
mRedgifsRetrofit, mRedditDataRoomDatabase, mCustomThemeWrapper, locale,
|
||||
windowWidth, accessToken, accountName, postType, postLayout, true,
|
||||
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
|
||||
@ -1061,6 +1061,10 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<Post> getPostList() {
|
||||
return new ArrayList<>(mPostViewModel.getPosts().getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,44 +32,11 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout_view_post_detail_activity"
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager_2_view_post_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ml.docilealligator.infinityforreddit.customviews.CustomToroContainer
|
||||
android:id="@+id/recycler_view_view_post_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="144dp"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fetch_post_info_linear_layout_view_post_detail_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fetch_post_info_image_view_view_post_detail_activity"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fetch_post_info_text_view_view_post_detail_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
|
||||
</LinearLayout>
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab_view_post_detail_activity"
|
||||
|
48
app/src/main/res/layout/fragment_view_post_detail.xml
Normal file
48
app/src/main/res/layout/fragment_view_post_detail.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".fragments.ViewPostDetailFragment">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout_view_post_detail_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ml.docilealligator.infinityforreddit.customviews.CustomToroContainer
|
||||
android:id="@+id/recycler_view_view_post_detail_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="144dp"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fetch_post_info_linear_layout_view_post_detail_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fetch_post_info_image_view_view_post_detail_fragment"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fetch_post_info_text_view_view_post_detail_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@ -2,7 +2,7 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_comment_view_post_detail_activity"
|
||||
android:id="@+id/action_comment_view_post_detail_fragment"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_add_comment"
|
||||
android:icon="@drawable/ic_comment_toolbar_24dp"
|
||||
@ -10,92 +10,92 @@
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_save_view_post_detail_activity"
|
||||
android:id="@+id/action_save_view_post_detail_fragment"
|
||||
android:orderInCategory="2"
|
||||
android:title="@string/action_save_post"
|
||||
app:showAsAction="ifRoom"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_sort_view_post_detail_activity"
|
||||
android:id="@+id/action_sort_view_post_detail_fragment"
|
||||
android:orderInCategory="3"
|
||||
android:title="@string/action_sort"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_refresh_view_post_detail_activity"
|
||||
android:id="@+id/action_refresh_view_post_detail_fragment"
|
||||
android:orderInCategory="4"
|
||||
android:title="@string/action_refresh"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_view_crosspost_parent_view_post_detail_activity"
|
||||
android:id="@+id/action_view_crosspost_parent_view_post_detail_fragment"
|
||||
android:orderInCategory="5"
|
||||
android:title="@string/action_view_crosspost_parent"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_hide_view_post_detail_activity"
|
||||
android:id="@+id/action_hide_view_post_detail_fragment"
|
||||
android:orderInCategory="6"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_view_post_detail_activity"
|
||||
android:id="@+id/action_edit_view_post_detail_fragment"
|
||||
android:orderInCategory="7"
|
||||
android:title="@string/action_edit_post"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete_view_post_detail_activity"
|
||||
android:id="@+id/action_delete_view_post_detail_fragment"
|
||||
android:orderInCategory="8"
|
||||
android:title="@string/action_delete_post"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_nsfw_view_post_detail_activity"
|
||||
android:id="@+id/action_nsfw_view_post_detail_fragment"
|
||||
android:orderInCategory="9"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_spoiler_view_post_detail_activity"
|
||||
android:id="@+id/action_spoiler_view_post_detail_fragment"
|
||||
android:orderInCategory="10"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_flair_view_post_detail_activity"
|
||||
android:id="@+id/action_edit_flair_view_post_detail_fragment"
|
||||
android:orderInCategory="11"
|
||||
android:title="@string/action_edit_flair"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_give_award_view_post_detail_activity"
|
||||
android:id="@+id/action_give_award_view_post_detail_fragment"
|
||||
android:orderInCategory="12"
|
||||
android:title="@string/action_give_award"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_report_view_post_detail_activity"
|
||||
android:id="@+id/action_report_view_post_detail_fragment"
|
||||
android:orderInCategory="13"
|
||||
android:title="@string/action_report"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_see_removed_view_post_detail_activity"
|
||||
android:id="@+id/action_see_removed_view_post_detail_fragment"
|
||||
android:orderInCategory="14"
|
||||
android:title="@string/action_see_removed"
|
||||
app:showAsAction="never"
|
||||
android:visible="false" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_crosspost_view_post_detail_activity"
|
||||
android:id="@+id/action_crosspost_view_post_detail_fragment"
|
||||
android:orderInCategory="15"
|
||||
android:title="@string/action_crosspost"
|
||||
app:showAsAction="never" />
|
@ -1016,7 +1016,5 @@
|
||||
<string name="add_subreddit_or_user_to_multireddit_failed">Unable to add %1$s to multireddit %2$s</string>
|
||||
|
||||
<string name="choose_a_user">Choose a user</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user