Merge branch 'androidx' of https://github.com/owncloud/News-Android-App into androidx
This commit is contained in:
commit
aef30d46a4
4 changed files with 7 additions and 5 deletions
|
@ -26,7 +26,6 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.appcompat.widget.ViewUtils;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -45,6 +44,7 @@ import android.widget.TextView;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.core.view.ViewCompat;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import de.luhmer.owncloudnewsreader.R;
|
||||
|
@ -333,7 +333,7 @@ public class SubscriptionExpandableListAdapter extends BaseExpandableListAdapter
|
|||
rotation = 180;
|
||||
contentDescriptionId = R.string.content_desc_collapse;
|
||||
} else {
|
||||
if (ViewUtils.isLayoutRtl(listView)) {
|
||||
if (ViewCompat.getLayoutDirection(listView) == ViewCompat.LAYOUT_DIRECTION_RTL) {
|
||||
rotation = -90; // mirror for rtl layout
|
||||
} else {
|
||||
rotation = 90;
|
||||
|
|
|
@ -289,7 +289,7 @@ public class NewsReaderDetailFragment extends Fragment {
|
|||
ButterKnife.bind(this, rootView);
|
||||
|
||||
recyclerView.setHasFixedSize(true);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), RecyclerView.VERTICAL, false));
|
||||
recyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new NewsReaderItemTouchHelperCallback());
|
||||
|
|
|
@ -41,7 +41,7 @@ public class DividerItemDecoration extends RecyclerView.ItemDecoration {
|
|||
return;
|
||||
|
||||
if (!(parent.getLayoutManager() instanceof LinearLayoutManager) ||
|
||||
((LinearLayoutManager)parent.getLayoutManager()).getOrientation() != LinearLayoutManager.VERTICAL) {
|
||||
((LinearLayoutManager)parent.getLayoutManager()).getOrientation() != RecyclerView.VERTICAL) {
|
||||
throw new IllegalStateException(
|
||||
"DividerItemDecoration can only be used with a vertical LinearLayoutManager.");
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ import android.util.AttributeSet;
|
|||
import android.util.TypedValue;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
/**
|
||||
* Text view that auto adjusts text size to fit within the view.
|
||||
* If the text size equals the minimum text size and still does not
|
||||
|
@ -32,7 +34,7 @@ import android.widget.TextView;
|
|||
* @author Chase Colburn
|
||||
* @since Apr 4, 2011
|
||||
*/
|
||||
public class AutoResizeTextView extends TextView {
|
||||
public class AutoResizeTextView extends AppCompatTextView {
|
||||
|
||||
// Minimum text size for this text view
|
||||
public static final float MIN_TEXT_SIZE = 20;
|
||||
|
|
Loading…
Reference in a new issue