Merge branch 'master' of https://github.com/osmandapp/Osmand into slope_hillshade_ui

This commit is contained in:
veliymolfar 2020-03-05 12:05:37 +02:00
commit 82264be1d7
853 changed files with 4173 additions and 3839 deletions

View file

@ -5,8 +5,8 @@ group = 'com.github.osmandapp.osmand'
version = '2.0.0' version = '2.0.0'
android { android {
compileSdkVersion 27 compileSdkVersion 28
buildToolsVersion "27.0.3" buildToolsVersion "28.0.3"
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
@ -28,7 +28,7 @@ android {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-annotations:27.1.1' implementation 'com.android.support:support-annotations:28.0.0'
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {

View file

@ -2,7 +2,8 @@ package net.osmand.aidlapi.copyfile;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,7 +2,8 @@ package net.osmand.aidlapi.customization;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.customization;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,7 +2,8 @@ package net.osmand.aidlapi.customization;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -3,7 +3,8 @@ package net.osmand.aidlapi.gpx;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.gpx;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.gpx;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,8 +2,9 @@ package net.osmand.aidlapi.navdrawer;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,7 +2,8 @@ package net.osmand.aidlapi.navdrawer;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -2,7 +2,8 @@ package net.osmand.aidlapi.tiles;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams; import net.osmand.aidlapi.AidlParams;

View file

@ -39,7 +39,7 @@ public class OsmMapUtils {
return getWeightCenterForWay(((Way) e)); return getWeightCenterForWay(((Way) e));
} else if (e instanceof Relation) { } else if (e instanceof Relation) {
List<LatLon> list = new ArrayList<LatLon>(); List<LatLon> list = new ArrayList<LatLon>();
if (e.getTag("type").equals("multipolygon")) { if (e.getTag("type") != null && e.getTag("type").equals("multipolygon")) {
MultipolygonBuilder original = new MultipolygonBuilder(); MultipolygonBuilder original = new MultipolygonBuilder();
original.setId(e.getId()); original.setId(e.getId());

View file

@ -66,7 +66,7 @@
</receiver> </receiver>
<provider <provider
android:name="android.support.v4.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="net.osmand.telegram.fileprovider" android:authorities="net.osmand.telegram.fileprovider"
android:grantUriPermissions="true" android:grantUriPermissions="true"
android:exported="false"> android:exported="false">

View file

@ -142,12 +142,12 @@ dependencies {
implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") { implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") {
exclude group: 'org.jetbrains', module: 'annotations' exclude group: 'org.jetbrains', module: 'annotations'
} }
implementation 'com.android.support:appcompat-v7:28.0.0-rc01' implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.android.support:design:28.0.0-rc01' implementation 'com.google.android.material:material:1.0.0'
implementation 'com.android.support:customtabs:28.0.0-rc01' implementation 'androidx.browser:browser:1.0.0'
implementation 'com.android.support:support-annotations:28.0.0-rc01' implementation 'androidx.annotation:annotation:1.0.0'
implementation 'commons-logging:commons-logging-api:1.1' implementation 'commons-logging:commons-logging-api:1.1'
implementation 'com.android.support:recyclerview-v7:28.0.0-rc01' implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.vividsolutions:jts-core:1.14.0' implementation 'com.vividsolutions:jts-core:1.14.0'
implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") { implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") {
exclude group: 'com.android.support' exclude group: 'com.android.support'

View file

@ -8,7 +8,7 @@
android:orientation="vertical" android:orientation="vertical"
tools:context=".ui.MainActivity"> tools:context=".ui.MainActivity">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:id="@+id/coordinator" android:id="@+id/coordinator"
android:layout_height="0dp" android:layout_height="0dp"
@ -19,21 +19,21 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="?attr/bottom_nav_shadow"/> android:src="?attr/bottom_nav_shadow"/>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<include <include
layout="@layout/bottom_buttons_bar" layout="@layout/bottom_buttons_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/buttons_bottom_bar_height" /> android:layout_height="@dimen/buttons_bottom_bar_height" />
<android.support.design.widget.BottomNavigationView <com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation" android:id="@+id/bottom_navigation"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -7,12 +7,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -81,9 +81,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,12 +7,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -52,9 +52,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,12 +8,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -58,9 +58,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -16,4 +16,4 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"/> android:layout_gravity="center_horizontal|bottom"/>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -8,12 +8,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -73,9 +73,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,12 +8,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -52,9 +52,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,12 +8,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -53,9 +53,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,12 +7,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -180,9 +180,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,13 +7,13 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/list_view_bottom_padding"> android:layout_marginBottom="@dimen/list_view_bottom_padding">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -46,9 +46,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,12 +7,12 @@
android:orientation="vertical" android:orientation="vertical"
tools:layout_gravity="bottom"> tools:layout_gravity="bottom">
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/scroll_view_container" android:id="@+id/scroll_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<android.support.v4.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -45,9 +45,9 @@
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -8,13 +8,13 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/card_bg_color"> android:background="?attr/card_bg_color">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_height"> android:layout_height="@dimen/action_bar_height">
@ -30,9 +30,9 @@
android:textSize="@dimen/title_text_size" android:textSize="@dimen/title_text_size"
app:typeface="@string/font_roboto_mono_bold"/> app:typeface="@string/font_roboto_mono_bold"/>
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -7,7 +7,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -111,7 +111,7 @@
</LinearLayout> </LinearLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -129,12 +129,12 @@
android:visibility="gone" android:visibility="gone"
app:typeface="@string/font_roboto_regular" /> app:typeface="@string/font_roboto_regular" />
<android.support.v4.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh" android:id="@+id/swipe_refresh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -142,7 +142,7 @@
android:paddingBottom="@dimen/list_item_content_margin" android:paddingBottom="@dimen/list_item_content_margin"
android:scrollbars="vertical" /> android:scrollbars="vertical" />
</android.support.v4.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<net.osmand.telegram.ui.views.TextViewEx <net.osmand.telegram.ui.views.TextViewEx
android:id="@+id/open_osmand_btn" android:id="@+id/open_osmand_btn"

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -321,14 +321,14 @@
</FrameLayout> </FrameLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -355,4 +355,4 @@
</FrameLayout> </FrameLayout>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -12,13 +12,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/card_bg_color"> android:background="?attr/card_bg_color">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_height"> android:layout_height="@dimen/action_bar_height">
@ -34,7 +34,7 @@
android:textSize="@dimen/title_text_size" android:textSize="@dimen/title_text_size"
app:typeface="@string/font_roboto_mono_bold" /> app:typeface="@string/font_roboto_mono_bold" />
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
<View <View
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -77,7 +77,7 @@
</LinearLayout> </LinearLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -324,7 +324,7 @@
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scaleType="fitXY" android:scaleType="fitXY"

View file

@ -5,13 +5,13 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/card_bg_color"> android:background="?attr/card_bg_color">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_height"> android:layout_height="@dimen/action_bar_height">
@ -49,9 +49,9 @@
</LinearLayout> </LinearLayout>
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -74,7 +74,7 @@
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scaleType="fitXY" android:scaleType="fitXY"

View file

@ -9,7 +9,7 @@
android:background="?attr/card_bg_color" android:background="?attr/card_bg_color"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/card_bg_color"> android:background="?attr/card_bg_color">
@ -81,14 +81,14 @@
</LinearLayout> </LinearLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"> android:layout_weight="1">
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

View file

@ -6,7 +6,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout" android:id="@+id/app_bar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -133,9 +133,9 @@
</FrameLayout> </FrameLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh" android:id="@+id/swipe_refresh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -158,6 +158,6 @@
</FrameLayout> </FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </LinearLayout>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -511,4 +511,4 @@
</ScrollView> </ScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -96,7 +96,7 @@
android:minHeight="@dimen/action_bar_height" android:minHeight="@dimen/action_bar_height"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/back_button" android:id="@+id/back_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -71,7 +71,7 @@
<string name="min_logging_speed">الحد الأدنى لسرعة التسجيل</string> <string name="min_logging_speed">الحد الأدنى لسرعة التسجيل</string>
<string name="min_logging_speed_descr">عامل التصفية: لا تسجيل أقل من السرعة المحددة</string> <string name="min_logging_speed_descr">عامل التصفية: لا تسجيل أقل من السرعة المحددة</string>
<string name="gpx_settings">إعدادات GPX</string> <string name="gpx_settings">إعدادات GPX</string>
<string name="timeline_no_data_descr">ليس لدينا بيانات تم جمعها لليوم المحدد</string> <string name="timeline_no_data_descr">تهانينا، صندوق الوارد فارغ</string>
<string name="timeline_no_data">لا توجد بيانات</string> <string name="timeline_no_data">لا توجد بيانات</string>
<string name="shared_string_end">نهاية</string> <string name="shared_string_end">نهاية</string>
<string name="shared_string_start">بدء</string> <string name="shared_string_start">بدء</string>
@ -90,11 +90,11 @@
<string name="shared_string_suggested">اقترح</string> <string name="shared_string_suggested">اقترح</string>
<string name="status_widget_title">تتبع حالة أوسماند</string> <string name="status_widget_title">تتبع حالة أوسماند</string>
<string name="back_to_osmand">العودة إلى OsmAnd</string> <string name="back_to_osmand">العودة إلى OsmAnd</string>
<string name="last_update_from_telegram_date">آخر تحديث من تيليجرام: %1$s</string> <string name="last_update_from_telegram_date">الرسائل الجديدة تظهر هنا</string>
<string name="last_response_date">الرد الأخير:٪ 1 $ s</string> <string name="last_response_date">الرد الأخير:٪ 1 $ s</string>
<string name="last_update_from_telegram_duration">آخر تحديث من تيليجرام: %1$s قبل</string> <string name="last_update_from_telegram_duration">آخر تحديث من تيليجرام: %1$s قبل</string>
<string name="last_response_duration">الرد الأخير: قبل٪ 1 $ s</string> <string name="last_response_duration">الرد الأخير: قبل٪ 1 $ s</string>
<string name="shared_string_error_short">خطا</string> <string name="shared_string_error_short">تهانينا، صندوق الوارد فارغ</string>
<string name="device_added_successfully">%1$s المضاف.</string> <string name="device_added_successfully">%1$s المضاف.</string>
<string name="shared_string_add">إضافة</string> <string name="shared_string_add">إضافة</string>
<string name="error_adding_new_device">تعذر إضافة جهاز جديد</string> <string name="error_adding_new_device">تعذر إضافة جهاز جديد</string>

View file

@ -221,4 +221,18 @@
<string name="shared_string_start">Principiu</string> <string name="shared_string_start">Principiu</string>
<string name="set_time_timeline_descr">Seleiciona la hora de visualización</string> <string name="set_time_timeline_descr">Seleiciona la hora de visualización</string>
<string name="start_end_date">Data d\'Aniciu — Fin</string> <string name="start_end_date">Data d\'Aniciu — Fin</string>
<string name="time_zone_descr">Seleiciona\'l fusu horariu a amosar nos tos mensaxes d\'allugamientu.</string>
<string name="time_zone">Fusu horariu</string>
<string name="units_and_formats">Unidaes y formatos</string>
<string name="buffer_time_descr">Tiempu máximu pa caltener puntos na memoria intermedia</string>
<string name="buffer_time">Tiempu de caducidá de la memoria intermedia</string>
<string name="shared_string_suggested">Suxerencia</string>
<string name="status_widget_title">Estau de OsmAnd Tracker</string>
<string name="back_to_osmand">Volver a OsmAnd</string>
<string name="last_update_from_telegram_date">Caberu anovamientu dende Telegram: %1$s</string>
<string name="last_response_date">Cabera respuesta: %1$s</string>
<string name="last_update_from_telegram_duration">Caberu anovamientu dende Telegram: va %1$s</string>
<string name="last_response_duration">Cabera respuesta: va %1$s</string>
<string name="duration_ago">va %1$s</string>
<string name="shared_string_error_short">ERR</string>
</resources> </resources>

View file

@ -208,4 +208,5 @@
<string name="location_recording_enabled">Beleženje trenutnega mesta je omogočeno</string> <string name="location_recording_enabled">Beleženje trenutnega mesta je omogočeno</string>
<string name="units_and_formats">Enote in zapisi</string> <string name="units_and_formats">Enote in zapisi</string>
<string name="unit_of_length_descr">Izbor enote za prikaz razdalje.</string> <string name="unit_of_length_descr">Izbor enote za prikaz razdalje.</string>
<string name="unit_of_length">Enote dolžine</string>
</resources> </resources>

View file

@ -2,7 +2,8 @@ package net.osmand.aidl.copyfile;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class CopyFileParams implements Parcelable { public class CopyFileParams implements Parcelable {
private String fileName; private String fileName;

View file

@ -3,7 +3,8 @@ package net.osmand.aidl.customization;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class OsmandSettingsInfoParams implements Parcelable { public class OsmandSettingsInfoParams implements Parcelable {

View file

@ -4,8 +4,9 @@ import android.annotation.SuppressLint;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class OsmandSettingsParams implements Parcelable { public class OsmandSettingsParams implements Parcelable {

View file

@ -2,7 +2,8 @@ package net.osmand.aidl.customization;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -3,7 +3,8 @@ package net.osmand.aidl.gpx;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class AGpxBitmap implements Parcelable { public class AGpxBitmap implements Parcelable {

View file

@ -2,8 +2,9 @@ package net.osmand.aidl.gpx;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class AGpxFile implements Parcelable { public class AGpxFile implements Parcelable {

View file

@ -2,8 +2,9 @@ package net.osmand.aidl.gpx;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class ASelectedGpxFile implements Parcelable { public class ASelectedGpxFile implements Parcelable {

View file

@ -2,7 +2,8 @@ package net.osmand.aidl.gpx;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class GpxColorParams implements Parcelable { public class GpxColorParams implements Parcelable {

View file

@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class NavDrawerFooterParams implements Parcelable { public class NavDrawerFooterParams implements Parcelable {

View file

@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class NavDrawerHeaderParams implements Parcelable { public class NavDrawerHeaderParams implements Parcelable {

View file

@ -2,8 +2,9 @@ package net.osmand.aidl.navdrawer;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class NavDrawerItem implements Parcelable { public class NavDrawerItem implements Parcelable {

View file

@ -2,7 +2,8 @@ package net.osmand.aidl.navdrawer;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -2,7 +2,8 @@ package net.osmand.aidl.tiles;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
public class ASqliteDbFile implements Parcelable { public class ASqliteDbFile implements Parcelable {

View file

@ -2,11 +2,11 @@ package net.osmand.telegram
import android.content.Context import android.content.Context
import android.location.LocationManager import android.location.LocationManager
import android.support.annotation.ColorRes
import android.support.annotation.DrawableRes
import android.support.annotation.StringRes
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import android.text.style.ForegroundColorSpan import android.text.style.ForegroundColorSpan
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.telegram.helpers.OsmandAidlHelper import net.osmand.telegram.helpers.OsmandAidlHelper
import net.osmand.telegram.helpers.ShareLocationHelper.Companion.MAX_MESSAGES_IN_TDLIB_PER_CHAT import net.osmand.telegram.helpers.ShareLocationHelper.Companion.MAX_MESSAGES_IN_TDLIB_PER_CHAT

View file

@ -5,8 +5,8 @@ import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.IntentFilter import android.content.IntentFilter
import android.support.v4.app.NotificationCompat import androidx.core.app.NotificationCompat
import android.support.v4.content.ContextCompat import androidx.core.content.ContextCompat
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.utils.OsmandFormatter import net.osmand.telegram.utils.OsmandFormatter

View file

@ -3,8 +3,8 @@ package net.osmand.telegram.notifications
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.PendingIntent import android.app.PendingIntent
import android.content.Intent import android.content.Intent
import android.support.v4.app.NotificationCompat import androidx.core.app.NotificationCompat
import android.support.v4.app.NotificationManagerCompat import androidx.core.app.NotificationManagerCompat
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.ui.MainActivity import net.osmand.telegram.ui.MainActivity
import net.osmand.telegram.ui.OPEN_MY_LOCATION_TAB_KEY import net.osmand.telegram.ui.OPEN_MY_LOCATION_TAB_KEY
@ -53,7 +53,7 @@ abstract class TelegramNotification(protected var app: TelegramApplication, val
app.notificationHelper.createNotificationChannel() app.notificationHelper.createNotificationChannel()
} }
val builder = NotificationCompat.Builder(app, NotificationHelper.NOTIFICATION_CHANEL_ID) val builder = NotificationCompat.Builder(app, NotificationHelper.NOTIFICATION_CHANEL_ID)
.setVisibility(android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC) .setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC)
.setPriority(priority) .setPriority(priority)
.setOngoing(ongoing && !wearable) .setOngoing(ongoing && !wearable)
.setContentIntent(contentPendingIntent) .setContentIntent(contentPendingIntent)

View file

@ -3,10 +3,6 @@ package net.osmand.telegram.ui
import android.app.Dialog import android.app.Dialog
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.text.Editable import android.text.Editable
import android.text.TextWatcher import android.text.TextWatcher
import android.view.LayoutInflater import android.view.LayoutInflater
@ -16,8 +12,9 @@ import android.view.WindowManager
import android.widget.EditText import android.widget.EditText
import android.widget.ProgressBar import android.widget.ProgressBar
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramSettings
import net.osmand.telegram.ui.views.BottomSheetDialog import net.osmand.telegram.ui.views.BottomSheetDialog
import net.osmand.telegram.utils.AndroidNetworkUtils import net.osmand.telegram.utils.AndroidNetworkUtils
import net.osmand.telegram.utils.OsmandApiUtils import net.osmand.telegram.utils.OsmandApiUtils
@ -171,7 +168,7 @@ class AddNewDeviceBottomSheet : BaseDialogFragment() {
const val MAX_DEVICE_NAME_LENGTH = 200 const val MAX_DEVICE_NAME_LENGTH = 200
private const val TAG = "AddNewDeviceBottomSheet" private const val TAG = "AddNewDeviceBottomSheet"
fun showInstance(fm: FragmentManager, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
AddNewDeviceBottomSheet().apply { AddNewDeviceBottomSheet().apply {
setTargetFragment(target, NEW_DEVICE_REQUEST_CODE) setTargetFragment(target, NEW_DEVICE_REQUEST_CODE)

View file

@ -2,7 +2,7 @@ package net.osmand.telegram.ui
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.DialogFragment import androidx.fragment.app.DialogFragment
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
@ -17,9 +17,9 @@ open class BaseDialogFragment : DialogFragment() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
when { when {
Build.VERSION.SDK_INT >= 23 -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Transparent) Build.VERSION.SDK_INT >= 23 -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Transparent)
Build.VERSION.SDK_INT >= 19 -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Translucent) Build.VERSION.SDK_INT >= 19 -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar_Translucent)
else -> setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar) else -> setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_FRAME, R.style.AppTheme_NoActionbar)
} }
} }
} }

View file

@ -6,13 +6,12 @@ import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.os.PowerManager import android.os.PowerManager
import android.provider.Settings import android.provider.Settings
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
@ -79,7 +78,7 @@ class BatteryOptimizationBottomSheet : DialogFragment() {
private const val TAG = "BatteryOptimizationBottomSheet" private const val TAG = "BatteryOptimizationBottomSheet"
fun showInstance(fm: FragmentManager): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean {
return try { return try {
BatteryOptimizationBottomSheet().show(fm, TAG) BatteryOptimizationBottomSheet().show(fm, TAG)
true true

View file

@ -1,15 +1,13 @@
package net.osmand.telegram.ui package net.osmand.telegram.ui
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.TelegramSettings import net.osmand.telegram.TelegramSettings
@ -77,7 +75,7 @@ class ChooseOsmAndBottomSheet : DialogFragment() {
private const val TAG = "ChooseOsmAndBottomSheet" private const val TAG = "ChooseOsmAndBottomSheet"
fun showInstance(fm: FragmentManager, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
ChooseOsmAndBottomSheet().apply { ChooseOsmAndBottomSheet().apply {
setTargetFragment(target, OSMAND_CHOSEN_REQUEST_CODE) setTargetFragment(target, OSMAND_CHOSEN_REQUEST_CODE)

View file

@ -3,15 +3,13 @@ package net.osmand.telegram.ui
import android.graphics.ColorMatrix import android.graphics.ColorMatrix
import android.graphics.ColorMatrixColorFilter import android.graphics.ColorMatrixColorFilter
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.helpers.TelegramUiHelper import net.osmand.telegram.helpers.TelegramUiHelper
@ -86,7 +84,7 @@ class DisableSharingBottomSheet : DialogFragment() {
private const val TAG = "DisableSharingBottomSheet" private const val TAG = "DisableSharingBottomSheet"
private const val CHATS_COUNT_KEY = "chats_count" private const val CHATS_COUNT_KEY = "chats_count"
fun showInstance(fm: FragmentManager, target: Fragment, chatsCount: Int): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment, chatsCount: Int): Boolean {
return try { return try {
DisableSharingBottomSheet().apply { DisableSharingBottomSheet().apply {
arguments = Bundle().apply { putInt(CHATS_COUNT_KEY, chatsCount) } arguments = Bundle().apply { putInt(CHATS_COUNT_KEY, chatsCount) }

View file

@ -1,13 +1,12 @@
package net.osmand.telegram.ui package net.osmand.telegram.ui
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.ui.views.BottomSheetDialog import net.osmand.telegram.ui.views.BottomSheetDialog
@ -48,7 +47,7 @@ class DisconnectTelegramBottomSheet : DialogFragment() {
private const val TAG = "DisconnectTelegramBottomSheet" private const val TAG = "DisconnectTelegramBottomSheet"
fun showInstance(fm: FragmentManager): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean {
return try { return try {
DisconnectTelegramBottomSheet().show(fm, TAG) DisconnectTelegramBottomSheet().show(fm, TAG)
true true

View file

@ -3,11 +3,6 @@ package net.osmand.telegram.ui
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.ListPopupWindow
import android.support.v7.widget.RecyclerView
import android.view.Gravity import android.view.Gravity
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -17,6 +12,10 @@ import android.widget.ArrayAdapter
import android.widget.ImageView import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.widget.ListPopupWindow
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.osmand.Location import net.osmand.Location
import net.osmand.data.LatLon import net.osmand.data.LatLon
import net.osmand.telegram.R import net.osmand.telegram.R
@ -72,16 +71,16 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
AndroidUtils.addStatusBarPadding19v(context!!, appBarLayout) AndroidUtils.addStatusBarPadding19v(context!!, appBarLayout)
adapter = LiveNowListAdapter() adapter = LiveNowListAdapter()
mainView.findViewById<RecyclerView>(R.id.recycler_view).apply { mainView.findViewById<androidx.recyclerview.widget.RecyclerView>(R.id.recycler_view).apply {
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
adapter = this@LiveNowTabFragment.adapter adapter = this@LiveNowTabFragment.adapter
addOnScrollListener(object : RecyclerView.OnScrollListener() { addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE locationUiUpdateAllowed = newState == androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE
when (newState) { when (newState) {
RecyclerView.SCROLL_STATE_DRAGGING -> animateOpenOsmAndBtn(false) androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING -> animateOpenOsmAndBtn(false)
RecyclerView.SCROLL_STATE_IDLE -> animateOpenOsmAndBtn(true) androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE -> animateOpenOsmAndBtn(true)
} }
} }
}) })
@ -98,7 +97,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
} }
} }
mainView.findViewById<SwipeRefreshLayout>(R.id.swipe_refresh).apply { mainView.findViewById<androidx.swiperefreshlayout.widget.SwipeRefreshLayout>(R.id.swipe_refresh).apply {
setOnRefreshListener { setOnRefreshListener {
app.shareLocationHelper.checkNetworkType() app.shareLocationHelper.checkNetworkType()
app.telegramHelper.scanChatsHistory() app.telegramHelper.scanChatsHistory()
@ -398,7 +397,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
) )
} }
inner class LiveNowListAdapter : RecyclerView.Adapter<BaseViewHolder>() { inner class LiveNowListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<BaseViewHolder>() {
private val menuList = private val menuList =
listOf(getString(R.string.shared_string_off), getString(R.string.shared_string_all)) listOf(getString(R.string.shared_string_off), getString(R.string.shared_string_all))
@ -603,7 +602,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage
} }
} }
abstract inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { abstract inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) {
val icon: ImageView? = view.findViewById(R.id.icon) val icon: ImageView? = view.findViewById(R.id.icon)
val title: TextView? = view.findViewById(R.id.title) val title: TextView? = view.findViewById(R.id.title)
val locationViewContainer: View? = view.findViewById(R.id.location_view_container) val locationViewContainer: View? = view.findViewById(R.id.location_view_container)

View file

@ -8,10 +8,6 @@ import android.graphics.Rect
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.annotation.StringRes
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.support.v7.widget.AppCompatImageView
import android.text.* import android.text.*
import android.text.method.LinkMovementMethod import android.text.method.LinkMovementMethod
import android.text.style.ClickableSpan import android.text.style.ClickableSpan
@ -24,6 +20,9 @@ import android.view.ViewGroup
import android.view.WindowManager import android.view.WindowManager
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.* import android.widget.*
import androidx.annotation.StringRes
import androidx.appcompat.widget.AppCompatImageView
import androidx.core.content.ContextCompat
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.utils.AndroidNetworkUtils import net.osmand.telegram.utils.AndroidNetworkUtils
@ -57,12 +56,12 @@ class LoginDialogFragment : BaseDialogFragment() {
private var countryPhoneCode: String = "+" private var countryPhoneCode: String = "+"
fun showWelcomeDialog(fragmentManager: FragmentManager) { fun showWelcomeDialog(fragmentManager: androidx.fragment.app.FragmentManager) {
welcomeDialogShown = true welcomeDialogShown = true
showDialog(fragmentManager, welcomeDialog = true) showDialog(fragmentManager, welcomeDialog = true)
} }
fun showDialog(fragmentManager: FragmentManager, loginDialogType: LoginDialogType? = null, welcomeDialog: Boolean = false, privacyPolicyAgreed: Boolean = false) { fun showDialog(fragmentManager: androidx.fragment.app.FragmentManager, loginDialogType: LoginDialogType? = null, welcomeDialog: Boolean = false, privacyPolicyAgreed: Boolean = false) {
try { try {
/* /*
@ -95,13 +94,13 @@ class LoginDialogFragment : BaseDialogFragment() {
} }
} }
fun dismiss(fragmentManager: FragmentManager) { fun dismiss(fragmentManager: androidx.fragment.app.FragmentManager) {
val loginDialogFragment = getFragment(fragmentManager) val loginDialogFragment = getFragment(fragmentManager)
loginDialogFragment?.dismissedManually = true loginDialogFragment?.dismissedManually = true
loginDialogFragment?.dismissAllowingStateLoss() loginDialogFragment?.dismissAllowingStateLoss()
} }
private fun getFragment(fragmentManager: FragmentManager): LoginDialogFragment? { private fun getFragment(fragmentManager: androidx.fragment.app.FragmentManager): LoginDialogFragment? {
return fragmentManager.findFragmentByTag(TAG) as LoginDialogFragment? return fragmentManager.findFragmentByTag(TAG) as LoginDialogFragment?
} }
} }

View file

@ -1,14 +1,12 @@
package net.osmand.telegram.ui package net.osmand.telegram.ui
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.ui.views.BottomSheetDialog import net.osmand.telegram.ui.views.BottomSheetDialog
@ -61,7 +59,7 @@ class LogoutBottomSheet : DialogFragment() {
private const val TAG = "DisableSharingBottomSheet" private const val TAG = "DisableSharingBottomSheet"
fun showInstance(fm: FragmentManager, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
LogoutBottomSheet().apply { LogoutBottomSheet().apply {
setTargetFragment(target, LOGOUT_REQUEST_CODE) setTargetFragment(target, LOGOUT_REQUEST_CODE)

View file

@ -5,21 +5,16 @@ import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomNavigationView
import android.support.design.widget.CoordinatorLayout
import android.support.design.widget.Snackbar
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import android.support.v4.view.PagerAdapter
import android.support.v4.view.ViewPager
import android.support.v7.app.AlertDialog
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.ListPopupWindow
import android.view.Gravity import android.view.Gravity
import android.view.View import android.view.View
import android.widget.* import android.widget.*
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.ListPopupWindow
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentPagerAdapter
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.snackbar.Snackbar
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
@ -35,7 +30,6 @@ import net.osmand.telegram.utils.OsmandApiUtils
import org.drinkless.td.libcore.telegram.TdApi import org.drinkless.td.libcore.telegram.TdApi
import java.io.File import java.io.File
import java.lang.ref.WeakReference import java.lang.ref.WeakReference
import java.time.MonthDay
import java.util.* import java.util.*
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
@ -69,8 +63,8 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
private lateinit var buttonsBar: LinearLayout private lateinit var buttonsBar: LinearLayout
private lateinit var bottomNav: BottomNavigationView private lateinit var bottomNav: BottomNavigationView
private lateinit var coordinatorLayout: CoordinatorLayout private lateinit var coordinatorLayout: androidx.coordinatorlayout.widget.CoordinatorLayout
private lateinit var viewPager: ViewPager private lateinit var viewPager: androidx.viewpager.widget.ViewPager
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
@ -163,7 +157,7 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
} }
} }
override fun onAttachFragment(fragment: Fragment?) { override fun onAttachFragment(fragment: androidx.fragment.app.Fragment?) {
if (fragment is TelegramListener) { if (fragment is TelegramListener) {
listeners.add(WeakReference(fragment)) listeners.add(WeakReference(fragment))
} }
@ -521,16 +515,16 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
} }
} }
class ViewPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) { class ViewPagerAdapter(fm: androidx.fragment.app.FragmentManager) : FragmentPagerAdapter(fm) {
private val fragments = listOf<Fragment>(MyLocationTabFragment(), LiveNowTabFragment(), TimelineTabFragment()) private val fragments = listOf<androidx.fragment.app.Fragment>(MyLocationTabFragment(), LiveNowTabFragment(), TimelineTabFragment())
override fun getItem(position: Int) = fragments[position] override fun getItem(position: Int) = fragments[position]
override fun getCount() = fragments.size override fun getCount() = fragments.size
override fun getItemPosition(`object`: Any): Int { override fun getItemPosition(`object`: Any): Int {
return PagerAdapter.POSITION_NONE return androidx.viewpager.widget.PagerAdapter.POSITION_NONE
} }
} }
} }

View file

@ -10,11 +10,6 @@ import android.graphics.drawable.GradientDrawable
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.support.design.widget.AppBarLayout
import android.support.v4.app.Fragment
import android.support.v4.content.ContextCompat
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.text.SpannableString import android.text.SpannableString
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import android.text.style.ForegroundColorSpan import android.text.style.ForegroundColorSpan
@ -23,6 +18,11 @@ import android.util.TypedValue
import android.view.* import android.view.*
import android.view.animation.LinearInterpolator import android.view.animation.LinearInterpolator
import android.widget.* import android.widget.*
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.appbar.AppBarLayout
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.telegram.* import net.osmand.telegram.*
import net.osmand.telegram.helpers.LocationMessages import net.osmand.telegram.helpers.LocationMessages
@ -206,15 +206,15 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
.setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_search_dark)) .setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_search_dark))
} }
mainView.findViewById<RecyclerView>(R.id.recycler_view).apply { mainView.findViewById<androidx.recyclerview.widget.RecyclerView>(R.id.recycler_view).apply {
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
adapter = this@MyLocationTabFragment.adapter adapter = this@MyLocationTabFragment.adapter
addOnScrollListener(object : RecyclerView.OnScrollListener() { addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
when (newState) { when (newState) {
RecyclerView.SCROLL_STATE_DRAGGING -> animateStartSharingBtn(false) androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING -> animateStartSharingBtn(false)
RecyclerView.SCROLL_STATE_IDLE -> animateStartSharingBtn(true) androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE -> animateStartSharingBtn(true)
} }
} }
}) })
@ -614,7 +614,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
} }
inner class MyLocationListAdapter : inner class MyLocationListAdapter :
RecyclerView.Adapter<MyLocationListAdapter.BaseViewHolder>() { androidx.recyclerview.widget.RecyclerView.Adapter<MyLocationListAdapter.BaseViewHolder>() {
var items = mutableListOf<Any>() var items = mutableListOf<Any>()
set(value) { set(value) {
field = value field = value
@ -921,7 +921,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
override fun getItemCount() = items.size override fun getItemCount() = items.size
abstract inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { abstract inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) {
val icon: ImageView? = view.findViewById(R.id.icon) val icon: ImageView? = view.findViewById(R.id.icon)
val title: TextView? = view.findViewById(R.id.title) val title: TextView? = view.findViewById(R.id.title)
val description: TextView? = view.findViewById(R.id.description) val description: TextView? = view.findViewById(R.id.description)

View file

@ -2,10 +2,6 @@ package net.osmand.telegram.ui
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.support.v7.widget.Toolbar
import android.text.Editable import android.text.Editable
import android.text.TextWatcher import android.text.TextWatcher
import android.view.LayoutInflater import android.view.LayoutInflater
@ -13,11 +9,10 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.WindowManager import android.view.WindowManager
import android.widget.* import android.widget.*
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramSettings.ProxyType import net.osmand.telegram.TelegramSettings.*
import net.osmand.telegram.TelegramSettings.ProxyPref
import net.osmand.telegram.TelegramSettings.ProxyMTProtoPref
import net.osmand.telegram.TelegramSettings.ProxySOCKS5Pref
class ProxySettingsDialogFragment : BaseDialogFragment() { class ProxySettingsDialogFragment : BaseDialogFragment() {
@ -202,7 +197,7 @@ class ProxySettingsDialogFragment : BaseDialogFragment() {
private const val TAG = "ProxySettingsDialogFragment" private const val TAG = "ProxySettingsDialogFragment"
const val PROXY_PREFERENCES_UPDATED_REQUEST_CODE = 6 const val PROXY_PREFERENCES_UPDATED_REQUEST_CODE = 6
fun showInstance(fm: FragmentManager, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
ProxySettingsDialogFragment().apply { ProxySettingsDialogFragment().apply {
setTargetFragment(target, PROXY_PREFERENCES_UPDATED_REQUEST_CODE) setTargetFragment(target, PROXY_PREFERENCES_UPDATED_REQUEST_CODE)

View file

@ -4,18 +4,16 @@ import android.annotation.SuppressLint
import android.content.Intent import android.content.Intent
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.Toolbar
import android.text.Editable import android.text.Editable
import android.text.TextWatcher import android.text.TextWatcher
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.* import android.widget.*
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.osmand.Location import net.osmand.Location
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.data.LatLon import net.osmand.data.LatLon
@ -105,10 +103,10 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
adapter = this@SearchDialogFragment.adapter adapter = this@SearchDialogFragment.adapter
setEmptyView(emptyView) setEmptyView(emptyView)
addOnScrollListener(object : RecyclerView.OnScrollListener() { addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
val scrolling = newState != RecyclerView.SCROLL_STATE_IDLE val scrolling = newState != androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE
locationUiUpdateAllowed = !scrolling locationUiUpdateAllowed = !scrolling
if (scrolling) { if (scrolling) {
hideKeyboard() hideKeyboard()
@ -352,7 +350,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch
outState.putLongArray(SELECTED_USERS_KEY, selectedUsers.toLongArray()) outState.putLongArray(SELECTED_USERS_KEY, selectedUsers.toLongArray())
} }
inner class SearchAdapter : RecyclerView.Adapter<SearchAdapter.ChatViewHolder>() { inner class SearchAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<SearchAdapter.ChatViewHolder>() {
var items = mutableListOf<TdApi.Object>() var items = mutableListOf<TdApi.Object>()
set(value) { set(value) {
@ -513,7 +511,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch
override fun getItemCount() = items.size override fun getItemCount() = items.size
inner class ChatViewHolder(view: View) : RecyclerView.ViewHolder(view) { inner class ChatViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) {
val icon: ImageView? = view.findViewById(R.id.icon) val icon: ImageView? = view.findViewById(R.id.icon)
val title: TextView? = view.findViewById(R.id.title) val title: TextView? = view.findViewById(R.id.title)
val locationViewContainer: View? = view.findViewById(R.id.location_view_container) val locationViewContainer: View? = view.findViewById(R.id.location_view_container)
@ -575,7 +573,7 @@ class SearchDialogFragment : BaseDialogFragment(), TelegramHelper.TelegramSearch
const val SEARCH_ITEMS_REQUEST_CODE = 3 const val SEARCH_ITEMS_REQUEST_CODE = 3
const val CLEAR_SELECTED_ITEMS_REQUEST_CODE = 4 const val CLEAR_SELECTED_ITEMS_REQUEST_CODE = 4
fun showInstance(fm: FragmentManager, target: Fragment?, selectedChats: Set<Long>, selectedUsers: Set<Long>): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment?, selectedChats: Set<Long>, selectedUsers: Set<Long>): Boolean {
return try { return try {
SearchDialogFragment().apply { SearchDialogFragment().apply {
arguments = Bundle().apply { arguments = Bundle().apply {

View file

@ -4,14 +4,12 @@ import android.app.DatePickerDialog
import android.app.TimePickerDialog import android.app.TimePickerDialog
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.ui.views.BottomSheetDialog import net.osmand.telegram.ui.views.BottomSheetDialog
@ -167,7 +165,7 @@ class SetTimeBottomSheet : DialogFragment() {
private const val TAG = "SetTimeBottomSheet" private const val TAG = "SetTimeBottomSheet"
fun showInstance(fm: FragmentManager, target: Fragment, start: Long, end: Long): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment, start: Long, end: Long): Boolean {
return try { return try {
SetTimeBottomSheet().apply { SetTimeBottomSheet().apply {
arguments = Bundle().apply { arguments = Bundle().apply {

View file

@ -2,15 +2,13 @@ package net.osmand.telegram.ui
import android.app.TimePickerDialog import android.app.TimePickerDialog
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.osmand.Location import net.osmand.Location
import net.osmand.data.LatLon import net.osmand.data.LatLon
import net.osmand.telegram.R import net.osmand.telegram.R
@ -65,13 +63,13 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te
updateTimeForAllRow() updateTimeForAllRow()
view.findViewById<RecyclerView>(R.id.recycler_view).apply { view.findViewById<androidx.recyclerview.widget.RecyclerView>(R.id.recycler_view).apply {
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
adapter = this@SetTimeDialogFragment.adapter adapter = this@SetTimeDialogFragment.adapter
addOnScrollListener(object : RecyclerView.OnScrollListener() { addOnScrollListener(object : androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { override fun onScrollStateChanged(recyclerView: androidx.recyclerview.widget.RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState) super.onScrollStateChanged(recyclerView, newState)
locationUiUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE locationUiUpdateAllowed = newState == androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE
} }
}) })
} }
@ -289,7 +287,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te
adapter.items = items adapter.items = items
} }
inner class SetTimeListAdapter : RecyclerView.Adapter<ChatViewHolder>() { inner class SetTimeListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<ChatViewHolder>() {
var items: List<TdApi.Object> = emptyList() var items: List<TdApi.Object> = emptyList()
set(value) { set(value) {
@ -384,7 +382,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te
override fun getItemCount() = items.size override fun getItemCount() = items.size
inner class ChatViewHolder(val view: View) : RecyclerView.ViewHolder(view) { inner class ChatViewHolder(val view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) {
val icon: ImageView? = view.findViewById(R.id.icon) val icon: ImageView? = view.findViewById(R.id.icon)
val title: TextView? = view.findViewById(R.id.title) val title: TextView? = view.findViewById(R.id.title)
val directionIcon: ImageView? = view.findViewById(R.id.direction_icon) val directionIcon: ImageView? = view.findViewById(R.id.direction_icon)
@ -408,7 +406,7 @@ class SetTimeDialogFragment : BaseDialogFragment(), TelegramLocationListener, Te
private const val DEFAULT_VISIBLE_TIME_SECONDS = 60 * 60L // 1 hour private const val DEFAULT_VISIBLE_TIME_SECONDS = 60 * 60L // 1 hour
private const val NO_VALUE = -1L private const val NO_VALUE = -1L
fun showInstance(fm: FragmentManager, chatIds: Set<Long>, usersIds: Set<Long>, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, chatIds: Set<Long>, usersIds: Set<Long>, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
val chats = mutableListOf<Long>() val chats = mutableListOf<Long>()
for (id in chatIds) { for (id in chatIds) {

View file

@ -4,10 +4,6 @@ import android.content.Intent
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.support.v7.widget.ListPopupWindow
import android.support.v7.widget.Toolbar
import android.text.SpannableStringBuilder import android.text.SpannableStringBuilder
import android.text.style.ForegroundColorSpan import android.text.style.ForegroundColorSpan
import android.view.Gravity import android.view.Gravity
@ -15,6 +11,9 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.* import android.widget.*
import androidx.appcompat.widget.ListPopupWindow
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramSettings import net.osmand.telegram.TelegramSettings
import net.osmand.telegram.TelegramSettings.ListPreference import net.osmand.telegram.TelegramSettings.ListPreference
@ -402,7 +401,7 @@ class SettingsDialogFragment : BaseDialogFragment() {
private const val TAG = "SettingsDialogFragment" private const val TAG = "SettingsDialogFragment"
fun showInstance(fm: FragmentManager): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager): Boolean {
return try { return try {
SettingsDialogFragment().show(fm, TAG) SettingsDialogFragment().show(fm, TAG)
true true

View file

@ -1,16 +1,14 @@
package net.osmand.telegram.ui package net.osmand.telegram.ui
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.TelegramSettings import net.osmand.telegram.TelegramSettings
@ -108,7 +106,7 @@ class SharingStatusBottomSheet : DialogFragment() {
companion object { companion object {
const val SHARING_STATUS_REQUEST_CODE = 5 const val SHARING_STATUS_REQUEST_CODE = 5
private const val TAG = "SharingStatusBottomSheet" private const val TAG = "SharingStatusBottomSheet"
fun showInstance(fm: FragmentManager, target: Fragment): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, target: androidx.fragment.app.Fragment): Boolean {
return try { return try {
SharingStatusBottomSheet().apply { SharingStatusBottomSheet().apply {
setTargetFragment(target, SHARING_STATUS_REQUEST_CODE) setTargetFragment(target, SHARING_STATUS_REQUEST_CODE)

View file

@ -1,16 +1,14 @@
package net.osmand.telegram.ui package net.osmand.telegram.ui
import android.os.Bundle import android.os.Bundle
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.DialogFragment
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.fragment.app.DialogFragment
import com.google.android.material.bottomsheet.BottomSheetBehavior
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.TelegramSettings import net.osmand.telegram.TelegramSettings
@ -87,8 +85,8 @@ class SortByBottomSheet : DialogFragment() {
private const val TAG = "SortByBottomSheet" private const val TAG = "SortByBottomSheet"
fun showInstance( fun showInstance(
fm: FragmentManager, fm: androidx.fragment.app.FragmentManager,
target: Fragment target: androidx.fragment.app.Fragment
): Boolean { ): Boolean {
return try { return try {
SortByBottomSheet().apply { SortByBottomSheet().apply {

View file

@ -7,11 +7,6 @@ import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.support.annotation.DrawableRes
import android.support.v4.app.Fragment
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
@ -19,6 +14,9 @@ import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.Switch import android.widget.Switch
import android.widget.TextView import android.widget.TextView
import androidx.annotation.DrawableRes
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.helpers.LocationMessages import net.osmand.telegram.helpers.LocationMessages
@ -110,7 +108,7 @@ class TimelineTabFragment : Fragment() {
} }
} }
mainView.findViewById<SwipeRefreshLayout>(R.id.swipe_refresh).apply { mainView.findViewById<androidx.swiperefreshlayout.widget.SwipeRefreshLayout>(R.id.swipe_refresh).apply {
setOnRefreshListener { setOnRefreshListener {
updateList() updateList()
isRefreshing = false isRefreshing = false
@ -224,7 +222,7 @@ class TimelineTabFragment : Fragment() {
return list return list
} }
inner class LiveNowListAdapter : RecyclerView.Adapter<BaseViewHolder>() { inner class LiveNowListAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<BaseViewHolder>() {
var items: List<ListItem> = emptyList() var items: List<ListItem> = emptyList()
set(value) { set(value) {
@ -298,7 +296,7 @@ class TimelineTabFragment : Fragment() {
override fun getItemCount() = items.size override fun getItemCount() = items.size
inner class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { inner class BaseViewHolder(view: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(view) {
val icon: ImageView? = view.findViewById(R.id.icon) val icon: ImageView? = view.findViewById(R.id.icon)
val title: TextView? = view.findViewById(R.id.title) val title: TextView? = view.findViewById(R.id.title)
val description: TextView? = view.findViewById(R.id.description) val description: TextView? = view.findViewById(R.id.description)

View file

@ -7,9 +7,6 @@ import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.graphics.drawable.LayerDrawable import android.graphics.drawable.LayerDrawable
import android.os.* import android.os.*
import android.support.design.widget.Snackbar
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.text.SpannableString import android.text.SpannableString
import android.text.Spanned import android.text.Spanned
import android.text.style.ForegroundColorSpan import android.text.style.ForegroundColorSpan
@ -22,6 +19,8 @@ import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.core.content.ContextCompat
import com.google.android.material.snackbar.Snackbar
import net.osmand.GPXUtilities import net.osmand.GPXUtilities
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.aidl.gpx.AGpxBitmap import net.osmand.aidl.gpx.AGpxBitmap
@ -490,7 +489,7 @@ class UserGpxInfoFragment : BaseDialogFragment() {
private const val UPDATE_TRACK_INTERVAL_MS = 30 * 1000L // 30 sec private const val UPDATE_TRACK_INTERVAL_MS = 30 * 1000L // 30 sec
private const val TRACK_UPDATE_MSG_ID = 1001 private const val TRACK_UPDATE_MSG_ID = 1001
fun showInstance(fm: FragmentManager, userId: Int, chatId: Long, deviceName: String, start: Long, end: Long): Boolean { fun showInstance(fm: androidx.fragment.app.FragmentManager, userId: Int, chatId: Long, deviceName: String, start: Long, end: Long): Boolean {
return try { return try {
val fragment = UserGpxInfoFragment().apply { val fragment = UserGpxInfoFragment().apply {
arguments = Bundle().apply { arguments = Bundle().apply {

View file

@ -1,15 +1,14 @@
package net.osmand.telegram.ui.views package net.osmand.telegram.ui.views
import android.content.Context import android.content.Context
import android.support.v7.widget.RecyclerView
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
class EmptyStateRecyclerView : RecyclerView { class EmptyStateRecyclerView : androidx.recyclerview.widget.RecyclerView {
private var emptyView: View? = null private var emptyView: View? = null
private val emptyStateObserver = object : RecyclerView.AdapterDataObserver() { private val emptyStateObserver = object : androidx.recyclerview.widget.RecyclerView.AdapterDataObserver() {
override fun onChanged() { override fun onChanged() {
checkIfEmpty() checkIfEmpty()
} }
@ -33,7 +32,7 @@ class EmptyStateRecyclerView : RecyclerView {
defStyle defStyle
) )
override fun setAdapter(adapter: RecyclerView.Adapter<*>?) { override fun setAdapter(adapter: androidx.recyclerview.widget.RecyclerView.Adapter<*>?) {
val oldAdapter = getAdapter() val oldAdapter = getAdapter()
oldAdapter?.unregisterAdapterDataObserver(emptyStateObserver) oldAdapter?.unregisterAdapterDataObserver(emptyStateObserver)
super.setAdapter(adapter) super.setAdapter(adapter)

View file

@ -1,11 +1,10 @@
package net.osmand.telegram.ui.views package net.osmand.telegram.ui.views
import android.content.Context import android.content.Context
import android.support.v4.view.ViewPager
import android.util.AttributeSet import android.util.AttributeSet
import android.view.MotionEvent import android.view.MotionEvent
class LockableViewPager : ViewPager { class LockableViewPager : androidx.viewpager.widget.ViewPager {
var swipeLocked: Boolean = false var swipeLocked: Boolean = false
constructor(context: Context) : super(context) {} constructor(context: Context) : super(context) {}

View file

@ -2,8 +2,8 @@ package net.osmand.telegram.ui.views
import android.content.Context import android.content.Context
import android.content.res.TypedArray import android.content.res.TypedArray
import android.support.v7.widget.AppCompatTextView
import android.util.AttributeSet import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView
import net.osmand.telegram.R import net.osmand.telegram.R
import net.osmand.telegram.helpers.FontCache import net.osmand.telegram.helpers.FontCache

View file

@ -14,21 +14,19 @@ import android.graphics.drawable.Drawable
import android.graphics.drawable.StateListDrawable import android.graphics.drawable.StateListDrawable
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.support.annotation.AttrRes
import android.support.annotation.ColorInt
import android.support.annotation.ColorRes
import android.support.design.widget.Snackbar
import android.support.v4.app.ActivityCompat
import android.support.v4.app.DialogFragment
import android.support.v4.app.FragmentManager
import android.support.v4.content.ContextCompat
import android.support.v4.content.FileProvider
import android.util.TypedValue import android.util.TypedValue
import android.util.TypedValue.COMPLEX_UNIT_DIP import android.util.TypedValue.COMPLEX_UNIT_DIP
import android.view.View import android.view.View
import android.view.WindowManager import android.view.WindowManager
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.TextView import android.widget.TextView
import androidx.annotation.AttrRes
import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider
import com.google.android.material.snackbar.Snackbar
import net.osmand.telegram.R import net.osmand.telegram.R
import java.io.File import java.io.File
@ -62,9 +60,9 @@ object AndroidUtils {
} }
} }
fun dismissAllDialogs(fm: FragmentManager) { fun dismissAllDialogs(fm: androidx.fragment.app.FragmentManager) {
for (fragment in fm.fragments) { for (fragment in fm.fragments) {
if (fragment is DialogFragment) { if (fragment is androidx.fragment.app.DialogFragment) {
fragment.dismissAllowingStateLoss() fragment.dismissAllowingStateLoss()
} }
dismissAllDialogs(fragment.childFragmentManager) dismissAllDialogs(fragment.childFragmentManager)
@ -169,7 +167,7 @@ object AndroidUtils {
fun setSnackbarTextColor(snackbar: Snackbar, @ColorRes colorId: Int) { fun setSnackbarTextColor(snackbar: Snackbar, @ColorRes colorId: Int) {
val view = snackbar.view val view = snackbar.view
val tv = view.findViewById(android.support.design.R.id.snackbar_action) as TextView val tv = view.findViewById(com.google.android.material.R.id.snackbar_action) as TextView
tv.setTextColor(ContextCompat.getColor(view.context, colorId)) tv.setTextColor(ContextCompat.getColor(view.context, colorId))
} }

View file

@ -7,15 +7,15 @@ import android.graphics.drawable.LayerDrawable
import android.hardware.Sensor import android.hardware.Sensor
import android.hardware.SensorManager import android.hardware.SensorManager
import android.os.AsyncTask import android.os.AsyncTask
import android.support.annotation.ColorInt
import android.support.annotation.ColorRes
import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.DrawableCompat
import android.view.Surface import android.view.Surface
import android.view.WindowManager import android.view.WindowManager
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import net.osmand.Location import net.osmand.Location
import net.osmand.PlatformUtil import net.osmand.PlatformUtil
import net.osmand.data.LatLon import net.osmand.data.LatLon

View file

@ -67,7 +67,7 @@
<activity android:name="net.osmand.plus.activities.ExitActivity" /> <activity android:name="net.osmand.plus.activities.ExitActivity" />
<provider <provider
android:name="android.support.v4.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="net.osmand.plus.fileprovider" android:authorities="net.osmand.plus.fileprovider"
android:exported="false" android:exported="false"
android:grantUriPermissions="true" > android:grantUriPermissions="true" >

View file

@ -455,13 +455,13 @@ task appStart(type: Exec) {
dependencies { dependencies {
implementation project(path: ':OsmAnd-java', configuration: 'android') implementation project(path: ':OsmAnd-java', configuration: 'android')
implementation project(':OsmAnd-api') implementation project(':OsmAnd-api')
implementation 'com.android.support:multidex:1.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.android.support:gridlayout-v7:27.1.1' implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.android.support:cardview-v7:27.1.1' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:design:27.1.1' implementation 'com.google.android.material:material:1.0.0'
implementation 'com.android.support:customtabs:27.1.1' implementation 'androidx.browser:browser:1.0.0'
implementation 'com.android.support:preference-v7:27.1.1' implementation 'androidx.preference:preference:1.1.0'
implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs')
implementation group: 'commons-logging', name: 'commons-logging', version: '1.2' implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'

View file

@ -51,7 +51,7 @@
</LinearLayout> </LinearLayout>
<android.support.v7.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/create_button" android:id="@+id/create_button"
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -59,7 +59,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/shared_string_add"/> android:text="@string/shared_string_add"/>
<android.support.v7.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/cancel_button" android:id="@+id/cancel_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored" style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -22,7 +22,7 @@
android:clickable="true" android:clickable="true"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/close_button" android:id="@+id/close_button"
style="@style/Widget.AppCompat.ActionButton" style="@style/Widget.AppCompat.ActionButton"
android:layout_width="56dp" android:layout_width="56dp"
@ -69,7 +69,7 @@
</LinearLayout> </LinearLayout>
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/more_button" android:id="@+id/more_button"
style="@style/Widget.AppCompat.ActionButton" style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp" android:layout_width="48dp"

View file

@ -7,14 +7,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar" android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
tools:background="@color/route_info_bottom_view_bg_dark"> tools:background="@color/route_info_bottom_view_bg_dark">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/coordinate_input_toolbar" android:id="@+id/coordinate_input_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
@ -70,9 +70,9 @@
</LinearLayout> </LinearLayout>
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<LinearLayout <LinearLayout
android:id="@+id/hand_container" android:id="@+id/hand_container"

View file

@ -9,12 +9,12 @@
android:background="?attr/activity_background_color" android:background="?attr/activity_background_color"
android:orientation="vertical"> android:orientation="vertical">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dashboard_map_toolbar" android:layout_height="@dimen/dashboard_map_toolbar"
android:background="?attr/actionModeBackground"> android:background="?attr/actionModeBackground">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dashboard_map_toolbar" android:layout_height="@dimen/dashboard_map_toolbar"
@ -57,9 +57,9 @@
tools:drawableEnd="@drawable/ic_action_car_dark" /> tools:drawableEnd="@drawable/ic_action_car_dark" />
</LinearLayout> </LinearLayout>
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -183,7 +183,7 @@
android:text="@string/show_direction" android:text="@string/show_direction"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/distance_indication_switch" android:id="@+id/distance_indication_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -325,7 +325,7 @@
android:text="@string/show_arrows_on_the_map" android:text="@string/show_arrows_on_the_map"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/show_arrows_switch" android:id="@+id/show_arrows_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -387,7 +387,7 @@
android:text="@string/show_guide_line" android:text="@string/show_guide_line"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/show_guide_line_switch" android:id="@+id/show_guide_line_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -449,7 +449,7 @@
android:text="@string/one_tap_active" android:text="@string/one_tap_active"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/one_tap_active_switch" android:id="@+id/one_tap_active_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -512,7 +512,7 @@
android:text="@string/keep_passed_markers" android:text="@string/keep_passed_markers"
android:textAppearance="@style/TextAppearance.ListItemTitle"/> android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/keep_passed_switch" android:id="@+id/keep_passed_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -16,7 +16,7 @@
android:background="?attr/left_menu_view_bg" android:background="?attr/left_menu_view_bg"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/plan_route_toolbar" android:id="@+id/plan_route_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dashboard_map_toolbar" android:layout_height="@dimen/dashboard_map_toolbar"
@ -97,7 +97,7 @@
android:paddingEnd="@dimen/list_content_padding" /> android:paddingEnd="@dimen/list_content_padding" />
</LinearLayout> </LinearLayout>
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
<ProgressBar <ProgressBar
android:id="@+id/snap_to_road_progress_bar" android:id="@+id/snap_to_road_progress_bar"
@ -114,7 +114,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/activity_background_color_dark"> android:background="@color/activity_background_color_dark">
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/markers_recycler_view" android:id="@+id/markers_recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>

View file

@ -634,7 +634,7 @@
android:visibility="gone" android:visibility="gone"
osmand:typeface="@string/font_roboto_medium"/> osmand:typeface="@string/font_roboto_medium"/>
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/widget_top_bar_switch" android:id="@+id/widget_top_bar_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="56dp" android:layout_height="56dp"

View file

@ -50,7 +50,7 @@
</LinearLayout> </LinearLayout>
<android.support.v7.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/apply_button" android:id="@+id/apply_button"
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -58,7 +58,7 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/shared_string_apply"/> android:text="@string/shared_string_apply"/>
<android.support.v7.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/cancel_button" android:id="@+id/cancel_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored" style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -14,7 +14,7 @@
android:clickable="true" android:clickable="true"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="@dimen/dashboard_map_toolbar" android:layout_height="@dimen/dashboard_map_toolbar"
@ -24,7 +24,7 @@
app:contentInsetLeft="72dp" app:contentInsetLeft="72dp"
app:contentInsetStart="72dp"> app:contentInsetStart="72dp">
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
<ScrollView <ScrollView
android:id="@+id/editor_scroll_view" android:id="@+id/editor_scroll_view"

View file

@ -14,7 +14,7 @@
android:clickable="true" android:clickable="true"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v4.view.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager" android:id="@+id/viewPager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" /> android:layout_height="200dp" />

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.GridLayout <androidx.gridlayout.widget.GridLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:grid="http://schemas.android.com/apk/res-auto" xmlns:grid="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid" android:id="@+id/grid"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"> <merge xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/toggle_item" android:id="@+id/toggle_item"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -58,7 +58,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"/> android:layout_weight="1"/>
<android.support.v7.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/start_button" android:id="@+id/start_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -9,7 +9,7 @@
android:orientation="vertical" android:orientation="vertical"
tools:context="net.osmand.plus.osmedit.EditPoiDialogFragment"> tools:context="net.osmand.plus.osmedit.EditPoiDialogFragment">
<android.support.design.widget.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout" android:id="@+id/tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -18,7 +18,7 @@
app:layout_scrollFlags="scroll" app:layout_scrollFlags="scroll"
app:tabIndicatorColor="?attr/pstsIndicatorColor"/> app:tabIndicatorColor="?attr/pstsIndicatorColor"/>
<android.support.v4.view.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/viewpager" android:id="@+id/viewpager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>

View file

@ -42,7 +42,7 @@
android:layout_marginEnd="@dimen/bottom_sheet_divider_margin_start" android:layout_marginEnd="@dimen/bottom_sheet_divider_margin_start"
android:layout_marginStart="@dimen/bottom_sheet_divider_margin_start" /> android:layout_marginStart="@dimen/bottom_sheet_divider_margin_start" />
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/compound_button" android:id="@+id/compound_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -5,7 +5,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/bg_color"> android:background="?attr/bg_color">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -14,7 +14,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:visibility="gone" /> android:visibility="gone" />
<android.support.v7.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -15,4 +15,4 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"/> android:layout_gravity="center_horizontal|bottom"/>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -8,7 +8,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/button_icon" android:id="@+id/button_icon"
android:layout_width="@dimen/standard_icon_size" android:layout_width="@dimen/standard_icon_size"
android:layout_height="@dimen/standard_icon_size" android:layout_height="@dimen/standard_icon_size"

View file

@ -15,7 +15,7 @@
android:paddingEnd="@dimen/content_padding" android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding"> android:paddingStart="@dimen/content_padding">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon" android:id="@+id/icon"
android:layout_width="@dimen/standard_icon_size" android:layout_width="@dimen/standard_icon_size"
android:layout_height="@dimen/standard_icon_size" android:layout_height="@dimen/standard_icon_size"

Some files were not shown because too many files have changed in this diff Show more