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

dev android studio .setvisibility not working

hi i have an annoying problem with my application
i added a gif image using the droidondroids GifView and with that a seekbar i wanted either to change the ressource of the gif image according to the seek bar no luck goff.setvisibility(View.GONE/VISIBLE/INVISIBLE) not working the first it works but none after it i have a func named gifs()


Java:
void gifs(){
        if((int)(Ws) < 10){
            goff.setVisibility(View.GONE);    // cutta gifview
            ES1.setVisibility(View.VISIBLE);  // android-gif-drawable
            Log.d("gifs","   "+goff.getVisibility() +"   ora "+goff.getGifResource());

        }else{
            goff.setVisibility(View.VISIBLE);
            ES1.setVisibility(View.GONE);
            Log.d("gifs","   "+goff.getVisibility() +"   ora "+goff.getGifResource());

        }
     

    }
i have the Ws value from the seekbar onstopTracking() and the func gifs() there too
as you can see i'm logging with Log.d and the .getVisibility() is returning that the goff is changing value but nothing on the UI

i also tried with maybe goff.setGifResource(R.drawable.es6);

my goal is to show
1-either multiple gifs but one at a time (gifs with different speed )
2- the same view but change the ressource to multiple gifs speeds


here is the code and declarations


Java:
public  class MainActivity extends AppCompatActivity {
    public static pl.droidsonroids.gif.GifTextView giff,ES1,ES2,ES3,ES4,ES5,ES6;
    public static GifView goff;
    public static byte Ws;
    public  SeekBar temp ;     

        protected void onCreate(Bundle savedInstanceState) {
        SD=0;
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
        ES1 = findViewById(R.id.es1);
        ES2 = findViewById(R.id.es2);
        ES3 = findViewById(R.id.es3);
        ES4 = findViewById(R.id.es4);
        ES5 = findViewById(R.id.es5);
        ES6 = findViewById(R.id.es6);
        goff = (GifView) findViewById(R.id.gif1);
        ES1 = (pl.droidsonroids.gif.GifTextView) findViewById(R.id.es1);

     
        temp= findViewById(R.id.tBar);
        temp.setProgress(1);
     

        temp.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            [USER=1021285]@override[/USER]

         public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                progressChangedValue = progress;
                T[0]=(byte)progressChangedValue;
                Ws=(byte)progressChangedValue;
                tmp.setText(T[0]+" º");
                //graphsInit();
                //CriticalPointUpdate();
                D1[1]=progressChangedValue;
            }

            [USER=1021285]@override[/USER]
            public void onStartTrackingTouch(SeekBar seekBar) {
            }

            [USER=1021285]@override[/USER]
            public void onStopTrackingTouch(SeekBar seekBar) {
                Ws=(byte)progressChangedValue;
                gifs();
                D1[1]=progressChangedValue;
                T[0]=(byte)progressChangedValue;
                //graphsInit();
                //CriticalPointUpdate();
                D1[1]=progressChangedValue;
                Intent intent = new Intent(MainActivity.this, send.class);
                startActivity(intent);
                if(buffered[1]==1){
                    vp1=buffered[3]*256+buffered[4];
                    //Log.d("vp","vp1 = "+vp1+"   ");
                }


            }
        });

        try {
            /* Open the serial port */
            mSerialPort = new SerialPort(new File("/dev/ttyS2"), 9600, 0);
            mOutputStream = mSerialPort.getOutputStream();
            mInputStream = mSerialPort.getInputStream();

            mBuffer = new byte[128];
            /* Create a receiving thread */
            mReadThread = new ReadThread();/* Create a serial port receiving program */
            mReadThread.start();

        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    }

i removed other parts of the code because they are for other function like plotting and serial Comms


XML of goff and ES1

HTML:
<com.cunoraz.gifview.library.GifView
>     android:id="@+id/gif1"
>     android:layout_width="wrap_content"
>     android:layout_height="wrap_content"
>     android:visibility="visible"
>     android:layout_marginLeft="710dp"
>     android:layout_marginTop="30dp"
>     app:gif="[USER=22138]@Mipmap[/USER]/cuno" />
>
> <pl.droidsonroids.gif.GifTextView
>     android:id="@+id/es1"
>     android:layout_width="250dp"
>     android:layout_height="500dp"
>     android:layout_marginLeft="710dp"
>     android:layout_marginTop="30dp"
>     android:visibility="invisible"
>     android:drawableStart="@drawable/es1" />

WTH, Firefox will not uninstall just disable

Dragging the icon on your screen isn't going to uninstall the app, all that does is remove the icon from that screen. The app itself is till installed. As @Dannydet commented on, you need to go into the Settings >> Apps menu, find the Firefox app listing and open it, then tap on the Uninstall button. A more thorough removal is to use Clear data first, then tap on the Uninstall button. Using Clear data will remove all the app's settings and config files, and the app's cache.

creating URL on tablet startscreen

Thanks for reaction. Tablet is rather old (Samsung Tab S2) and Android 7.
Can you check whether it is possible to have a startscreen link with the following URL:
https://news.google.com/topstories?hl=de&gl=DE&ceid=DE:de
It should give German news.
In my case it changes to Dutch news (tablet language is Dutch).
Another example is:
https://aquaforum.nl/forums/vijvers.35/
The startscreen link does not directly give the "vijvers" page but leads to the homepage.
I am curious whether it might be possible now with higher Android versions.

Keeps Booting into recovery.

how did you flash a custom rom without twrp? what rom was it? if you can get to download mode you can use odin to flash a firmware update specific to your phone. go to https://www.sammobile.com/firmwares/ to get the firmware and odin to flash the update. instructions will be provided by the site on how to use odin.

once you get a working phone again....you need to slow down and read as much as you can about twrp and how to use it as well as the custom rom you want.

and the very first thing once you get twrp installed make sure to do a nandroid backup.....save it to your sd card and keep a copy of it on your pc.

Doogee N20pro TEE/Google key not write

do you have a custom recovery? if so did you make a nandroid backup? was the rom you flashed made for your phone?
no i could not flash any custom recovery thats why full backup was too difficult to make, therefore i have proceed flashing GSI with just stock rom as backup downloaded from web.

I need extracted nvram from Doogee n20 pro and attestation key.

Help Notifications not shown anymore when display off

I don't have this device, but I'd check your always on display settings (also called Ambient Display) or lock screen (which, on my Pixel running Android 11, is where this stuff is now rather than in a separate place).

But I'm not expert on this: I decided that I didn't care for always on displays (and that the little icons weren't much use to me) and turned it off 4 years ago. But my phone is old enough that I still have a notification LED, which I always found more useful but which manufacturers have decided we no longer want (and, as is often the case, have all followed each other so there is no choice in this available any more).

Filter

Back
Top Bottom