Please apologise me for doing this probably silly question but im working on eclipse only for 2 days and i dont want to mess this up.
I downloaded an Webview_sample project source code from:
SITE: https://dev.tscolari.me/2011/09/19/android-webapp-in-3-minutes/
SOURCE CODE: https://github.com/tscolari/android-webview-sample-app/downloads
I worked on this all day and finally put it to work just like i wanted it, but theres a new problem now that i cant figure it out because im having all kind of errors because i want to change the entire eclipse project files and code to my future app names because the project is not already the same and would be even more modified in the future (already tried refactor, find & replace and i always get erros i cant understand).
I can show you what i want if i started to create the project as “New” and not as “Existing” in some screens:



Getting this:

And at the moment i have this:

So the files coded that i have are this:
AndroidMobileAppSampleActivity.java:
package tscolari.mobile_sample;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class AndroidMobileAppSampleActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
WebView mainWebView = (WebView) findViewById(R.id.mainWebView);
WebSettings webSettings = mainWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mainWebView.setWebViewClient(new MyCustomWebViewClient());
mainWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
mainWebView.loadUrl("http://www.mutesoft.com");
}
private class MyCustomWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tscolari.mobile_sample"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".AndroidMobileAppSampleActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And thats it..
Basically the “AndroidMobileAppSampleActivity”, “tscolari.mobile_sample”, “” and etc are making my life miserable.
If someone could help me on this it would be great because my head is about to explode.
just do this
copy
AndroidMobileAppSampleActivityin your new packageyour.new.package.name. and replace first linepackage tscolari.mobile_sample;withpackage your.new.package.name;and then copy
main.xmlfrom layout folder into the layout folder of new project.Last but not the least
add these lines in the
Manifestfile