I would like to put this iframe on my Android application, but I don't know how to do it. Can anyone help?
string html = <iframe src = "http://www.flightradar24.com/simple_index.php?lat=43.8&lon=-79.4&z=8" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding-top:56px; overflow:hidden;"</iframe>"
Por agora, o meu fragment só tem isto:
package esan.ds.pm.flynow.ui.explore;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import esan.ds.pm.flynow.R;
public class ExploreFragment extends Fragment {
private ExploreViewModel exploreViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
exploreViewModel =
ViewModelProviders.of(this).get(ExploreViewModel.class);
View root = inflater.inflate(R.layout.fragment_explore, container, false);
final TextView textView = root.findViewById(R.id.text_explore);
exploreViewModel.getText().observe(this, new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
}
Thanks for your help!