Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
How to hide div element in android web view (Android Studio)

This is my code -

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        webView = findViewById(R.id.webview);
        webView.setWebViewClient(new WebViewClient());
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadUrl("http://dsal.uchicago.edu/dictionaries/candrakanta/");

    }
    @Override
    public void onBackPressed()
    {
        if(webView.canGoBack())
        {
            webView.goBack();
        }
        else
        {
            super.onBackPressed();
        }
    }
}

****I want to hide this-

<div id="responsive_dico_info">

Please Help how to hide the above div element when the url load, I already tried many type of solution but not worked that is why I decided to post the question here. I think I will get the right answer here. Thank you in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can try these options :

In your XML file:

android:visibility="gone" <-- hides
android:visibility="visible" <-- makes it visible

Or in java file:

textView.setVisibility(View.GONE);//makes it disappear
textView.setVisibility(View.VISIBLE);//makes it visible again

Source: https://www.codegrepper.com/code-examples/java/hide+elements+android

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!