android WebView swipe refresh

build.gradle

dependencies {
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}

activity_main.xml

<RelativeLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">
    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/swipe"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <WebView
            android:id="@+id/webView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"/>
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</RelativeLayout>

MainActivity.java

public class MainActivity extends AppCompatActivity {
    private WebView webView;
    private SwipeRefreshLayout swipeRefreshLayout;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        webView = findViewById(R.id.webView);
        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                swipeRefreshLayout.setRefreshing(true);
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        swipeRefreshLayout.setRefreshing(false);
                        webView.reload();
                    }
                },3000);
            }
        });
        swipeRefreshLayout.setColorSchemeColors(
                getResources().getColor(R.color.orange)
        );
    }
}

CentOS — установка сертификатов НУЦ Минцифры

В примере нужен для работы эквайринга от СберБанка.
Проверить работу:

curl -I https://securepayments.sberbank.ru/

Загрузить сертификаты

wget --no-check-certificate https://securepayments.sberbank.ru/wiki/lib/exe/fetch.php/certificates:add:cert.rar

Распаковать

yum install unar
unar certificates:add:cert.rar

или

yum install unrar
unrar x certificates:add:cert.rar

Установка

update-ca-trust enable
cp Cert_CA.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust extract