• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps What is the difference android and androidx

Hai i just learn about android developement, why i can't add despendencies support.
example if i add this despendencies :

implementation 'com.android.support:cardview-v7:28.0.0'

Always out notification:

Version 28 (intended for Android Pie and below) is the last version of the legacy support library, so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward. The IDE can help with this: Refactor > Migrate to AndroidX... less... (Ctrl+F1)

So i must migrate to androidx, and then despendencies change to :

implementation 'androidx.cardview:cardview:1.0.0'

Because if i learn on tutorial, always use android not androidx, but i can't use android despendencies.
Thanks :)

SpannableStringBuilder is clearing formatting!?

hello everybody
i'm learning to program in Java for Android. i'm trying to format text on a TextView using SpannableStringBuilder. but, for some reason, when the code gets to line 42, the first part of the text loses the formatting.
(button is a simple Button and textView is a simple TextView, both defined in activity_main.xml)

Java:
package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.RelativeSizeSpan;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    boolean answer_ison;
    Button button;
    TextView textView;
    SpannableStringBuilder str;
    final RelativeSizeSpan title_span = new RelativeSizeSpan(1.6f);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        answer_ison = true;
        button = findViewById(R.id.button);
        textView = findViewById(R.id.textView);
        str = new SpannableStringBuilder();

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (answer_ison) {
                    str.clear();
                    str.clearSpans();
                    str.append("Question:\n", title_span, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    str.append("The question goes here :)");
                    button.setText("Show Answer");
                    answer_ison = false;
                }
                else {
                    str.append("\n\nAnswer:\n", title_span, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
                    str.append("Aand the answer goes here");
                    button.setText("Next Question");
                    answer_ison = true;
                }
                textView.setText(str);
            }
        });

    }
}

first its like this (its what I expect):
Screenshot_20190714-105219_My Application.jpg

but if I press the button, it seems to clear the the formatting of the first part:
Screenshot_20190714-105222_My Application.jpg

any help is apreciated. thanks in advance!

Sensetive ProgressBar - Retrofit

I want to change the save button to show the download status instantly when the user clicked the "save" button in the image upload process in the Android application. In other words, when the upload is complete, the "save" button will show progress and the okey button will appear when the upload is complete.

What kind of structure do I have to use for this? I've searched, but I guess I'm not a complete solution because I'm a beginner. Do you have a library, video tutorial or a suggestion?

Google drive and game play

I hope i can explain this good !!

But with Google coming out with the *Stadia * for streaming games , I was just wondering if they have made a app for your cell phones to stream your games ?

Like you have the Google Drive ok ..But how about let us us down load games to our google drives and save space on phones , and let us stream from the google drive too!

or is there a app that will let you do this already ?

Or is this just a crazy idea ?

S8 front lens

So...wife dicked her phone. Dropped it and cracked the glass top corner and the bottom corner.

Is this actual glass? I bought an 'original S8 replacement lens' it seems more plastic. But I think it goes down with two sided tape not the glue I've seen on videos. Anyone try this or do it? Looking at the videos I'm less adventurous than when I bought it.

Do places actually replace this as opposed to the whole screen and digitizer? Really dont want to spend 300$ to have it fixed right now.

Looking on your experiences....have you done it?

Help Question about shortcut Wifi Icon

I use my wifi connection 95% of the time. I have no problems with it connecting to my phone and to the internet. Occasionally, the wifi shortcut icon has an exclamation mark in it and I can't find what that means. Everything I've read is about the wifi icon on the notification bar. Mine is on the shortcut and its definitely not that it isn't connected to the internet. I always check my internet connection when that happens and it is fine. Does anyone know what it means?
Thanks in advance,
Screenshot_20190713-205218.png

Help Symphony i95 rooting

I thought _Chinese Manfacted device is easy to route. But I can not root my "Symphony i95" (spreadtrum-Oreo 8.1.0). Because ... the lack of Flashable file and my allergy about "S.P. Flashtool" !!! Do not get device connection even after trying harder ... Is there anyone, who worked with the device?! Please... Work with the device. Thanks.

Screenshot_20190714-031101~2.png

advantage or disadvantage of moving to VZ

I have my pixel2 with FI since it came out. This phone has lot of good stuff that no other phone has, but also some stupid glitches which takes Google for ever to fix, like " mixing up beep and greeting" (fixed for now) or "VM not loading" or "after dialing the call doesn't connect". I'm out of big red for 2 years now and thinking of if joining them these problems won't happen. How about the bloatware they load on the phone? would I have it on my phone when joining them?
thanks

False/Misleading ads becoming commonplace

I have noticed a big increase in the number of ads that are nothing like the game they advertise. I have noticed several latelybwhich are almost exactly the same but with diferent graphics. Yhis is quite annoying to me, anyone else? I wonder is there a wau fir google/facebook/ironsource/etc to start doing something about this, I mean I wont even try anything new anymore because of it. Your thoughts?

The code does not work in the Thread by pressing a button

I'm studying android and stumbled upon a problem! After reading this article in the section Worker Threads: https://developer.android.com/guide/components/processes-and-threads.html
My code
Java:
public void click(View view) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                final TextView t = findViewById(R.id.textView);
                t.setText("Wait...");
                for(int i=0;i<999999;i++)
                    Log.e("test", ""+System.currentTimeMillis());
                t.post(new Runnable() {
                    @Override
                    public void run() {
                        t.setText("Complete");
                    }
                });
            }
        });
    }
Now when I press a button, nothing happens even the text does not change and there are no mistakes. I don’t know what to do, help somebody!

Music player apps not reading SD card

Hi, I have a Nokia 3.1 running Android 9. I have a problem which seemed to start after a recent update...
I have a 128gb SD card with about 45gb of music on it.
Most music player apps don't seem able to read the card properly (the only ones that can read it have really bad user interfaces and limited functions)
Some music player apps can read a few tracks (91 seems to be a common number, I don't know why), others cannot read any.
I know that the card is readble, because the file explorer app can read it and display all the files.
Can anyone help me with this please?
Thanks!

Queries about deep linking

I have the host and prefix name to open an activity from the link. My questions
  1. If the app is not installed can the link be redirected to play store and when we click open in Play Store after downloading can it open the same activity and fetch the link?
  2. What is the difference between using Deep Links given in Android Developers official website and Firebase Dynamic Links?
  3. Is the same concept available for iOS as the link is common for Android and iOS?

Help AndroidTV Access Point

Hello,

I got a AndroidTV connected via Lan and i want a Access Point but the router should set the IP from the connected devices because i want to extend the WLan (same SSID & PW). I search for hours now without any result because it isn't normal that a android device got a Lan port ;)
If i just enable the WLan Hotspot then the internet for the connected devices works fine but they are in a different IP Range. That means that i can't see the connected devices from the routers point of view.

Because the terms are really confusing (at least for me) i have made picture (attachment).
The IP from the "Smartphone 1" need to stay the same after the handover (reserved ip on the gateway/router).
I know cheap Access Points can do this but i want use the hardware that i already got.
Is there any App or setting for this?
(AndroidTV box got root access)

thanks,
Best Regards

derbmann

Attachments

  • network-diagram.png
    network-diagram.png
    36.6 KB · Views: 101

App short name

I want to change the name that appears on an Android device along with the app's launcher icon, but without changing the app name (app_name in strings.xml). Can it be done? I found a thread on SO which was so contradictory as to be useless. For example, I have an app called Conveyancing Quoter, but I want to use just Quoter below the launcher icon but still have Conveyancing Quoter in the title bar.

Is it android:label="@String/app_name" in AndroidManifest.xml that I want to change? I don't want to try it and get in a beggars muddle.

How many home screens do you have?

How many home screens/desktops do you have?

Right now, on this phone, I have 7; I did have it set at 11, but found that unwieldy.

How do you use your desktops? I like my screens completely devoid of ANYTHING; I prefer to look at my live wallpaper, the beautiful and interactive aniPet Koi.

But there are certain things I want quickly accessible, so I have a widget on one screen, app shortcuts on another, but mostly nothing.

So, how do you set yours up?

By the way, we've had multiple desktops in the UNIX/Linux world for five decades. Last I heard, window$ still hadn't copied this feature.

Filter

Back
Top Bottom