-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First step for #1318: Create initial New Tab page that has Wolvic log…
…o and add an option in Display Settings to set New Tab page as homepage This should be released when all the steps have been done and #1318 is closed.
- Loading branch information
Showing
15 changed files
with
333 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/src/common/shared/com/igalia/wolvic/ui/views/NewTabView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.igalia.wolvic.ui.views; | ||
|
||
import android.annotation.SuppressLint; | ||
import android.content.Context; | ||
import android.view.LayoutInflater; | ||
import android.widget.FrameLayout; | ||
|
||
import androidx.databinding.DataBindingUtil; | ||
|
||
import com.igalia.wolvic.R; | ||
import com.igalia.wolvic.VRBrowserActivity; | ||
import com.igalia.wolvic.databinding.NewTabBinding; | ||
import com.igalia.wolvic.ui.widgets.WidgetManagerDelegate; | ||
|
||
public class NewTabView extends FrameLayout { | ||
|
||
private WidgetManagerDelegate mWidgetManager; | ||
|
||
private NewTabBinding mBinding; | ||
|
||
public NewTabView(Context context) { | ||
super(context); | ||
initialize(); | ||
} | ||
|
||
protected void initialize() { | ||
mWidgetManager = ((VRBrowserActivity) getContext()); | ||
updateUI(); | ||
} | ||
|
||
@SuppressLint("ClickableViewAccessibility") | ||
public void updateUI() { | ||
removeAllViews(); | ||
|
||
LayoutInflater inflater = LayoutInflater.from(getContext()); | ||
|
||
mBinding = DataBindingUtil.inflate(inflater, R.layout.new_tab, this, true); | ||
mBinding.setLifecycleOwner((VRBrowserActivity)getContext()); | ||
|
||
mBinding.executePendingBindings(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.