0

I would like to make an app, that shows a part of the site. Lets say that i have this site:

I only want to show this: https://mail.google.com/mail/?ui=2&ik=d5146163e8&view=att&th=132496ec47863fea&attid=0.1&disp=inline&realattid=f_gsbtyog80&zw Is there anyway to do this?

I hope some of you could help me.

Gaauwe

2 Answers 2

1

You could load the url to a WebView and then set the WebView's scroll position and zoom level to display only a specific part of the web page. If you don't want to change zoom level you could initially scroll the WebView to the required location and then override the WebView's onTouch method so that it will only scroll upto the required cordinates.

public class MyWebViewActivity extends Activity implements PictureListener{ private WebView webView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.webview); webView = (WebView)findViewById(R.id.webView1); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new MyWebViewClient()); webView.setPictureListener(this); // disable scroll on touch webView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { return (event.getAction() == MotionEvent.ACTION_MOVE); } }); webView.loadUrl(url); } @Override public void onNewPicture(WebView view, Picture picture) { // TODO Auto-generated method stub webView.scrollTo(x, y); } } 
Sign up to request clarification or add additional context in comments.

Comments

0

One of the way is to use PHP on your own server and CURL the webpage into it and strip out all the unnecessary things .

After that you only load it into your webview. *This is one of the method, there are others method better then this. *

Another way is coldfusion cfhttp .. not sure,about this http://www.quackit.com/coldfusion/tutorial/coldfusion_http.cfm

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.