Use rounded corner bottom fragment. Tweak bottom sheet fragment UI. Change post type bottom sheet dialog to fragment. Exit SearchActivity no matter searchview is open or not.

This commit is contained in:
Alex Ning 2019-07-26 23:31:48 +08:00
parent 1fc8423906
commit 40fc423b33
13 changed files with 207 additions and 235 deletions

Binary file not shown.

Binary file not shown.

View File

@ -75,4 +75,5 @@ dependencies {
implementation 'com.github.Ferfalk:SimpleSearchView:0.1.3'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.libRG:customtextview:2.2'
implementation 'com.github.Deishelon:RoundedBottomSheet:1.0.1'
}

View File

@ -25,7 +25,6 @@ import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import javax.inject.Inject;
@ -37,7 +36,8 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import pl.droidsonroids.gif.GifImageView;
import retrofit2.Retrofit;
public class MainActivity extends AppCompatActivity implements SortTypeBottomSheetFragment.SortTypeSelectionCallback {
public class MainActivity extends AppCompatActivity implements SortTypeBottomSheetFragment.SortTypeSelectionCallback,
PostTypeBottomSheetFragment.PostTypeSelectionCallback {
private static final String FRAGMENT_OUT_STATE = "FOS";
private static final String FETCH_USER_INFO_STATE = "FUIS";
@ -60,7 +60,7 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
private Fragment mFragment;
private RequestManager glide;
private AppBarLayout.LayoutParams params;
private BottomSheetDialog postTypedialog;
private PostTypeBottomSheetFragment postTypeBottomSheetFragment;
private SortTypeBottomSheetFragment sortTypeBottomSheetFragment;
private String mName;
@ -94,15 +94,7 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
((Infinity) getApplication()).getmAppComponent().inject(this);
View postTypeDialogView = View.inflate(this, R.layout.post_type_bottom_sheet, null);
LinearLayout textTypeLinearLayout = postTypeDialogView.findViewById(R.id.text_type_linear_layout_post_type_bottom_sheet);
LinearLayout linkTypeLinearLayout = postTypeDialogView.findViewById(R.id.link_type_linear_layout_post_type_bottom_sheet);
LinearLayout imageTypeLinearLayout = postTypeDialogView.findViewById(R.id.image_type_linear_layout_post_type_bottom_sheet);
LinearLayout videoTypeLinearLayout = postTypeDialogView.findViewById(R.id.video_type_linear_layout_post_type_bottom_sheet);
postTypedialog = new BottomSheetDialog(this);
postTypedialog.setContentView(postTypeDialogView);
postTypeBottomSheetFragment = new PostTypeBottomSheetFragment();
sortTypeBottomSheetFragment = new SortTypeBottomSheetFragment();
Toolbar toolbar = findViewById(R.id.toolbar);
@ -181,31 +173,7 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
});
}
textTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, PostTextActivity.class);
startActivity(intent);
postTypedialog.dismiss();
});
linkTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, PostLinkActivity.class);
startActivity(intent);
postTypedialog.dismiss();
});
imageTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, PostImageActivity.class);
startActivity(intent);
postTypedialog.dismiss();
});
videoTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, PostVideoActivity.class);
startActivity(intent);
postTypedialog.dismiss();
});
fab.setOnClickListener(view -> postTypedialog.show());
fab.setOnClickListener(view -> postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag()));
}
private void replaceFragment(String sortType) {
@ -303,7 +271,7 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (mFragment instanceof FragmentCommunicator) {
switch (item.getItemId()) {
case R.id.action_sort_main_activity:
@ -364,4 +332,26 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
public void sortTypeSelected(String sortType) {
replaceFragment(sortType);
}
@Override
public void postTypeSelected(int postType) {
Intent intent;
switch (postType) {
case PostTypeBottomSheetFragment.TYPE_TEXT:
intent = new Intent(MainActivity.this, PostTextActivity.class);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_LINK:
intent = new Intent(MainActivity.this, PostLinkActivity.class);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_IMAGE:
intent = new Intent(MainActivity.this, PostImageActivity.class);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_VIDEO:
intent = new Intent(MainActivity.this, PostVideoActivity.class);
startActivity(intent);
}
}
}

View File

@ -0,0 +1,74 @@
package ml.docilealligator.infinityforreddit;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.fragment.app.Fragment;
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* A simple {@link Fragment} subclass.
*/
public class PostTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
interface PostTypeSelectionCallback {
void postTypeSelected(int postType);
}
static final int TYPE_TEXT = 0;
static final int TYPE_LINK = 1;
static final int TYPE_IMAGE = 2;
static final int TYPE_VIDEO = 3;
@BindView(R.id.text_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout textTypeLinearLayout;
@BindView(R.id.link_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout linkTypeLinearLayout;
@BindView(R.id.image_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout imageTypeLinearLayout;
@BindView(R.id.video_type_linear_layout_post_type_bottom_sheet_fragment) LinearLayout videoTypeLinearLayout;
public PostTypeBottomSheetFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_post_type_bottom_sheet, container, false);
ButterKnife.bind(this, rootView);
Activity activity = getActivity();
textTypeLinearLayout.setOnClickListener(view -> {
((PostTypeSelectionCallback) activity).postTypeSelected(TYPE_TEXT);
dismiss();
});
linkTypeLinearLayout.setOnClickListener(view -> {
((PostTypeSelectionCallback) activity).postTypeSelected(TYPE_LINK);
dismiss();
});
imageTypeLinearLayout.setOnClickListener(view -> {
((PostTypeSelectionCallback) activity).postTypeSelected(TYPE_IMAGE);
dismiss();
});
videoTypeLinearLayout.setOnClickListener(view -> {
((PostTypeSelectionCallback) activity).postTypeSelected(TYPE_VIDEO);
dismiss();
});
return rootView;
}
}

View File

@ -146,14 +146,6 @@ public class SearchActivity extends AppCompatActivity {
return false;
}
@Override
public void onBackPressed() {
if (simpleSearchView.onBackPressed()) {
return;
}
super.onBackPressed();
}
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);

View File

@ -11,7 +11,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
@ -20,7 +20,7 @@ import butterknife.ButterKnife;
/**
* A simple {@link Fragment} subclass.
*/
public class SortTypeBottomSheetFragment extends BottomSheetDialogFragment {
public class SortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
interface SortTypeSelectionCallback {
void sortTypeSelected(String sortType);

View File

@ -8,7 +8,6 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -23,7 +22,6 @@ import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.chip.Chip;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
@ -43,7 +41,8 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import pl.droidsonroids.gif.GifImageView;
import retrofit2.Retrofit;
public class ViewSubredditDetailActivity extends AppCompatActivity implements SortTypeBottomSheetFragment.SortTypeSelectionCallback {
public class ViewSubredditDetailActivity extends AppCompatActivity implements SortTypeBottomSheetFragment.SortTypeSelectionCallback,
PostTypeBottomSheetFragment.PostTypeSelectionCallback {
public static final String EXTRA_SUBREDDIT_NAME_KEY = "ESN";
@ -71,7 +70,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So
private Fragment mFragment;
private Menu mMenu;
private AppBarLayout.LayoutParams params;
private BottomSheetDialog dialog;
private PostTypeBottomSheetFragment postTypeBottomSheetFragment;
private SortTypeBottomSheetFragment sortTypeBottomSheetFragment;
private SubscribedSubredditDao subscribedSubredditDao;
@ -98,15 +97,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So
((Infinity) getApplication()).getmAppComponent().inject(this);
View dialogView = View.inflate(this, R.layout.post_type_bottom_sheet, null);
LinearLayout textTypeLinearLayout = dialogView.findViewById(R.id.text_type_linear_layout_post_type_bottom_sheet);
LinearLayout linkTypeLinearLayout = dialogView.findViewById(R.id.link_type_linear_layout_post_type_bottom_sheet);
LinearLayout imageTypeLinearLayout = dialogView.findViewById(R.id.image_type_linear_layout_post_type_bottom_sheet);
LinearLayout videoTypeLinearLayout = dialogView.findViewById(R.id.video_type_linear_layout_post_type_bottom_sheet);
dialog = new BottomSheetDialog(this);
dialog.setContentView(dialogView);
postTypeBottomSheetFragment = new PostTypeBottomSheetFragment();
sortTypeBottomSheetFragment = new SortTypeBottomSheetFragment();
params = (AppBarLayout.LayoutParams) collapsingToolbarLayout.getLayoutParams();
@ -277,37 +268,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_view_subreddit_detail_activity, mFragment).commit();
}
textTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(this, PostTextActivity.class);
intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
dialog.dismiss();
});
linkTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(this, PostLinkActivity.class);
intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
dialog.dismiss();
});
imageTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(this, PostImageActivity.class);
intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
dialog.dismiss();
});
videoTypeLinearLayout.setOnClickListener(view -> {
Intent intent = new Intent(this, PostVideoActivity.class);
intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
dialog.dismiss();
});
fab.setOnClickListener(view -> {
dialog.show();
});
fab.setOnClickListener(view -> postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag()));
}
@Override
@ -395,6 +356,32 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So
replaceFragment(sortType);
}
@Override
public void postTypeSelected(int postType) {
Intent intent;
switch (postType) {
case PostTypeBottomSheetFragment.TYPE_TEXT:
intent = new Intent(this, PostTextActivity.class);
intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_LINK:
intent = new Intent(this, PostLinkActivity.class);
intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_IMAGE:
intent = new Intent(this, PostImageActivity.class);
intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
break;
case PostTypeBottomSheetFragment.TYPE_VIDEO:
intent = new Intent(this, PostVideoActivity.class);
intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName);
startActivity(intent);
}
}
private static class InsertSubredditDataAsyncTask extends AsyncTask<Void, Void, Void> {
private SubredditDao mSubredditDao;

View File

@ -1,20 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:paddingBottom="8dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingTop="24dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/bottom_sheet_post_type"
android:textSize="18sp" />
<LinearLayout
android:id="@+id/text_type_linear_layout_post_type_bottom_sheet"
android:id="@+id/text_type_linear_layout_post_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" >
@ -31,17 +38,18 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/bottom_sheet_post_text"
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
android:text="@string/bottom_sheet_post_text" />
</LinearLayout>
<LinearLayout
android:id="@+id/link_type_linear_layout_post_type_bottom_sheet"
android:id="@+id/link_type_linear_layout_post_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" >
@ -58,17 +66,18 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/bottom_sheet_post_link"
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
android:text="@string/bottom_sheet_post_link" />
</LinearLayout>
<LinearLayout
android:id="@+id/image_type_linear_layout_post_type_bottom_sheet"
android:id="@+id/image_type_linear_layout_post_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" >
@ -85,18 +94,19 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/bottom_sheet_post_image"
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
android:text="@string/bottom_sheet_post_image" />
</LinearLayout>
<LinearLayout
android:id="@+id/video_type_linear_layout_post_type_bottom_sheet"
android:id="@+id/video_type_linear_layout_post_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" >
@ -113,9 +123,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/bottom_sheet_post_video"
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
android:text="@string/bottom_sheet_post_video" />
</LinearLayout>

View File

@ -1,13 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:paddingBottom="8dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:paddingTop="24dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:text="@string/sort"
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
<TextView
@ -15,9 +20,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_best"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -27,9 +33,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_hot"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -39,9 +46,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_new"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -51,9 +59,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_random"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -63,9 +72,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_rising"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -75,9 +85,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_top"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
@ -86,10 +97,11 @@
android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_rising"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:text="@string/sort_controversial"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:text="@string/sort"
android:textSize="18sp" />
<TextView
android:id="@+id/best_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_best"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/hot_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_hot"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/new_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_new"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/random_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_random"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/rising_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_rising"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/top_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_top"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sort_rising"
android:textColor="@color/primaryTextColor"
android:textSize="18sp"
android:padding="16dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
</LinearLayout>

View File

@ -23,4 +23,6 @@
<color name="backgroundColor">#FFFFFF</color>
<color name="backgroundColorPrimaryDark">@color/colorPrimaryDark</color>
<color name="roundedBottomSheetPrimaryNavigationBarColor">#000000</color>
</resources>

View File

@ -7,4 +7,7 @@
<dimen name="fab_margin">16dp</dimen>
<dimen name="app_bar_height">180dp</dimen>
<dimen name="text_margin">16dp</dimen>
<dimen name="roundedBottomSheetCornerRadiusTopPadding">0dp</dimen>
<dimen name="roundedBottomSheetCornerRadiusLeftPadding">0dp</dimen>
<dimen name="roundedBottomSheetCornerRadiusRightPadding">0dp</dimen>
</resources>