• 21-10-2023, 05:58:53
    #1
    Arkadaşlar merhaba, web sitesini, mobil uygulamaya çevirmeye çalıştım fakat şu şekilde boşluklar kalıyor, yardımcı olabilir misiniz?
    package com.example.myapplication;
    
    import androidx.appcompat.app.AppCompatActivity;
    
    import android.os.Bundle;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
    
    public class MainActivity extends AppCompatActivity {
    
    WebView webView;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
    bagla();
    yukle();
    
    webView.setWebViewClient(new WebViewClient());
    }
    
    public void bagla(){
    webView = findViewById(R.id.web);
    }
    
    public void yukle(){
    webView.loadUrl("https://www.x.org");
    webView.getSettings().setJavaScriptEnabled(true);
    
    }
    }
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools">
    
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    
    
        <application
            android:allowBackup="true"
            android:dataExtractionRules="@xml/data_extraction_rules"
            android:fullBackupContent="@xml/backup_rules"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_names"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/Theme.MyApplication"
            tools:targetApi="31">
            <activity
                android:name=".MainActivity"
                android:exported="true">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>
    <?xml version="1.0" encoding="utf-8"?>
    <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
        <WebView
            android:id="@+id/web"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    
    </androidx.constraintlayout.widget.ConstraintLayout>

    Tarayıcı Görseli

    Uygulama Görseli
  • 21-10-2023, 08:52:51
    #2
    3. kod bloğunda webview alanını aşağıdaki ile güncellemeyi deneyin

    <WebView
    android:id="@+id/web"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent" />



    Eğer olmazsa aşağıda ki kod zaten tam ekran yapmak için ama gördüğüm kadarıyla bu kod olmasına rağmen boşluk var bende pek bilgili değilim kendimce araştırdım yukarda ki kod işinize yarar diye düşünüyorum.
    <WebView
    android:id="@+id/web"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
  • 21-10-2023, 19:00:21
    #3
    Misafir adlı üyeden alıntı: mesajı görüntüle
    3. kod bloğunda webview alanını aşağıdaki ile güncellemeyi deneyin

    <WebView
    android:id="@+id/web"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent" />



    Eğer olmazsa aşağıda ki kod zaten tam ekran yapmak için ama gördüğüm kadarıyla bu kod olmasına rağmen boşluk var bende pek bilgili değilim kendimce araştırdım yukarda ki kod işinize yarar diye düşünüyorum.
    <WebView
    android:id="@+id/web"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
    yok hocam yine aynı şekilde boşluk kalıyor, yine de yardım etmeye çalıştığınız için teşekkür ederim