Sample Page
- selector{
- –btn-width: 180px;
- –btn-height: 50px;
- –btn-background: #0e1538;
- –left-gradient: #F803F8;
- –right-gradient: #03F2FD;
- }
- selector a {
- position: relative;
- width: var(–btn-width);
- height: var(–btn-height);
- }
- selector a:before,
- selector a:after {
- content: ”;
- position: absolute;
- inset: 0;
- transition: 0.5s;
- }
- selector a:nth-child(1):before,
- selector a:nth-child(1):after {
- background: linear-gradient(45deg,var(–left-gradient),var(–btn-background),var(–btn-background),var(–right-gradient));
- }
- selector a:hover:before {
- inset: -3px;
- }
- selector a:hover:after {
- inset: -3px;
- filter: blur(10px);
- }
- selector a span {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: var(–btn-background);
- z-index: 10;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- }
<span;>mywebView=(WebView) findViewById(R.id.webview);
<span;>mywebView.setWebViewClient(new WebViewClient());
<span;>mywebView.loadUrl(“<span;><span;>https://www.example.com/<span;>”);
<span;>WebSettings webSettings=mywebView.getSettings();
<span;>webSettings.setJavaScriptEnabled(true);
public class mywebClient extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view,url,favicon);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
@Override
public void onBackPressed() {
if (mywebView.canGoBack()) {
mywebView.goBack();
} else {
super.onBackPressed();
}
}
<?xml version=”1.0″ encoding=”utf-8″?>
<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent”>
<WebView
android:id=”@+id/webview”
android:layout_width=”match_parent”
android:layout_height=”match_parent” />
</RelativeLayout>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.example.webviewexample”>
<application
android:allowBackup=”true”
android:icon=”@mipmap/ic_launcher”
android:label=”@string/app_name”
android:roundIcon=”@mipmap/ic_launcher_round”
android:supportsRtl=”true”
android:theme=”@style/Theme.WebViewExample”>
<activity android:name=”.MainActivity”>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>
</activity>
</application>
<uses-permission android:name=”android.permission.INTERNET” />
</manifest>
;;;;;;;;
package com.example.webviewexample;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = findViewById(R.id.webview);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true); // Enable JavaScript if needed
webView.setWebViewClient(new WebViewClient()); // Use WebViewClient to handle redirects within the WebView
webView.loadUrl(“https://jamiichek.com”);
}
}
<?xml version=”1.0″ encoding=”utf-8″?>
<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent”>
<WebView
android:id=”@+id/webView”
android:layout_width=”match_parent”
android:layout_height=”match_parent” />
</RelativeLayout>
Dfggggggghhhjjnvbvvvvv
<?xml version=”1.0″ encoding=”utf-8″?>
<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent”>
<WebView
android:id=”@+id/webView”
android:layout_width=”match_parent”
android:layout_height=”match_parent” />
<Button
android:id=”@+id/btnBack”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”Back”
android:layout_alignParentBottom=”true”
android:layout_alignParentStart=”true”
android:layout_margin=”16dp” />
<Button
android:id=”@+id/btnForward”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”Forward”
android:layout_alignParentBottom=”true”
android:layout_alignParentEnd=”true”
android:layout_margin=”16dp” />
</RelativeLayout>
package com.example.yourappname
import android.os.Bundle
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val webView: WebView = findViewById(R.id.webview)
// Enable JavaScript (if required by the website)
val webSettings: WebSettings = webView.settings
webSettings.javaScriptEnabled = true
// Set a WebViewClient to handle page navigation within the app
webView.webViewClient = WebViewClient()
// Load the website
webView.loadUrl(“https://jamiichek.com”)
}
}