• Breaking News

    Sunday, March 8, 2020

    Android Dev - Unable to cast RippleDrawable to StateListDrawable after migrating to androidx

    Android Dev - Unable to cast RippleDrawable to StateListDrawable after migrating to androidx


    Unable to cast RippleDrawable to StateListDrawable after migrating to androidx

    Posted: 08 Mar 2020 04:44 AM PDT

    keep getting

    android.graphics.drawable.RippleDrawable cannot be cast to android.graphics.drawable.StateListDrawable 

    at the following line

    StateListDrawable gradientDrawable = (StateListDrawable) view.getBackground(); 

    This wasn't happening before attempting to migrate where the view was

    android.support.v7.widget.AppCompatImageButton 

    but now that its

    androidx.appcompat.widget.AppCompatImageButton 

    it doesn't work

    this is the XML for the view in question

    <androidx.appcompat.widget.AppCompatImageButton android:id="@+id/view" android:layout_width="@dimen/bottomSheetPeekHeight" android:layout_height="@dimen/bottomSheetPeekHeight" android:layout_alignTop="@+id/dataEditorValueLayouts" android:layout_alignBottom="@+id/dataEditorValueLayouts" android:layout_marginEnd="@dimen/small_pad" android:scaleType="fitCenter" android:padding="@dimen/small_pad" app:srcCompat="@drawable/download" android:tint="@color/white" android:layout_toEndOf="@+id/dataEditorValueLayouts" style="@style/Button" android:visibility="visible" /> 

    and here is the background defined in the style

    <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"> <shape android:shape="oval"> <solid android:color="@color/faBlue" /> <stroke android:color="@color/button_border" android:width="3px" /> </shape> </item> <item> <shape android:shape="oval"> <solid android:color="@android:color/transparent" /> <stroke android:color="@color/button_border" android:width="3px" /> </shape> </item> </selector> 

    Edit

    The style is

    <style name="Button" parent="ButtonParent">
    <item name="background">@drawable/button\_style\_runtime</item>
    </style>

    Also this is where the offending area of code is happening

    StateListDrawable gradientDrawable = (StateListDrawable) view.getBackground();
    if (gradientDrawable != null) {
    DrawableContainer.DrawableContainerState
    drawableContainerState
    = (DrawableContainer.DrawableContainerState) gradientDrawable.getConstantState();

    where the view in question is an AppCompatImageView and its background is RippleDrawable

    submitted by /u/saintGoku
    [link] [comments]

    Rant - it took me over a year to finally get my app to this state.

    Posted: 07 Mar 2020 04:14 PM PST

    I'd like to buy testing devices, suggestions?

    Posted: 08 Mar 2020 04:41 AM PDT

    I'd like to get couple of cheap devices for testing purposes. You guys have any suggestion on what should I get?

    Like, I suppose I'd want to have API21 device, small screen older device, latest API device, tablet.

    submitted by /u/QuestofTHeChosenOne
    [link] [comments]

    I created the Particle Clock using Jetpack Compose (source in comments!)

    Posted: 07 Mar 2020 10:03 AM PST

    I want to make an app (That have map, with various pin points that users can create and some info on the pinpoints that i can only approve) Should i learn how to code, how long it will take me to learn to make such app. Or should i just pay someone to make the app?

    Posted: 08 Mar 2020 09:11 AM PDT

    Hi all I wanted to make an app (That have a map, with various pinpoints that users can create and some info on the pinpoints that only i/admin can approve) Should i learn how to code, how long it will take me to learn to make such app? Or should i just pay someone to make the app?

    Design and description of my dream app

    What would you guys recommend me to learn how to code (How long will it take me? on average) Do you have many some valuable tutorials or sources on such app? Or should i just pay someone on fiver or somewhere to create me such application for android?

    Thank you for the help!

    submitted by /u/-i3arty-
    [link] [comments]

    Workmanager `setRequiresCharging(true)` not triggered untill battery level reaches 100%

    Posted: 07 Mar 2020 08:55 PM PST

    [Twitter4J] For the past couple of days I have been trying to append the data I get from the function into a TextView. I have tried tonnes of things online but none work, Does anyone know how I can come across to solve this would be a big help!

    Posted: 08 Mar 2020 08:08 AM PDT

    public class MainActivity extends AppCompatActivity {

    @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public static void main(String[] args) throws TwitterException { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey("") .setOAuthConsumerSecret("") .setOAuthAccessToken("") .setOAuthAccessTokenSecret(""); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = tf.getInstance(); ArrayList<String> statusArrayList = new ArrayList<String>(); List<Status> statuses = twitter.getHomeTimeline(); statusArrayList.clear(); System.out.println("Showing home timeline."); for (Status status : statuses) { statusArrayList.add(status.toString()); System.out.println(statusArrayList); } } 

    }

    submitted by /u/powerpuffboi98
    [link] [comments]

    Is it possible to make a Metafilter app?

    Posted: 08 Mar 2020 07:53 AM PDT

    I'd love a basic app that reads/posts to Metafilter. At the moment, I'm faking it with Anker. Is there some API restriction or something that has prevented this from happening?

    submitted by /u/DoublesDownBigTime
    [link] [comments]

    Why am i still gettting this BS error even though i have everything installed

    Posted: 08 Mar 2020 06:41 AM PDT

    Aloha , i was finally able to install android studio and the SDK , but when i run flutter doctor

    i still get this error ? and i cant seem to find out how to fix it , so flutter know where to look or something...

    [✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)

    [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)

    ✗ Android SDK file not found:

    /home/rootz/android-sdk/build-tools/28.0.3/aapt.

    [!] Android Studio (not installed)

    [✓] VS Code (version 1.42.1)

    i searched everywhere and no solution. any help ?

    submitted by /u/Crypto_Rootz
    [link] [comments]

    how I get started with android development in 2020?

    Posted: 08 Mar 2020 05:53 AM PDT

    Some of this subreddit's wiki content seems to have dated APIs and patterns.

    Then, thought about checking these two udacity classes or maybe this channel's content, but, now, I'm just worried about studying outdated information.

    Could y'all help me with tips or point me in a right direction on where to get started with native development? I'll seriously appreciate your input and don't really know which place is the right one to ask this question. Thanks in advance :[

    submitted by /u/LoonyMessiah
    [link] [comments]

    Paid vs Ad supported apps

    Posted: 08 Mar 2020 05:30 AM PDT

    I have an app with adverts in, and a paid version which is exactly the same but no adverts. I have loads of people downloading the free ad-supported one, but even at less the $2 NOBODY buys it! I considered making my adverts show more regularly, but decided against it in case it meant fewer downloads - sometimes you just can't win!

    JumblyApps

    submitted by /u/JumbyApps
    [link] [comments]

    How are apps that contain a lot of information created and maintained?

    Posted: 08 Mar 2020 05:05 AM PDT

    For example with let's say a library app. There are a lot of books and you have to have the summaries, authors, who has it on hold, etc. all on the app and new books are added as well. But is all of that done by scratch or is there a way to have the information be auto added and layout by itself?

    submitted by /u/sigmaclover
    [link] [comments]

    Think before using BuildConfig.DEBUG

    Posted: 07 Mar 2020 12:11 PM PST

    Spoof device specs for Kinemaster

    Posted: 08 Mar 2020 03:48 AM PDT

    I use Kinemaster on my phone to edit video, but due to my devices relatively low specs (Moto g5s plus), the app only allows me to edit videos 720p or below

    How can I spoof my devices specs for this app to pretend to be a device with higher specs?

    submitted by /u/Jeff-with-a-ph
    [link] [comments]

    With Fabric shutting down on March 31st, what's the best alternative?

    Posted: 07 Mar 2020 02:35 PM PST

    I'm looking for something similar to Fabric where by I view a combination of analytics, crash information and also log custom events for individual apps.

    I've tried using Firebase but I don't like their UX and was wondering if there was any other alternatives?

    submitted by /u/stoneslfc
    [link] [comments]

    adb backup restore stuck on se.dirac.acs

    Posted: 07 Mar 2020 08:12 PM PST

    I had backed up all my files/apps using adb backup earlier but now when i try to restore the backup, it gets stuck on se.dirac.acs indefinitely and doesn't let me restore. I have tried android backup extractor to unpack the backup, delete se.dirac.acs then repack it but that just instantly stops the backup restore :/

    Any help would be greatly appreciated

    submitted by /u/deathescaped
    [link] [comments]

    How to fix the Duplicate class when using a Unity Project with admob as a module or library?

    Posted: 07 Mar 2020 07:15 PM PST

    How to fix the Duplicate class when using a Unity Project with admob as a module or library in a native android project?

    I'm having this error when building a project in android studio.

     Duplicate class androidx.annotation.AnimRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.AnimatorRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.AnyRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.AnyThread found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.ArrayRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.AttrRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.BinderThread found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.BoolRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.CallSuper found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.CheckResult found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.ColorInt found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.ColorLong found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.ColorRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.DimenRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.Dimension found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.DrawableRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.FloatRange found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.FontRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.FractionRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.GuardedBy found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.HalfFloat found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.IdRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.IntDef found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.IntRange found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.IntegerRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.InterpolatorRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.Keep found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.LayoutRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.LongDef found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.MainThread found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.MenuRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.NavigationRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.NonNull found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.Nullable found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.PluralsRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.Px found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RawRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RequiresApi found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RequiresFeature found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RequiresPermission found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RequiresPermission$Read found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RequiresPermission$Write found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RestrictTo found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.RestrictTo$Scope found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.Size found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.StringDef found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.StringRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.StyleRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.StyleableRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.TransitionRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.UiThread found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.VisibleForTesting found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.WorkerThread found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.annotation.XmlRes found in modules androidx.annotation.annotation-1.0.0.jar (androidx.annotation.annotation-1.0.0.jar) and annotation-1.1.0.jar (androidx.annotation:annotation:1.1.0) Duplicate class androidx.arch.core.internal.FastSafeIterableMap found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$AscendingIterator found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$DescendingIterator found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$Entry found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$IteratorWithAdditions found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$ListIterator found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.internal.SafeIterableMap$SupportRemove found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.arch.core.util.Function found in modules androidx.arch.core.core-common-2.0.0.jar (androidx.arch.core.core-common-2.0.0.jar) and core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) Duplicate class androidx.collection.ArrayMap found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.ArrayMap$1 found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.ArraySet found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.ArraySet$1 found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.CircularArray found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.CircularIntArray found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.ContainerHelpers found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.LongSparseArray found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.LruCache found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections$ArrayIterator found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections$EntrySet found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections$KeySet found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections$MapIterator found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.MapCollections$ValuesCollection found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.SimpleArrayMap found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.collection.SparseArrayCompat found in modules androidx.collection.collection-1.0.0.jar (androidx.collection.collection-1.0.0.jar) and collection-1.1.0.jar (androidx.collection:collection:1.1.0) Duplicate class androidx.lifecycle.ClassesInfoCache found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.ClassesInfoCache$CallbackInfo found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.ClassesInfoCache$MethodReference found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.CompositeGeneratedAdaptersObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.FullLifecycleObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.FullLifecycleObserverAdapter found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.FullLifecycleObserverAdapter$1 found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.GeneratedAdapter found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.GenericLifecycleObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.Lifecycle found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.Lifecycle$Event found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.Lifecycle$State found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.LifecycleObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.LifecycleOwner found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.Lifecycling found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.MethodCallsLogger found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.OnLifecycleEvent found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.ReflectiveGenericLifecycleObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) Duplicate class androidx.lifecycle.SingleGeneratedAdapterObserver found in modules androidx.lifecycle.lifecycle-common-2.0.0.jar (androidx.lifecycle.lifecycle-common-2.0.0.jar) and lifecycle-common-2.1.0.jar (androidx.lifecycle:lifecycle-common:2.1.0) 
    submitted by /u/jvt619
    [link] [comments]

    Need help making a schedule dropdown list (spinner)

    Posted: 07 Mar 2020 05:53 PM PST

    Need help making a schedule dropdown list (spinner)

    Hey guys,

    So I'm working on an app that shows restaurants and I wanted to know, how can I do something like google did when you are looking at a restaurant and you want to see their schedule.

    https://preview.redd.it/vo7eanxztcl41.png?width=292&format=png&auto=webp&s=e27c88128c6e2225f54e032873fced2477dd25b7

    https://preview.redd.it/gbi4i2w2ucl41.png?width=395&format=png&auto=webp&s=066a57da19bfb408e2989c7865799fb676e0b8f4

    Want I want to know is:

    1) Are they using something like a linear layout (horizontal) with an image (for the clock icon) and a spinner

    2) Assuming they are using a spinner, how are they populating it? How are they formatting it?

    Thanks for your time!

    submitted by /u/xFeedback
    [link] [comments]

    Raw file path access in Android 11

    Posted: 07 Mar 2020 09:35 AM PST

    I have the following question about raw file path access with Android 11:

    1. Can we read and write from and to non-app specific directories using raw file path access in API 30, if these paths are obtained from the MediaStore? (Writing so that the files aren't deleted when the app is uninstalled and can be accessed from the MediaStore in other apps)

    Frankly the documentation is clear as mud, and the Feature Flag to test it isn't available in the emulator as described in the documentation (UPDATE: It can be used on the non Google Play versions of the emulator).

    For example in the blurb at https://developer.android.com/preview/privacy/storage mentions only read access in the paragraph

    "Starting in Android 11, apps that have the

    READ_EXTERNAL_STORAGE 

    permission can read a device's media files using direct file paths and native libraries. This new capability allows your app to work more smoothly with third-party media libraries."

    However in the caution, we are told that writing will be slower, so I guess writing can be done as well:

    "Caution: Your app's performance is slightly reduced when saving media files using direct paths and native libraries. Whenever possible, use the

    MediaStore 

    APIs instead."

    submitted by /u/oneday111
    [link] [comments]

    Need help with Android tablet - finding, optimizing one

    Posted: 07 Mar 2020 04:57 PM PST

    I'm working on a project and I need help with/advice for two things, mainly:

    First, I need to find a cheap Android tablet. No, not the "best cheap tablet", just the cheapest one to suit my needs. I'm working on a project right now and I need to buy a tablet to run a single app. For reference, I'm considering this Android tablet from Walmart for $30 (1 GB RAM, 1.2 GHz Quad Core Processor). Would this work fine, or would there be issues with running the app? All I'm doing on the app is connecting to an Arduino Bluetooth module and maybe displaying video feed from a camera.

    Second, is it possible to optimize an Android device to specifically run an app? Since all I'm doing on the tablet is running this one app, is there a way to make the tablet pour all of its resources into this app and staying cool? Or is that done just by removing all most of the stock apps and turning off push notifications or whatever?

    Thanks in advance.

    submitted by /u/hamzwe55
    [link] [comments]

    Help(build pc for android development)

    Posted: 07 Mar 2020 10:25 AM PST

    I'm building a new PC for developing apps in Android Studio (on Linux OS) what is the best choice ryzen 7 3700x or intel i7 9700k?

    submitted by /u/AbdMustapha
    [link] [comments]

    Recyclerview swaping items

    Posted: 07 Mar 2020 01:12 PM PST

    Hello devs,

    Is there a way to get items from recyclerview, but not using adapter.getCurrentList()? My custumer wants to have an option in recyclerview which allows to swap items to desired position. I have to save that custom order so when the app gets destroyed and reopened it keeps that custom order. The problem which I have is that when items are swaped by user, calling adapter.getCurrentList() wont give me the current order of items in recyclerview. Is there a way to get order of items like they are shown in recyclerview?

    submitted by /u/predatorsss
    [link] [comments]

    How can I constantly invoke a method?

    Posted: 07 Mar 2020 01:01 PM PST

    A simple function, when the accelerometer reaches a certain angle, change the image.

    I moved my accelerometer listener to a Bound Service class because I wanted it to run without having the application be open, and also because I need to know when the phone is at any certain angle.

    I got it to work, it runs when I press the "start" button in the Main Activity, and I also have a method that reads a Boolean from the service class for if the angle is more, or less the 90 degrees.

    Here's my issue.

    When I click the button, the image gets updated only once, I have to keep clicking it for it to update.

    How can I make it so that it constantly updates just like for the accelerometer EvenListener.

    Is there a listen for the image view that can constantly checks if the boolean has changed?

    Thank you.

    submitted by /u/CrunchyMind
    [link] [comments]

    I've been doing Android Dev for about a year now and I still can't figure out this question about BottomNavigationView

    Posted: 07 Mar 2020 12:11 PM PST

    Does Instagram's BottomNavigationView use Activities or Fragments?

    Sometimes I think they're using Activities and disabling the activity transition animation. Sometimes I think they're using Fragments and is just managing the visibility state with hide/show.

    Someone pls put an end to this lingering question for me

    submitted by /u/sscarcano
    [link] [comments]

    No comments:

    Post a Comment