Use view binding in DownloadActivity.
This commit is contained in:
parent
4545b8e92d
commit
a65ed7e914
|
@ -9,10 +9,10 @@ import android.view.ViewTreeObserver;
|
||||||
|
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
import org.schabi.newpipe.R;
|
import org.schabi.newpipe.R;
|
||||||
|
import org.schabi.newpipe.databinding.ActivityDownloaderBinding;
|
||||||
import org.schabi.newpipe.util.DeviceUtils;
|
import org.schabi.newpipe.util.DeviceUtils;
|
||||||
import org.schabi.newpipe.util.ThemeHelper;
|
import org.schabi.newpipe.util.ThemeHelper;
|
||||||
import org.schabi.newpipe.views.FocusOverlayView;
|
import org.schabi.newpipe.views.FocusOverlayView;
|
||||||
|
@ -35,11 +35,14 @@ public class DownloadActivity extends AppCompatActivity {
|
||||||
|
|
||||||
assureCorrectAppLanguage(this);
|
assureCorrectAppLanguage(this);
|
||||||
ThemeHelper.setTheme(this);
|
ThemeHelper.setTheme(this);
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_downloader);
|
|
||||||
|
|
||||||
final Toolbar toolbar = findViewById(R.id.toolbar);
|
super.onCreate(savedInstanceState);
|
||||||
setSupportActionBar(toolbar);
|
|
||||||
|
final ActivityDownloaderBinding downloaderBinding =
|
||||||
|
ActivityDownloaderBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(downloaderBinding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(downloaderBinding.toolbarLayout.toolbar);
|
||||||
|
|
||||||
final ActionBar actionBar = getSupportActionBar();
|
final ActionBar actionBar = getSupportActionBar();
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include layout="@layout/toolbar_layout" />
|
<include
|
||||||
|
layout="@layout/toolbar_layout"
|
||||||
|
android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/frame"
|
android:id="@+id/frame"
|
||||||
|
|
Loading…
Reference in New Issue