Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {

ext.kotlin_version = '1.3.11'
ext.supportVersion = '28.0.0'
ext.androidX = '1.0.2'
ext.sdkVersion = 28
ext.javapoet = '1.9.0'

Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
manifestPlaceholders = [omegaSuffixAuthority: suffixAuthority]
buildConfigField "String", "SUFFIX_AUTHORITY", "\""+suffixAuthority+"\""

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"


}
Expand All @@ -35,7 +35,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly "com.android.support:appcompat-v7:$supportVersion"
compileOnly "androidx.appcompat:appcompat:$androidX"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ActivityIntentBuilder<T : Activity>(
return FragmentIntentHandler(fragment, createIntent())
}

override fun createIntentHandler(fragment: android.support.v4.app.Fragment): SupportFragmentIntentHandler {
override fun createIntentHandler(fragment: androidx.fragment.app.Fragment): SupportFragmentIntentHandler {
return SupportFragmentIntentHandler(fragment, createIntent())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class BaseActivityBuilder(private val context: Context): IntentHandler
return FragmentIntentHandler(fragment, createIntent())
}

override fun createIntentHandler(fragment: android.support.v4.app.Fragment): SupportFragmentIntentHandler {
override fun createIntentHandler(fragment: androidx.fragment.app.Fragment): SupportFragmentIntentHandler {
return SupportFragmentIntentHandler(fragment, createIntent())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import android.content.Context
import android.content.Intent
import android.provider.CalendarContract
import android.provider.CalendarContract.*
import android.support.annotation.StringRes
import androidx.annotation.StringRes
import com.omega_r.libs.omegaintentbuilder.types.CalendarActionTypes
import com.omega_r.libs.omegaintentbuilder.types.CalendarActionTypes.*
import com.omega_r.libs.omegaintentbuilder.types.CalendarAvailabilityTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.omega_r.libs.omegaintentbuilder.builders
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.support.annotation.StringRes
import androidx.annotation.StringRes

class PlayStoreBuilder(private val context: Context): BaseActivityBuilder(context) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.Settings
import android.support.annotation.RequiresApi
import androidx.annotation.RequiresApi

/**
* SettingsIntentBuilder is a helper for constructing settings intent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.Telephony
import android.support.annotation.StringRes
import androidx.annotation.StringRes
import java.util.TreeSet

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import android.content.Context
import android.content.Intent
import android.os.Build
import android.speech.RecognizerIntent
import android.support.annotation.RequiresApi
import android.support.annotation.StringRes
import androidx.annotation.RequiresApi
import androidx.annotation.StringRes
import com.omega_r.libs.omegaintentbuilder.types.LanguageModelTypes
import java.util.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package com.omega_r.libs.omegaintentbuilder.builders.pick
import android.content.Context
import android.content.Intent
import android.os.Build
import android.support.annotation.RequiresApi
import androidx.annotation.RequiresApi
import com.omega_r.libs.omegaintentbuilder.builders.BaseActivityBuilder
import com.omega_r.libs.omegaintentbuilder.types.MimeTypes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.support.annotation.StringRes
import androidx.annotation.StringRes
import android.text.Html
import com.omega_r.libs.omegaintentbuilder.builders.BaseUriBuilder
import com.omega_r.libs.omegaintentbuilder.types.MimeTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.omega_r.libs.omegaintentbuilder.bundle
import android.os.Build
import android.os.Bundle
import android.os.PersistableBundle
import android.support.annotation.RequiresApi
import androidx.annotation.RequiresApi
import java.io.Serializable
import java.util.ArrayList

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.omega_r.libs.omegaintentbuilder.downloader
import android.content.Context
import android.net.Uri
import android.os.AsyncTask
import android.support.annotation.NonNull
import androidx.annotation.NonNull
import android.util.Log
import com.omega_r.libs.omegaintentbuilder.builders.BaseUriBuilder
import com.omega_r.libs.omegaintentbuilder.models.FileInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import android.content.Intent.EXTRA_INTENT
import android.content.Intent.EXTRA_TITLE
import android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION
import android.content.Intent.FLAG_GRANT_WRITE_URI_PERMISSION
import android.support.annotation.StringRes
import androidx.annotation.StringRes
import android.util.AndroidRuntimeException
import android.widget.Toast

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.util.AndroidRuntimeException;
import android.util.Log;
import android.util.SparseArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ package com.omega_r.libs.omegaintentbuilder.handlers
import android.content.ActivityNotFoundException
import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import androidx.fragment.app.Fragment

/**
* FragmentIntentHandler is a helper for start intents
* Support startActivityForResult
*/
class SupportFragmentIntentHandler(private val fragment: Fragment, private val createdIntent: Intent) : ContextIntentHandler(fragment.context!!, createdIntent) {
class SupportFragmentIntentHandler(private val fragment: androidx.fragment.app.Fragment, private val createdIntent: Intent) : ContextIntentHandler(fragment.context!!, createdIntent) {

/**
* Launch an activity for which you would like a result when it finished.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface IntentHandler : IntentBuilder {
* Returns FragmentIntentHandler (extends ContextIntentHandler) for control Intent.
* Support startActivity, startActivityForResult, start Chooser.
*/
fun createIntentHandler(fragment: android.support.v4.app.Fragment): SupportFragmentIntentHandler
fun createIntentHandler(fragment: androidx.fragment.app.Fragment): SupportFragmentIntentHandler

/**
* Same as {@link #startActivity(Intent, Bundle)} with no options specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import android.content.Context;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.webkit.URLUtil;

import com.omega_r.libs.omegaintentbuilder.BuildConfig;

import java.io.File;

public class FileProvider extends android.support.v4.content.FileProvider {
public class FileProvider extends androidx.core.content.FileProvider {

public static Uri getLocalFileUri(Context context, File file) {
return getUriForFile(context, context.getPackageName() + "." + BuildConfig.SUFFIX_AUTHORITY, file);
Expand Down
14 changes: 7 additions & 7 deletions examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
targetSdkVersion rootProject.ext.sdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

javaCompileOptions {
Expand All @@ -33,20 +33,20 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "androidx.appcompat:appcompat:$androidX"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:support-v4:$supportVersion"
implementation "com.android.support:design:$supportVersion"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'

api project(':core')
api project(':annotations')
kapt project(':processor')

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.omega_r.omegaintentbuilder;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.omega_r.omegaintentbuilder;

import android.app.ProgressDialog;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;

import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.content.Intent;
import android.graphics.Bitmap;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.content.Intent;
import android.speech.RecognizerIntent;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
Expand All @@ -11,7 +11,6 @@
import com.omega_r.libs.omegaintentbuilder.handlers.ActivityResultCallback;

import org.jetbrains.annotations.Nullable;
import org.w3c.dom.Text;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.omega_r.omegaintentbuilder;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.Nullable;
import com.google.android.material.tabs.TabLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.AppCompatActivity;

import com.omega_r.libs.omegafragmentbuilder.AppOmegaFragmentBuilder;
import com.omega_r.omegaintentbuilder.fragments.FirstFragment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.omega_r.omegaintentbuilder.fragments;

import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;

public class BaseFragment extends Fragment {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.omega_r.omegaintentbuilder.fragments;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.omega_r.omegaintentbuilder.fragments;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.IntentService;
import android.content.Intent;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.util.Log;

import com.omega_r.libs.omegaintentbuilder.AppOmegaIntentBuilder;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand Down Expand Up @@ -141,4 +141,4 @@

</LinearLayout>

</android.support.v4.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
16 changes: 8 additions & 8 deletions examples/src/main/res/layout/activity_tab.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -9,13 +9,13 @@
android:fitsSystemWindows="true"
tools:context="com.omega_r.omegaintentbuilder.TabActivity">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
Expand All @@ -24,21 +24,21 @@
app:popupTheme="@style/AppTheme.PopupOverlay"
app:title="@string/app_name">

<android.support.design.widget.TabLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill" />

</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading