remove 5.1 support and some ui fixes

This commit is contained in:
M M Arif
2022-04-26 21:17:13 +05:00
parent 269f1fb32b
commit d11ca79b77
7 changed files with 23 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ android {
compileSdkVersion 31
defaultConfig {
applicationId "org.mian.gitnex"
minSdkVersion 22
minSdkVersion 23
targetSdkVersion 31
versionCode 425
versionName "4.3.0"

View File

@@ -12,10 +12,11 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.BaseActivity;
import org.mian.gitnex.activities.CreateRepoActivity;
@@ -23,6 +24,7 @@ import org.mian.gitnex.activities.MainActivity;
import org.mian.gitnex.adapters.ReposListAdapter;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
import org.mian.gitnex.helpers.Constants;
import org.mian.gitnex.helpers.DividerItemDecorator;
import org.mian.gitnex.viewmodels.RepositoriesViewModel;
/**
@@ -56,10 +58,13 @@ public class MyRepositoriesFragment extends Fragment {
fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true);
fragmentRepositoriesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentRepositoriesBinding.recyclerView.getContext(),
DividerItemDecoration.VERTICAL);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.shape_list_divider));
fragmentRepositoriesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
fragmentRepositoriesBinding.recyclerView.setPadding(0, 0, 0, 200);
fragmentRepositoriesBinding.recyclerView.setClipToPadding(false);
fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
page = 1;

View File

@@ -61,6 +61,9 @@ public class OrganizationsFragment extends Fragment {
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.shape_list_divider));
fragmentOrganizationsBinding.recyclerView.addItemDecoration(dividerItemDecoration);
fragmentOrganizationsBinding.recyclerView.setPadding(0, 0, 0, 200);
fragmentOrganizationsBinding.recyclerView.setClipToPadding(false);
fragmentOrganizationsBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
page = 1;

View File

@@ -59,6 +59,9 @@ public class RepositoriesFragment extends Fragment {
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.shape_list_divider));
fragmentRepositoriesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
fragmentRepositoriesBinding.recyclerView.setPadding(0, 0, 0, 200);
fragmentRepositoriesBinding.recyclerView.setClipToPadding(false);
fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
page = 1;

View File

@@ -12,16 +12,18 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateRepoActivity;
import org.mian.gitnex.activities.MainActivity;
import org.mian.gitnex.adapters.ReposListAdapter;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
import org.mian.gitnex.helpers.Constants;
import org.mian.gitnex.helpers.DividerItemDecorator;
import org.mian.gitnex.viewmodels.RepositoriesViewModel;
/**
@@ -53,10 +55,13 @@ public class StarredRepositoriesFragment extends Fragment {
fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true);
fragmentRepositoriesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentRepositoriesBinding.recyclerView.getContext(),
DividerItemDecoration.VERTICAL);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(requireContext(), R.drawable.shape_list_divider));
fragmentRepositoriesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
fragmentRepositoriesBinding.recyclerView.setPadding(0, 0, 0, 200);
fragmentRepositoriesBinding.recyclerView.setClipToPadding(false);
fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
page = 1;

View File

@@ -15,8 +15,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:paddingBottom="64dp"
android:clipToPadding="false"
android:scrollbars="vertical" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@@ -17,8 +17,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:paddingBottom="64dp"
android:clipToPadding="false"
android:scrollbars="vertical" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>