mirror of https://github.com/LeOS-GSI/LeOS-Genesis
Bug Fixes
parent
8f0465b0f6
commit
245efd77d6
|
@ -5,10 +5,6 @@
|
||||||
<inspection_tool class="AndroidLintSuspiciousImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="AndroidLintSuspiciousImport" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
|
|
||||||
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<option name="m_reportEmptyBlocks" value="true" />
|
<option name="m_reportEmptyBlocks" value="true" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
@ -22,6 +18,7 @@
|
||||||
<inspection_tool class="InfiniteLoopStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="InfiniteLoopStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="InnerClassMayBeStatic" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="InnerClassMayBeStatic" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="LambdaParameterTypeCanBeSpecified" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
<inspection_tool class="LambdaParameterTypeCanBeSpecified" enabled="false" level="INFORMATION" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="RawUseOfParameterizedType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
|
|
|
@ -16,6 +16,9 @@ import android.widget.ImageView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -51,6 +54,8 @@ public class bookmarkController extends AppCompatActivity
|
||||||
private homeController mHomeController;
|
private homeController mHomeController;
|
||||||
private activityContextManager mContextManager;
|
private activityContextManager mContextManager;
|
||||||
private bookmarkAdapter mbookmarkAdapter;
|
private bookmarkAdapter mbookmarkAdapter;
|
||||||
|
private LinearLayout mHeaderContainer;
|
||||||
|
private TextView mTitle;
|
||||||
|
|
||||||
/*Private Views*/
|
/*Private Views*/
|
||||||
|
|
||||||
|
@ -91,28 +96,19 @@ public class bookmarkController extends AppCompatActivity
|
||||||
mClearButton = findViewById(R.id.pClearButton);
|
mClearButton = findViewById(R.id.pClearButton);
|
||||||
mMenuButton = findViewById(R.id.pMenuButton);
|
mMenuButton = findViewById(R.id.pMenuButton);
|
||||||
mSearchButton = findViewById(R.id.pSearchButton);
|
mSearchButton = findViewById(R.id.pSearchButton);
|
||||||
|
mTitle = findViewById(R.id.pTitle);
|
||||||
|
mHeaderContainer = findViewById(R.id.pHeaderContainer);
|
||||||
|
|
||||||
mbookmarkViewController = new bookmarkViewController(mEmptyListNotification, mSearchInput, mRecycleView, mClearButton,this, mMenuButton, mSearchButton);
|
mbookmarkViewController = new bookmarkViewController(mEmptyListNotification, mSearchInput, mRecycleView, mClearButton,this, mMenuButton, mSearchButton, mHeaderContainer, mTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeList(){
|
public void initializeList(){
|
||||||
ArrayList<bookmarkRowModel> model = (ArrayList<bookmarkRowModel>) dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_GET_BOOKMARK ,null);
|
ArrayList<bookmarkRowModel> model = (ArrayList<bookmarkRowModel>) dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_GET_BOOKMARK ,null);
|
||||||
mbookmarkModel.setList(model);
|
mbookmarkModel.setList(model);
|
||||||
bookmarkAdapter adapter = new bookmarkAdapter(mbookmarkModel.getList(),new adapterCallback(), this);
|
bookmarkAdapter adapter = new bookmarkAdapter(mbookmarkModel.getList(),new adapterCallback(), this);
|
||||||
mbookmarkAdapter = adapter;
|
mbookmarkAdapter = adapter;
|
||||||
adapter.invokeFilter(false);
|
adapter.invokeFilter(false);
|
||||||
mRecycleView.setNestedScrollingEnabled(false);
|
|
||||||
mRecycleView.setHasFixedSize(true);
|
|
||||||
|
|
||||||
mRecycleView.setItemAnimator(new FadeInRightAnimator());
|
|
||||||
Objects.requireNonNull(mRecycleView.getItemAnimator()).setAddDuration(200);
|
|
||||||
mRecycleView.getItemAnimator().setRemoveDuration(200);
|
|
||||||
mRecycleView.getItemAnimator().setMoveDuration(200);
|
|
||||||
mRecycleView.getItemAnimator().setChangeDuration(450);
|
|
||||||
|
|
||||||
mRecycleView.setAdapter(adapter);
|
mRecycleView.setAdapter(adapter);
|
||||||
mRecycleView.setItemViewCacheSize(100);
|
|
||||||
mRecycleView.setDrawingCacheEnabled(true);
|
|
||||||
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
|
||||||
|
|
||||||
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
|
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_UPDATE_LIST_IF_EMPTY, Arrays.asList(mbookmarkModel.getList().size(),0));
|
mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_UPDATE_LIST_IF_EMPTY, Arrays.asList(mbookmarkModel.getList().size(),0));
|
||||||
|
@ -235,14 +231,14 @@ public class bookmarkController extends AppCompatActivity
|
||||||
}else if((Boolean) mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.GET_LONG_SELECTED_STATUS,null)){
|
}else if((Boolean) mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.GET_LONG_SELECTED_STATUS,null)){
|
||||||
onClearMultipleSelection(null);
|
onClearMultipleSelection(null);
|
||||||
}else {
|
}else {
|
||||||
onBackPressed(null);
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*External XML Listeners*/
|
/*External XML Listeners*/
|
||||||
|
|
||||||
public void onBackPressed(View view){
|
public void onBackPressed(View view){
|
||||||
this.finish();
|
onBackPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onHideSearch(View view) {
|
public void onHideSearch(View view) {
|
||||||
|
|
|
@ -10,14 +10,20 @@ import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.view.animation.Transformation;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -31,21 +37,23 @@ class bookmarkViewController
|
||||||
{
|
{
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
|
|
||||||
private ImageView mEmptyListNotification;
|
private ImageView mEmptyListNotification;
|
||||||
private EditText mSearchInput;
|
private EditText mSearchInput;
|
||||||
private RecyclerView mRecycleView;
|
private RecyclerView mRecycleView;
|
||||||
private Button mClearButton;
|
private Button mClearButton;
|
||||||
private ImageButton mMenuButton;
|
private ImageButton mMenuButton;
|
||||||
private ImageButton mSearchButton;
|
private ImageButton mSearchButton;
|
||||||
|
private PopupWindow mPopupWindow = null;
|
||||||
|
private LinearLayout mHeaderContainer;
|
||||||
|
private TextView mTitle;
|
||||||
|
|
||||||
/*Private Local Variables*/
|
/*Private Local Variables*/
|
||||||
private Paint mPainter = new Paint();
|
private Paint mPainter = new Paint();
|
||||||
private PopupWindow mPopupWindow = null;
|
private boolean isClearButtonVisible = true;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
bookmarkViewController(ImageView pEmptyListNotification, EditText pSearchInput, RecyclerView pRecycleView, Button pClearButton,AppCompatActivity pContext,ImageButton pMenuButton,ImageButton pSearchButton)
|
bookmarkViewController(ImageView pEmptyListNotification, EditText pSearchInput, RecyclerView pRecycleView, Button pClearButton,AppCompatActivity pContext,ImageButton pMenuButton,ImageButton pSearchButton, LinearLayout pHeaderContainer, TextView pTitle)
|
||||||
{
|
{
|
||||||
this.mEmptyListNotification = pEmptyListNotification;
|
this.mEmptyListNotification = pEmptyListNotification;
|
||||||
this.mSearchInput = pSearchInput;
|
this.mSearchInput = pSearchInput;
|
||||||
|
@ -54,6 +62,8 @@ class bookmarkViewController
|
||||||
this.mContext = pContext;
|
this.mContext = pContext;
|
||||||
this.mMenuButton = pMenuButton;
|
this.mMenuButton = pMenuButton;
|
||||||
this.mSearchButton = pSearchButton;
|
this.mSearchButton = pSearchButton;
|
||||||
|
this.mHeaderContainer = pHeaderContainer;
|
||||||
|
this.mTitle = pTitle;
|
||||||
|
|
||||||
initPostUI();
|
initPostUI();
|
||||||
}
|
}
|
||||||
|
@ -86,20 +96,21 @@ class bookmarkViewController
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mEmptyListNotification.animate().setDuration(pDuration).alpha(1f);
|
mEmptyListNotification.animate().setDuration(pDuration).alpha(1f);
|
||||||
|
|
||||||
mClearButton.animate().setDuration(pDuration).alpha(0.4f);
|
mSearchButton.setAlpha(0f);
|
||||||
mSearchButton.animate().setDuration(pDuration).alpha(0f);
|
mMenuButton.setAlpha(0f);
|
||||||
mMenuButton.animate().setDuration(pDuration).alpha(0f);
|
|
||||||
|
|
||||||
mClearButton.setEnabled(false);
|
mClearButton.setEnabled(false);
|
||||||
mSearchButton.setClickable(false);
|
mSearchButton.setClickable(false);
|
||||||
mMenuButton.setClickable(false);
|
mMenuButton.setClickable(false);
|
||||||
mSearchInput.setVisibility(View.GONE);
|
mSearchInput.setVisibility(View.GONE);
|
||||||
mClearButton.setAlpha(0f);
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
mClearButton.animate().setDuration(300).alpha(1);
|
|
||||||
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mClearButton.setText(strings.BOOKMARK_NO_BOOKMARK_FOUND);
|
mClearButton.setText(strings.BOOKMARK_NO_BOOKMARK_FOUND);
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
|
|
||||||
|
mClearButton.getLayoutParams().height = 0;
|
||||||
|
mClearButton.requestLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +124,11 @@ class bookmarkViewController
|
||||||
private void onSelectionMenu(boolean pStatus){
|
private void onSelectionMenu(boolean pStatus){
|
||||||
if(!pStatus){
|
if(!pStatus){
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mClearButton.animate().setDuration(200).alpha(0.4f);
|
|
||||||
mMenuButton.setVisibility(View.VISIBLE);
|
mMenuButton.setVisibility(View.VISIBLE);
|
||||||
|
collapse(mClearButton);
|
||||||
|
//mHeaderContainer.setElevation(0);
|
||||||
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
mSearchButton.setVisibility(View.GONE);
|
mSearchButton.setVisibility(View.GONE);
|
||||||
if (mSearchInput.getVisibility() == View.VISIBLE){
|
if (mSearchInput.getVisibility() == View.VISIBLE){
|
||||||
onHideSearch();
|
onHideSearch();
|
||||||
|
@ -125,12 +137,9 @@ class bookmarkViewController
|
||||||
if (mSearchInput.getVisibility() != View.VISIBLE) {
|
if (mSearchInput.getVisibility() != View.VISIBLE) {
|
||||||
mClearButton.setClickable(true);
|
mClearButton.setClickable(true);
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(200).alpha(1);
|
|
||||||
}
|
}
|
||||||
mMenuButton.setVisibility(View.GONE);
|
mMenuButton.setVisibility(View.GONE);
|
||||||
mSearchButton.setVisibility(View.VISIBLE);
|
mSearchButton.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -155,36 +164,108 @@ class bookmarkViewController
|
||||||
|
|
||||||
private boolean onHideSearch() {
|
private boolean onHideSearch() {
|
||||||
if(mSearchInput.getVisibility() == View.VISIBLE){
|
if(mSearchInput.getVisibility() == View.VISIBLE){
|
||||||
mSearchInput.animate().cancel();
|
mSearchInput.animate().setDuration(200).alpha(0).withEndAction(() -> {
|
||||||
mSearchInput.animate().alpha(0).setDuration(150).withEndAction(() -> {
|
|
||||||
mSearchInput.getText().clear();
|
mSearchInput.getText().clear();
|
||||||
mSearchInput.setVisibility(View.GONE);
|
mSearchInput.setVisibility(View.GONE);
|
||||||
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
||||||
|
|
||||||
|
mTitle.setAlpha(0f);
|
||||||
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
|
mTitle.animate().setDuration(150).alpha(1);
|
||||||
|
|
||||||
|
mSearchButton.setAlpha(0f);
|
||||||
|
mSearchButton.setVisibility(View.VISIBLE);
|
||||||
|
mSearchButton.animate().setDuration(150).alpha(1);
|
||||||
|
|
||||||
|
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
||||||
|
mSearchInput.setClickable(false);
|
||||||
|
mClearButton.setClickable(true);
|
||||||
|
mClearButton.animate().setDuration(150).alpha(1);
|
||||||
});
|
});
|
||||||
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
|
||||||
mSearchInput.setClickable(false);
|
|
||||||
mClearButton.setClickable(true);
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(150).alpha(1f);
|
|
||||||
return false;
|
return false;
|
||||||
}else {
|
}else {
|
||||||
mSearchInput.animate().cancel();
|
|
||||||
mSearchInput.setAlpha(0f);
|
mSearchInput.setAlpha(0f);
|
||||||
mSearchInput.animate().setDuration(150).alpha(1);
|
|
||||||
mSearchInput.setVisibility(View.VISIBLE);
|
mSearchInput.setVisibility(View.VISIBLE);
|
||||||
|
mSearchInput.animate().setDuration(300).alpha(1);
|
||||||
mSearchInput.setClickable(true);
|
mSearchInput.setClickable(true);
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
mSearchInput.requestFocus();
|
mSearchInput.requestFocus();
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.animate().setDuration(300).alpha(0.3f);
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(150).alpha(0.4f);
|
|
||||||
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
||||||
|
mSearchButton.setVisibility(View.GONE);
|
||||||
|
mMenuButton.setVisibility(View.GONE);
|
||||||
|
mTitle.setVisibility(View.GONE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void expand(final View v) {
|
||||||
|
if(isClearButtonVisible){
|
||||||
|
v.animate().alpha(1);
|
||||||
|
v.measure(CoordinatorLayout.LayoutParams.MATCH_PARENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
final int targtetHeight = v.getMeasuredHeight();
|
||||||
|
v.getLayoutParams().height = 0;
|
||||||
|
Animation a = new Animation() {
|
||||||
|
@Override
|
||||||
|
protected void applyTransformation(float interpolatedTime,
|
||||||
|
Transformation t) {
|
||||||
|
v.getLayoutParams().height = interpolatedTime == 1 ? CoordinatorLayout.LayoutParams.WRAP_CONTENT
|
||||||
|
: (int) (targtetHeight * interpolatedTime);
|
||||||
|
v.requestLayout();
|
||||||
|
mClearButton.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean willChangeBounds() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
a.setDuration(250);
|
||||||
|
v.startAnimation(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void collapse(final View v) {
|
||||||
|
int[] location = new int[2];
|
||||||
|
v.getLocationOnScreen(location);
|
||||||
|
|
||||||
|
if(location[1]==207){
|
||||||
|
isClearButtonVisible = true;
|
||||||
|
}else {
|
||||||
|
isClearButtonVisible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
v.animate().alpha(1);
|
||||||
|
|
||||||
|
if(mClearButton.getVisibility() == View.VISIBLE){
|
||||||
|
final int initialHeight = v.getMeasuredHeight();
|
||||||
|
v.animate().alpha(0);
|
||||||
|
Animation a = new Animation() {
|
||||||
|
@Override
|
||||||
|
protected void applyTransformation(float interpolatedTime,
|
||||||
|
Transformation t) {
|
||||||
|
if (interpolatedTime == 1) {
|
||||||
|
v.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
v.getLayoutParams().height = initialHeight
|
||||||
|
- (int) (initialHeight * interpolatedTime);
|
||||||
|
v.requestLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean willChangeBounds() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
a.setDuration(250);
|
||||||
|
v.startAnimation(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onLongPressMenu(View pView) {
|
private void onLongPressMenu(View pView) {
|
||||||
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.recyclerview__menu);
|
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.recyclerview__menu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ import android.widget.ImageView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -37,8 +40,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import jp.wasabeef.recyclerview.animators.FadeInRightAnimator;
|
|
||||||
import static com.darkweb.genesissearchengine.appManager.historyManager.historyEnums.eHistoryViewCommands.M_VERTIFY_SELECTION_MENU;
|
import static com.darkweb.genesissearchengine.appManager.historyManager.historyEnums.eHistoryViewCommands.M_VERTIFY_SELECTION_MENU;
|
||||||
|
|
||||||
public class historyController extends AppCompatActivity
|
public class historyController extends AppCompatActivity
|
||||||
|
@ -49,6 +50,8 @@ public class historyController extends AppCompatActivity
|
||||||
private homeController mHomeController;
|
private homeController mHomeController;
|
||||||
private activityContextManager mContextManager;
|
private activityContextManager mContextManager;
|
||||||
private historyAdapter mHistoryAdapter;
|
private historyAdapter mHistoryAdapter;
|
||||||
|
private LinearLayout mHeaderContainer;
|
||||||
|
private TextView mTitle;
|
||||||
|
|
||||||
/*Private Views*/
|
/*Private Views*/
|
||||||
|
|
||||||
|
@ -91,22 +94,19 @@ public class historyController extends AppCompatActivity
|
||||||
mClearButton = findViewById(R.id.pClearButton);
|
mClearButton = findViewById(R.id.pClearButton);
|
||||||
mMenuButton = findViewById(R.id.pMenuButton);
|
mMenuButton = findViewById(R.id.pMenuButton);
|
||||||
mSearchButton = findViewById(R.id.pSearchButton);
|
mSearchButton = findViewById(R.id.pSearchButton);
|
||||||
|
mHeaderContainer = findViewById(R.id.pHeaderContainer);
|
||||||
|
mTitle = findViewById(R.id.pTitle);
|
||||||
|
|
||||||
mHistoryViewController = new historyViewController(mEmptyListNotification, mSearchInput, mRecycleView, mClearButton,this, mMenuButton, mSearchButton);
|
mHistoryViewController = new historyViewController(mEmptyListNotification, mSearchInput, mRecycleView, mClearButton,this, mMenuButton, mSearchButton, mHeaderContainer, mTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeList(){
|
public void initializeList(){
|
||||||
ArrayList<historyRowModel> model = (ArrayList<historyRowModel>) dataController.getInstance().invokeHistory(dataEnums.eHistoryCommands.M_GET_HISTORY ,null);
|
ArrayList<historyRowModel> model = (ArrayList<historyRowModel>) dataController.getInstance().invokeHistory(dataEnums.eHistoryCommands.M_GET_HISTORY ,null);
|
||||||
mHistoryModel.setList(model);
|
mHistoryModel.setList(model);
|
||||||
historyAdapter adapter = new historyAdapter(mHistoryModel.getList(),new adapterCallback(), this);
|
historyAdapter adapter = new historyAdapter(mHistoryModel.getList(),new adapterCallback(), this);
|
||||||
mHistoryAdapter = adapter;
|
mHistoryAdapter = adapter;
|
||||||
adapter.invokeFilter(false);
|
adapter.invokeFilter(false);
|
||||||
mRecycleView.setNestedScrollingEnabled(false);
|
|
||||||
mRecycleView.setHasFixedSize(true);
|
|
||||||
|
|
||||||
mRecycleView.setAdapter(adapter);
|
mRecycleView.setAdapter(adapter);
|
||||||
mRecycleView.setItemViewCacheSize(100);
|
|
||||||
mRecycleView.setDrawingCacheEnabled(true);
|
|
||||||
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
|
||||||
|
|
||||||
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
|
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
mHistoryViewController.onTrigger(historyEnums.eHistoryViewCommands.M_UPDATE_LIST_IF_EMPTY, Arrays.asList(mHistoryModel.getList().size(),0));
|
mHistoryViewController.onTrigger(historyEnums.eHistoryViewCommands.M_UPDATE_LIST_IF_EMPTY, Arrays.asList(mHistoryModel.getList().size(),0));
|
||||||
|
@ -139,7 +139,9 @@ public class historyController extends AppCompatActivity
|
||||||
});
|
});
|
||||||
|
|
||||||
mClearButton.requestFocusFromTouch();
|
mClearButton.requestFocusFromTouch();
|
||||||
mClearButton.setOnClickListener(v -> pluginController.getInstance().MessageManagerHandler(activityContextManager.getInstance().getHistoryController(), Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.clear_history));
|
mClearButton.setOnClickListener(v -> {
|
||||||
|
pluginController.getInstance().MessageManagerHandler(activityContextManager.getInstance().getHistoryController(), Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.clear_history);
|
||||||
|
});
|
||||||
|
|
||||||
mSearchInput.setOnEditorActionListener((v, actionId, event) ->{
|
mSearchInput.setOnEditorActionListener((v, actionId, event) ->{
|
||||||
if (actionId == EditorInfo.IME_ACTION_NEXT)
|
if (actionId == EditorInfo.IME_ACTION_NEXT)
|
||||||
|
@ -152,10 +154,11 @@ public class historyController extends AppCompatActivity
|
||||||
|
|
||||||
mSearchInput.setOnFocusChangeListener((v, hasFocus) -> {
|
mSearchInput.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
if (!hasFocus) {
|
if (!hasFocus) {
|
||||||
mSearchInput.clearFocus();
|
//mSearchInput.clearFocus();
|
||||||
|
//onHideSearch(null);
|
||||||
}else {
|
}else {
|
||||||
mHistoryAdapter.setFilter(mSearchInput.getText().toString());
|
//mHistoryAdapter.setFilter(mSearchInput.getText().toString());
|
||||||
mHistoryAdapter.invokeFilter(true);
|
//mHistoryAdapter.invokeFilter(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -255,14 +258,14 @@ public class historyController extends AppCompatActivity
|
||||||
}else if((Boolean) mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.GET_LONG_SELECTED_STATUS,null)){
|
}else if((Boolean) mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.GET_LONG_SELECTED_STATUS,null)){
|
||||||
onClearMultipleSelection(null);
|
onClearMultipleSelection(null);
|
||||||
}else {
|
}else {
|
||||||
onBackPressed(null);
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*External XML Listeners*/
|
/*External XML Listeners*/
|
||||||
|
|
||||||
public void onBackPressed(View view){
|
public void onBackPressed(View view){
|
||||||
this.finish();
|
onBackPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onHideSearch(View view) {
|
public void onHideSearch(View view) {
|
||||||
|
|
|
@ -10,14 +10,20 @@ import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.view.animation.Animation;
|
||||||
|
import android.view.animation.Transformation;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
@ -38,13 +44,15 @@ class historyViewController
|
||||||
private ImageButton mMenuButton;
|
private ImageButton mMenuButton;
|
||||||
private ImageButton mSearchButton;
|
private ImageButton mSearchButton;
|
||||||
private PopupWindow mPopupWindow = null;
|
private PopupWindow mPopupWindow = null;
|
||||||
|
private TextView mTitle;
|
||||||
|
|
||||||
/*Private Local Variables*/
|
/*Private Local Variables*/
|
||||||
private Paint mPainter = new Paint();
|
private Paint mPainter = new Paint();
|
||||||
|
private boolean isClearButtonVisible = true;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
historyViewController(ImageView pEmptyListNotification, EditText pSearchInput, RecyclerView pRecycleView, Button pClearButton,AppCompatActivity pContext,ImageButton pMenuButton,ImageButton pSearchButton)
|
historyViewController(ImageView pEmptyListNotification, EditText pSearchInput, RecyclerView pRecycleView, Button pClearButton,AppCompatActivity pContext,ImageButton pMenuButton,ImageButton pSearchButton, LinearLayout pHeaderContainer, TextView pTitle)
|
||||||
{
|
{
|
||||||
this.mEmptyListNotification = pEmptyListNotification;
|
this.mEmptyListNotification = pEmptyListNotification;
|
||||||
this.mSearchInput = pSearchInput;
|
this.mSearchInput = pSearchInput;
|
||||||
|
@ -53,6 +61,7 @@ class historyViewController
|
||||||
this.mContext = pContext;
|
this.mContext = pContext;
|
||||||
this.mMenuButton = pMenuButton;
|
this.mMenuButton = pMenuButton;
|
||||||
this.mSearchButton = pSearchButton;
|
this.mSearchButton = pSearchButton;
|
||||||
|
this.mTitle = pTitle;
|
||||||
|
|
||||||
initPostUI();
|
initPostUI();
|
||||||
}
|
}
|
||||||
|
@ -85,19 +94,21 @@ class historyViewController
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mEmptyListNotification.animate().setDuration(pDuration).alpha(1f);
|
mEmptyListNotification.animate().setDuration(pDuration).alpha(1f);
|
||||||
|
|
||||||
mClearButton.animate().setDuration(pDuration).alpha(0.4f);
|
mSearchButton.setAlpha(0f);
|
||||||
mSearchButton.animate().setDuration(pDuration).alpha(0f);
|
mMenuButton.setAlpha(0f);
|
||||||
mMenuButton.animate().setDuration(pDuration).alpha(0f);
|
|
||||||
|
|
||||||
mClearButton.setEnabled(false);
|
mClearButton.setEnabled(false);
|
||||||
mSearchButton.setClickable(false);
|
mSearchButton.setClickable(false);
|
||||||
mMenuButton.setClickable(false);
|
mMenuButton.setClickable(false);
|
||||||
mSearchInput.setVisibility(View.GONE);
|
mSearchInput.setVisibility(View.GONE);
|
||||||
mClearButton.animate().setDuration(300).alpha(1);
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mClearButton.setText(strings.HISTORY_NO_HISTORY_FOUND);
|
mClearButton.setText(strings.HISTORY_NO_HISTORY_FOUND);
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
|
|
||||||
|
mClearButton.getLayoutParams().height = 0;
|
||||||
|
mClearButton.requestLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,10 +122,10 @@ class historyViewController
|
||||||
private void onSelectionMenu(boolean pStatus){
|
private void onSelectionMenu(boolean pStatus){
|
||||||
if(!pStatus){
|
if(!pStatus){
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
||||||
mClearButton.animate().setDuration(200).alpha(0.4f);
|
|
||||||
mMenuButton.setVisibility(View.VISIBLE);
|
mMenuButton.setVisibility(View.VISIBLE);
|
||||||
|
collapse(mClearButton);
|
||||||
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
mSearchButton.setVisibility(View.GONE);
|
mSearchButton.setVisibility(View.GONE);
|
||||||
if (mSearchInput.getVisibility() == View.VISIBLE){
|
if (mSearchInput.getVisibility() == View.VISIBLE){
|
||||||
onHideSearch();
|
onHideSearch();
|
||||||
|
@ -123,12 +134,9 @@ class historyViewController
|
||||||
if (mSearchInput.getVisibility() != View.VISIBLE) {
|
if (mSearchInput.getVisibility() != View.VISIBLE) {
|
||||||
mClearButton.setClickable(true);
|
mClearButton.setClickable(true);
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(200).alpha(1);
|
|
||||||
}
|
}
|
||||||
mMenuButton.setVisibility(View.GONE);
|
mMenuButton.setVisibility(View.GONE);
|
||||||
mSearchButton.setVisibility(View.VISIBLE);
|
mSearchButton.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -153,36 +161,108 @@ class historyViewController
|
||||||
|
|
||||||
private boolean onHideSearch() {
|
private boolean onHideSearch() {
|
||||||
if(mSearchInput.getVisibility() == View.VISIBLE){
|
if(mSearchInput.getVisibility() == View.VISIBLE){
|
||||||
mSearchInput.animate().cancel();
|
mSearchInput.animate().setDuration(200).alpha(0).withEndAction(() -> {
|
||||||
mSearchInput.animate().alpha(0).setDuration(150).withEndAction(() -> {
|
|
||||||
mSearchInput.getText().clear();
|
mSearchInput.getText().clear();
|
||||||
mSearchInput.setVisibility(View.GONE);
|
mSearchInput.setVisibility(View.GONE);
|
||||||
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
||||||
|
|
||||||
|
mTitle.setAlpha(0f);
|
||||||
|
mTitle.setVisibility(View.VISIBLE);
|
||||||
|
mTitle.animate().setDuration(150).alpha(1);
|
||||||
|
|
||||||
|
mSearchButton.setAlpha(0f);
|
||||||
|
mSearchButton.setVisibility(View.VISIBLE);
|
||||||
|
mSearchButton.animate().setDuration(150).alpha(1);
|
||||||
|
|
||||||
|
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
||||||
|
mSearchInput.setClickable(false);
|
||||||
|
mClearButton.setClickable(true);
|
||||||
|
mClearButton.animate().setDuration(150).alpha(1);
|
||||||
});
|
});
|
||||||
mSearchInput.setText(strings.GENERIC_EMPTY_STR);
|
|
||||||
mSearchInput.setClickable(false);
|
|
||||||
mClearButton.setClickable(true);
|
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
|
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(150).alpha(1f);
|
|
||||||
return false;
|
return false;
|
||||||
}else {
|
}else {
|
||||||
mSearchInput.animate().cancel();
|
|
||||||
mSearchInput.setAlpha(0f);
|
mSearchInput.setAlpha(0f);
|
||||||
mSearchInput.animate().setDuration(150).alpha(1);
|
|
||||||
mSearchInput.setVisibility(View.VISIBLE);
|
mSearchInput.setVisibility(View.VISIBLE);
|
||||||
|
mSearchInput.animate().setDuration(300).alpha(1);
|
||||||
mSearchInput.setClickable(true);
|
mSearchInput.setClickable(true);
|
||||||
mClearButton.setClickable(false);
|
mClearButton.setClickable(false);
|
||||||
mSearchInput.requestFocus();
|
mSearchInput.requestFocus();
|
||||||
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
mClearButton.animate().setDuration(300).alpha(0.3f);
|
||||||
mClearButton.animate().cancel();
|
|
||||||
mClearButton.animate().setDuration(150).alpha(0.4f);
|
|
||||||
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
||||||
|
mSearchButton.setVisibility(View.GONE);
|
||||||
|
mMenuButton.setVisibility(View.GONE);
|
||||||
|
mTitle.setVisibility(View.GONE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void expand(final View v) {
|
||||||
|
if(isClearButtonVisible){
|
||||||
|
v.animate().alpha(1);
|
||||||
|
v.measure(CoordinatorLayout.LayoutParams.MATCH_PARENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
final int targtetHeight = v.getMeasuredHeight();
|
||||||
|
v.getLayoutParams().height = 0;
|
||||||
|
Animation a = new Animation() {
|
||||||
|
@Override
|
||||||
|
protected void applyTransformation(float interpolatedTime,
|
||||||
|
Transformation t) {
|
||||||
|
v.getLayoutParams().height = interpolatedTime == 1 ? CoordinatorLayout.LayoutParams.WRAP_CONTENT
|
||||||
|
: (int) (targtetHeight * interpolatedTime);
|
||||||
|
v.requestLayout();
|
||||||
|
mClearButton.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean willChangeBounds() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
a.setDuration(250);
|
||||||
|
v.startAnimation(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void collapse(final View v) {
|
||||||
|
int[] location = new int[2];
|
||||||
|
v.getLocationOnScreen(location);
|
||||||
|
|
||||||
|
if(location[1]==207){
|
||||||
|
isClearButtonVisible = true;
|
||||||
|
}else {
|
||||||
|
isClearButtonVisible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
v.animate().alpha(1);
|
||||||
|
|
||||||
|
if(mClearButton.getVisibility() == View.VISIBLE){
|
||||||
|
final int initialHeight = v.getMeasuredHeight();
|
||||||
|
v.animate().alpha(0);
|
||||||
|
Animation a = new Animation() {
|
||||||
|
@Override
|
||||||
|
protected void applyTransformation(float interpolatedTime,
|
||||||
|
Transformation t) {
|
||||||
|
if (interpolatedTime == 1) {
|
||||||
|
v.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
v.getLayoutParams().height = initialHeight
|
||||||
|
- (int) (initialHeight * interpolatedTime);
|
||||||
|
v.requestLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean willChangeBounds() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
a.setDuration(250);
|
||||||
|
v.startAnimation(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onLongPressMenu(View pView) {
|
private void onLongPressMenu(View pView) {
|
||||||
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.recyclerview__menu);
|
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.recyclerview__menu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
package com.darkweb.genesissearchengine.appManager.homeManager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import androidx.core.view.NestedScrollingChildHelper;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||||
|
|
||||||
|
import org.mozilla.geckoview.GeckoView;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_CHANGED;
|
||||||
|
|
||||||
|
public class NestedGeckoView extends GeckoView {
|
||||||
|
private int mLastY;
|
||||||
|
private final int[] mScrollOffset = new int[2];
|
||||||
|
private final int[] mScrollConsumed = new int[2];
|
||||||
|
private int mNestedOffsetY;
|
||||||
|
private final NestedScrollingChildHelper mChildHelper;
|
||||||
|
private eventObserver.eventListener mEvent;
|
||||||
|
|
||||||
|
|
||||||
|
public void onSetHomeEvent(eventObserver.eventListener pEvent){
|
||||||
|
mEvent = pEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NestedGeckoView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
|
||||||
|
mChildHelper = new NestedScrollingChildHelper(this);
|
||||||
|
setNestedScrollingEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent ev) {
|
||||||
|
final MotionEvent event = MotionEvent.obtain(ev);
|
||||||
|
final int action = ev.getActionMasked();
|
||||||
|
|
||||||
|
if (action == MotionEvent.ACTION_DOWN) {
|
||||||
|
mNestedOffsetY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int eventY = (int) event.getY();
|
||||||
|
event.offsetLocation(0, mNestedOffsetY);
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
|
case MotionEvent.ACTION_MOVE:
|
||||||
|
final boolean allowScroll = status.sFullScreenBrowsing;
|
||||||
|
int deltaY = mLastY - eventY;
|
||||||
|
|
||||||
|
if (allowScroll && dispatchNestedPreScroll(0, deltaY, mScrollConsumed, mScrollOffset)) {
|
||||||
|
deltaY -= mScrollConsumed[1];
|
||||||
|
event.offsetLocation(0, -mScrollOffset[1]);
|
||||||
|
mNestedOffsetY += mScrollOffset[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
mLastY = eventY - mScrollOffset[1];
|
||||||
|
|
||||||
|
if (allowScroll && dispatchNestedScroll(0, mScrollOffset[1], 0, deltaY, mScrollOffset)) {
|
||||||
|
mLastY -= mScrollOffset[1];
|
||||||
|
event.offsetLocation(0, mScrollOffset[1]);
|
||||||
|
mNestedOffsetY += mScrollOffset[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(status.sFullScreenBrowsing){
|
||||||
|
Log.i("wow1", eventY + "");
|
||||||
|
mEvent.invokeObserver(Collections.singletonList(deltaY), GECKO_SCROLL_CHANGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
mLastY = eventY;
|
||||||
|
startNestedScroll(ViewCompat.SCROLL_AXIS_VERTICAL);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
case MotionEvent.ACTION_CANCEL:
|
||||||
|
stopNestedScroll();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// We don't care about other touch events
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute event handler from parent class in all cases
|
||||||
|
boolean eventHandled = super.onTouchEvent(event);
|
||||||
|
|
||||||
|
// Recycle previously obtained event
|
||||||
|
event.recycle();
|
||||||
|
|
||||||
|
return eventHandled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNestedScrollingEnabled(boolean enabled) {
|
||||||
|
mChildHelper.setNestedScrollingEnabled(enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isNestedScrollingEnabled() {
|
||||||
|
return mChildHelper.isNestedScrollingEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean startNestedScroll(int axes) {
|
||||||
|
return mChildHelper.startNestedScroll(axes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stopNestedScroll() {
|
||||||
|
mChildHelper.stopNestedScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNestedScrollingParent() {
|
||||||
|
return mChildHelper.hasNestedScrollingParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow) {
|
||||||
|
return mChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow) {
|
||||||
|
return mChildHelper.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed) {
|
||||||
|
return mChildHelper.dispatchNestedFling(velocityX, velocityY, consumed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean dispatchNestedPreFling(float velocityX, float velocityY) {
|
||||||
|
return mChildHelper.dispatchNestedPreFling(velocityX, velocityY);
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.view.autofill.AutofillManager;
|
import android.view.autofill.AutofillManager;
|
||||||
import android.view.autofill.AutofillValue;
|
import android.view.autofill.AutofillValue;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -25,6 +26,7 @@ import org.mozilla.gecko.EventDispatcher;
|
||||||
import androidx.annotation.AnyThread;
|
import androidx.annotation.AnyThread;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.annotation.UiThread;
|
import androidx.annotation.UiThread;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
|
@ -54,6 +56,9 @@ import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import mozilla.components.browser.engine.gecko.GleanMetrics.Geckoview;
|
||||||
|
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
||||||
|
|
||||||
|
@ -84,13 +89,13 @@ public class geckoSession extends GeckoSession implements GeckoSession.ScrollDel
|
||||||
this.mGeckoView = pGeckoView;
|
this.mGeckoView = pGeckoView;
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
this.mSessionID = mSessionID;
|
this.mSessionID = mSessionID;
|
||||||
|
|
||||||
setProgressDelegate(this);
|
setProgressDelegate(this);
|
||||||
setHistoryDelegate(this);
|
setHistoryDelegate(this);
|
||||||
setNavigationDelegate(this);
|
setNavigationDelegate(this);
|
||||||
setContentDelegate(this);
|
setContentDelegate(this);
|
||||||
setAutoFillDelegate();
|
setAutoFillDelegate();
|
||||||
setPermissionDelegate(this);
|
setPermissionDelegate(this);
|
||||||
setScrollDelegate(this);
|
|
||||||
mDownloadManager = new geckoDownloadManager();
|
mDownloadManager = new geckoDownloadManager();
|
||||||
setPromptDelegate(new geckoPromptView(mContext));
|
setPromptDelegate(new geckoPromptView(mContext));
|
||||||
this.event = event;
|
this.event = event;
|
||||||
|
@ -118,12 +123,6 @@ public class geckoSession extends GeckoSession implements GeckoSession.ScrollDel
|
||||||
|
|
||||||
/*Scroll Delegate*/
|
/*Scroll Delegate*/
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onScrollChanged(GeckoSession session, int scrollX, int scrollY){
|
|
||||||
Log.i("SUPERMAN",scrollX + " - " + scrollY);
|
|
||||||
event.invokeObserver(Collections.singletonList(true), enums.etype.ON_UPDATE_TITLE_BAR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Autofill Delegate*/
|
/*Autofill Delegate*/
|
||||||
|
|
||||||
public void setAutoFillDelegate(){
|
public void setAutoFillDelegate(){
|
||||||
|
|
|
@ -16,6 +16,7 @@ import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
@ -25,6 +26,7 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
|
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
|
||||||
|
@ -69,6 +71,8 @@ import java.util.Locale;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_CHANGED;
|
||||||
|
|
||||||
public class homeController extends AppCompatActivity implements ComponentCallbacks2
|
public class homeController extends AppCompatActivity implements ComponentCallbacks2
|
||||||
{
|
{
|
||||||
/*Model Declaration*/
|
/*Model Declaration*/
|
||||||
|
@ -77,7 +81,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
private geckoClients mGeckoClient = null;
|
private geckoClients mGeckoClient = null;
|
||||||
|
|
||||||
/*View Webviews*/
|
/*View Webviews*/
|
||||||
private GeckoView mGeckoView = null;
|
private NestedGeckoView mGeckoView = null;
|
||||||
|
private FrameLayout mTopLayout;
|
||||||
private FrameLayout mWebViewContainer;
|
private FrameLayout mWebViewContainer;
|
||||||
|
|
||||||
/*View Objects*/
|
/*View Objects*/
|
||||||
|
@ -100,7 +105,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
private boolean mPageClosed = false;
|
private boolean mPageClosed = false;
|
||||||
private boolean isKeyboardOpened = false;
|
private boolean isKeyboardOpened = false;
|
||||||
private boolean isSuggestionChanged = false;
|
private boolean isSuggestionChanged = false;
|
||||||
private boolean isTabMenuOpened = false;
|
|
||||||
|
|
||||||
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
|
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -213,8 +217,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mSearchbar = findViewById(R.id.pSearchInput);
|
mSearchbar = findViewById(R.id.pSearchInput);
|
||||||
mLoadingIcon = findViewById(R.id.imageView_loading_back);
|
mLoadingIcon = findViewById(R.id.imageView_loading_back);
|
||||||
mLoadingText = findViewById(R.id.loadingText);
|
mLoadingText = findViewById(R.id.loadingText);
|
||||||
mWebViewContainer = findViewById(R.id.webviewContainer);
|
mWebViewContainer = findViewById(R.id.pWebLayoutView);
|
||||||
mBannerAds = findViewById(R.id.adView);
|
mTopLayout = findViewById(R.id.pTopLayout);
|
||||||
|
mBannerAds = findViewById(R.id.pAdView);
|
||||||
mGatewaySplash = findViewById(R.id.gateway_splash);
|
mGatewaySplash = findViewById(R.id.gateway_splash);
|
||||||
mTopBar = findViewById(R.id.topbar);
|
mTopBar = findViewById(R.id.topbar);
|
||||||
mBackSplash = findViewById(R.id.backsplash);
|
mBackSplash = findViewById(R.id.backsplash);
|
||||||
|
@ -228,7 +233,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mGeckoView.setSaveFromParentEnabled(false);
|
mGeckoView.setSaveFromParentEnabled(false);
|
||||||
|
|
||||||
mGeckoClient = new geckoClients();
|
mGeckoClient = new geckoClients();
|
||||||
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount);
|
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout);
|
||||||
|
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onChangeTheme(){
|
public void onChangeTheme(){
|
||||||
|
@ -241,7 +247,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
try {
|
try {
|
||||||
Class clazz = Class.forName("java.lang.Daemons$FinalizerWatchdogDaemon");
|
Class clazz = Class.forName("java.lang.Daemons$FinalizerWatchdogDaemon");
|
||||||
|
|
||||||
Method method = clazz.getSuperclass().getDeclaredMethod("stop");
|
Method method = Objects.requireNonNull(clazz.getSuperclass()).getDeclaredMethod("stop");
|
||||||
method.setAccessible(true);
|
method.setAccessible(true);
|
||||||
|
|
||||||
Field field = clazz.getDeclaredField("INSTANCE");
|
Field field = clazz.getDeclaredField("INSTANCE");
|
||||||
|
@ -298,10 +304,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mGeckoClient.loadURL(url.replace("genesis.onion","boogle.store"));
|
mGeckoClient.loadURL(url.replace("genesis.onion","boogle.store"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeckoView getmGeckoView(){
|
|
||||||
return mGeckoView;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onLoadTab(geckoSession mTempSession,boolean isSessionClosed){
|
public void onLoadTab(geckoSession mTempSession,boolean isSessionClosed){
|
||||||
if(!isSessionClosed){
|
if(!isSessionClosed){
|
||||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession));
|
dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession));
|
||||||
|
@ -491,7 +493,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mGeckoClient.onRedrawPixel();
|
mGeckoClient.onRedrawPixel();
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
mNewTab.setPressed(true);
|
mNewTab.setPressed(true);
|
||||||
isTabMenuOpened = true;
|
|
||||||
handler.postDelayed(() ->
|
handler.postDelayed(() ->
|
||||||
{
|
{
|
||||||
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
||||||
|
@ -515,6 +516,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mHomeViewController.onOpenMenu(view,mGeckoClient.canGoBack(),!(mProgressBar.getAlpha()<=0 || mProgressBar.getVisibility() ==View.INVISIBLE),mGeckoClient.getUserAgent());
|
mHomeViewController.onOpenMenu(view,mGeckoClient.canGoBack(),!(mProgressBar.getAlpha()<=0 || mProgressBar.getVisibility() ==View.INVISIBLE),mGeckoClient.getUserAgent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onFullScreenSettingChanged(){
|
||||||
|
mHomeViewController.initTopBarPadding();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed(){
|
public void onBackPressed(){
|
||||||
pluginController.getInstance().logEvent(strings.EVENT_ON_BACK);
|
pluginController.getInstance().logEvent(strings.EVENT_ON_BACK);
|
||||||
|
@ -701,14 +706,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mHomeViewController.initTab((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null));
|
mHomeViewController.initTab((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadExistingTab(){
|
|
||||||
tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
|
|
||||||
if (model != null)
|
|
||||||
{
|
|
||||||
onLoadTab(model.getSession(), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*-------------------------------------------------------CALLBACKS-------------------------------------------------------*/
|
/*-------------------------------------------------------CALLBACKS-------------------------------------------------------*/
|
||||||
|
|
||||||
public void onHideFindBar(View view){
|
public void onHideFindBar(View view){
|
||||||
|
@ -833,6 +830,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class nestedGeckoViewCallback implements eventObserver.eventListener{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object invokeObserver(List<Object> data, Object e_type)
|
||||||
|
{
|
||||||
|
if(e_type.equals(GECKO_SCROLL_CHANGED)){
|
||||||
|
mHomeViewController.onMoveTopBar((int)data.get(0));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class homeViewCallback implements eventObserver.eventListener{
|
public class homeViewCallback implements eventObserver.eventListener{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -987,7 +996,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
else if(e_type.equals(dataEnums.eTabCommands.M_UPDATE_PIXEL)){
|
else if(e_type.equals(dataEnums.eTabCommands.M_UPDATE_PIXEL)){
|
||||||
try{
|
try{
|
||||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels()));
|
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels()));
|
||||||
}catch (Exception ex){
|
}catch (Exception ignored){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ import android.view.ViewGroup;
|
||||||
import android.view.ViewOutlineProvider;
|
import android.view.ViewOutlineProvider;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.Animation;
|
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.view.animation.DecelerateInterpolator;
|
import android.view.animation.DecelerateInterpolator;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
@ -32,8 +31,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.daimajia.androidanimations.library.Techniques;
|
|
||||||
import com.daimajia.androidanimations.library.YoYo;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.helperManager.animatedColor;
|
import com.darkweb.genesissearchengine.helperManager.animatedColor;
|
||||||
|
@ -78,12 +76,13 @@ class homeViewController
|
||||||
private View mFindBar;
|
private View mFindBar;
|
||||||
private EditText mFindText;
|
private EditText mFindText;
|
||||||
private TextView mFindCount;
|
private TextView mFindCount;
|
||||||
|
private FrameLayout mTopLayout;
|
||||||
|
|
||||||
/*Local Variables*/
|
/*Local Variables*/
|
||||||
private Callable<String> mLogs = null;
|
private Callable<String> mLogs = null;
|
||||||
private boolean isLandscape = false;
|
private boolean isLandscape = false;
|
||||||
|
|
||||||
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, FrameLayout webviewContainer, TextView loadingText, com.darkweb.genesissearchengine.widget.AnimatedProgressBar progressBar, AutoCompleteTextView searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ArrayList<historyRowModel> suggestions, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount){
|
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, FrameLayout webviewContainer, TextView loadingText, com.darkweb.genesissearchengine.widget.AnimatedProgressBar progressBar, AutoCompleteTextView searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ArrayList<historyRowModel> suggestions, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, FrameLayout pTopLayout){
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
this.mProgressBar = progressBar;
|
this.mProgressBar = progressBar;
|
||||||
this.mSearchbar = searchbar;
|
this.mSearchbar = searchbar;
|
||||||
|
@ -103,6 +102,7 @@ class homeViewController
|
||||||
this.mFindBar = pFindBar;
|
this.mFindBar = pFindBar;
|
||||||
this.mFindText = pFindText;
|
this.mFindText = pFindText;
|
||||||
this.mFindCount = pFindCount;
|
this.mFindCount = pFindCount;
|
||||||
|
this.mTopLayout = pTopLayout;
|
||||||
|
|
||||||
initSplashScreen();
|
initSplashScreen();
|
||||||
initializeSuggestionView(suggestions);
|
initializeSuggestionView(suggestions);
|
||||||
|
@ -110,6 +110,21 @@ class homeViewController
|
||||||
initSearchImage();
|
initSearchImage();
|
||||||
createUpdateUiHandler();
|
createUpdateUiHandler();
|
||||||
recreateStatusBar();
|
recreateStatusBar();
|
||||||
|
initTopBarPadding();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initTopBarPadding(){
|
||||||
|
if(!status.sFullScreenBrowsing){
|
||||||
|
int paddingDp = 60;
|
||||||
|
float density = mContext.getResources().getDisplayMetrics().density;
|
||||||
|
int paddingPixel = (int)(paddingDp * density);
|
||||||
|
mGeckoView.setPadding(0,0,0,paddingPixel);
|
||||||
|
}else {
|
||||||
|
int paddingDp = 0;
|
||||||
|
float density = mContext.getResources().getDisplayMetrics().density;
|
||||||
|
int paddingPixel = (int)(paddingDp * density);
|
||||||
|
mGeckoView.setPadding(0,0,0,paddingPixel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSearchImage(){
|
private void initSearchImage(){
|
||||||
|
@ -432,7 +447,7 @@ class homeViewController
|
||||||
Button btn = popupView.findViewById(R.id.notification_event);
|
Button btn = popupView.findViewById(R.id.notification_event);
|
||||||
btn.setOnClickListener(v ->
|
btn.setOnClickListener(v ->
|
||||||
{
|
{
|
||||||
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), e_type);
|
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.progress_update);
|
||||||
popupWindow.dismiss();
|
popupWindow.dismiss();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -445,6 +460,13 @@ class homeViewController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onMoveTopBar(int pPosition){
|
||||||
|
if(mTopLayout.getY() - pPosition > -mTopLayout.getHeight() && mTopLayout.getY() - pPosition < 0){
|
||||||
|
// mTopLayout.setTranslationY(mTopLayout.getTranslationY() - pPosition);
|
||||||
|
// mWebviewContainer.setTranslationY(mWebviewContainer.getTranslationY() - pPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setOrientation(boolean status){
|
public void setOrientation(boolean status){
|
||||||
isLandscape = status;
|
isLandscape = status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,7 @@ public class settingGeneralController extends AppCompatActivity {
|
||||||
public void onFullScreenBrowsing(View view){
|
public void onFullScreenBrowsing(View view){
|
||||||
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_FULL_SCREEN_BROWSING, Collections.singletonList(!mFullScreenMode.isChecked()));
|
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_FULL_SCREEN_BROWSING, Collections.singletonList(!mFullScreenMode.isChecked()));
|
||||||
mFullScreenMode.toggle();
|
mFullScreenMode.toggle();
|
||||||
|
activityContextManager.getInstance().getHomeController().onFullScreenSettingChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelectTheme(View view){
|
public void onSelectTheme(View view){
|
||||||
|
|
|
@ -4,7 +4,7 @@ public class enums
|
||||||
{
|
{
|
||||||
/*Settings Manager*/
|
/*Settings Manager*/
|
||||||
public enum etype{
|
public enum etype{
|
||||||
ON_UPDATE_VIEW_PIXEL,on_update_favicon,ON_UPDATE_TAB_TITLE,
|
ON_UPDATE_VIEW_PIXEL,on_update_favicon,ON_UPDATE_TAB_TITLE,GECKO_SCROLL_CHANGED,
|
||||||
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
||||||
welcome,abi_error, rate_failure,reported_success,bookmark, clear_tab,clear_history,clear_bookmark,report_url,rate_app,start_orbot,download_file,download_file_long_press,on_long_press_url,
|
welcome,abi_error, rate_failure,reported_success,bookmark, clear_tab,clear_history,clear_bookmark,report_url,rate_app,start_orbot,download_file,download_file_long_press,on_long_press_url,
|
||||||
cancel_welcome,ignore_abi,reload,connect_vpn,app_rated,download_file_manual,download_folder, open_link_new_tab,open_link_current_tab,copy_link,
|
cancel_welcome,ignore_abi,reload,connect_vpn,app_rated,download_file_manual,download_folder, open_link_new_tab,open_link_current_tab,copy_link,
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class status
|
||||||
status.sShowImages = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,0));
|
status.sShowImages = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,0));
|
||||||
status.sShowWebFonts = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,false));
|
status.sShowWebFonts = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,false));
|
||||||
status.sAutoPlay = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_AUTO_PLAY,false));
|
status.sAutoPlay = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_AUTO_PLAY,false));
|
||||||
status.sFullScreenBrowsing = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,false));
|
status.sFullScreenBrowsing = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
|
||||||
status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT));
|
status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT));
|
||||||
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,false));
|
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,false));
|
||||||
status.sLogListView = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
|
status.sLogListView = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
|
||||||
|
|
|
@ -4,12 +4,12 @@ public class strings
|
||||||
{
|
{
|
||||||
/*History Manager*/
|
/*History Manager*/
|
||||||
public static final String HISTORY_TITLE = "history";
|
public static final String HISTORY_TITLE = "history";
|
||||||
public static final String HISTORY_CLEAR_HISTORY = "CLEAR HISTORY";
|
public static final String HISTORY_CLEAR_HISTORY = "Clear History";
|
||||||
public static final String HISTORY_NO_HISTORY_FOUND = "NO HISTORY FOUND";
|
public static final String HISTORY_NO_HISTORY_FOUND = "No History Found";
|
||||||
|
|
||||||
/*Bookmark Manager*/
|
/*Bookmark Manager*/
|
||||||
public static final String BOOKMARK_CLEAR_BOOKMARK = "CLEAR HISTORY";
|
public static final String BOOKMARK_CLEAR_BOOKMARK = "Clear Bookmark";
|
||||||
public static final String BOOKMARK_NO_BOOKMARK_FOUND = "NO BOOKMARK FOUND";
|
public static final String BOOKMARK_NO_BOOKMARK_FOUND = "No Bookmark Found";
|
||||||
|
|
||||||
/*Bridge Manager*/
|
/*Bridge Manager*/
|
||||||
|
|
||||||
|
|
|
@ -4,17 +4,17 @@ import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.RatingBar;
|
import android.widget.RatingBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
@ -35,7 +35,7 @@ class messageManager
|
||||||
|
|
||||||
private List<Object> data;
|
private List<Object> data;
|
||||||
|
|
||||||
private AppCompatActivity app_context;
|
private AppCompatActivity mContext;
|
||||||
private eventObserver.eventListener event;
|
private eventObserver.eventListener event;
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,14 +48,22 @@ class messageManager
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog = new Dialog(app_context);
|
dialog = new Dialog(mContext);
|
||||||
dialog.getWindow().setGravity(pGravity);
|
dialog.getWindow().setGravity(pGravity);
|
||||||
dialog.getWindow().getAttributes().windowAnimations = R.style.dialiog_animation;
|
dialog.getWindow().getAttributes().windowAnimations = R.style.dialiog_animation;
|
||||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
|
||||||
|
Drawable myDrawable;
|
||||||
|
Resources res = mContext.getResources();
|
||||||
|
try {
|
||||||
|
myDrawable = Drawable.createFromXml(res, res.getXml(R.xml.hox_rounded_corner));
|
||||||
|
dialog.getWindow().setBackgroundDrawable(myDrawable);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
dialog.setCancelable(true);
|
dialog.setCancelable(true);
|
||||||
dialog.setContentView(pLayout);
|
dialog.setContentView(pLayout);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
dialog.getWindow().clearFlags(pFlag);
|
//dialog.getWindow().clearFlags(pFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
messageManager(eventObserver.eventListener event)
|
messageManager(eventObserver.eventListener event)
|
||||||
|
@ -104,21 +112,21 @@ class messageManager
|
||||||
dialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
|
dialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_GENESIS_UPDATE_URL + status.sAppCurrentABI));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_GENESIS_UPDATE_URL + status.sAppCurrentABI));
|
||||||
if(browserIntent.resolveActivity(app_context.getPackageManager()) != null)
|
if(browserIntent.resolveActivity(mContext.getPackageManager()) != null)
|
||||||
{
|
{
|
||||||
app_context.startActivity(browserIntent);
|
mContext.startActivity(browserIntent);
|
||||||
}else {
|
}else {
|
||||||
helperMethod.showToastMessage("Not Supported",app_context);
|
helperMethod.showToastMessage("Not Supported", mContext);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog.findViewById(R.id.pOption2).setOnClickListener(v -> {
|
dialog.findViewById(R.id.pOption2).setOnClickListener(v -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_PLAYSTORE_URL));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_PLAYSTORE_URL));
|
||||||
if(browserIntent.resolveActivity(app_context.getPackageManager()) != null)
|
if(browserIntent.resolveActivity(mContext.getPackageManager()) != null)
|
||||||
{
|
{
|
||||||
app_context.startActivity(browserIntent);
|
mContext.startActivity(browserIntent);
|
||||||
}else {
|
}else {
|
||||||
helperMethod.showToastMessage("Playstore Not Found",app_context);
|
helperMethod.showToastMessage("Playstore Not Found", mContext);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -132,10 +140,10 @@ class messageManager
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
Runnable runnable = () -> {
|
Runnable runnable = () -> {
|
||||||
try{
|
try{
|
||||||
helperMethod.sendRateEmail(app_context);
|
helperMethod.sendRateEmail(mContext);
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
catch (Exception ex){
|
||||||
createMessage(app_context,Collections.singletonList(app_context.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),enums.etype.on_not_support);
|
createMessage(mContext,Collections.singletonList(mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),enums.etype.on_not_support);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handler.postDelayed(runnable, 1000);
|
handler.postDelayed(runnable, 1000);
|
||||||
|
@ -180,12 +188,12 @@ class messageManager
|
||||||
});
|
});
|
||||||
|
|
||||||
mBoomMarkTitle.requestFocus();
|
mBoomMarkTitle.requestFocus();
|
||||||
InputMethodManager imm = (InputMethodManager) app_context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
|
||||||
|
|
||||||
dialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
dialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
helperMethod.hideKeyboard(app_context);
|
helperMethod.hideKeyboard(mContext);
|
||||||
event.invokeObserver(Collections.singletonList(data.get(0).toString().replace("genesis.onion","boogle.store")+"split"+((EditText)dialog.findViewById(R.id.pBookmark)).getText().toString()), enums.etype.bookmark);
|
event.invokeObserver(Collections.singletonList(data.get(0).toString().replace("genesis.onion","boogle.store")+"split"+((EditText)dialog.findViewById(R.id.pBookmark)).getText().toString()), enums.etype.bookmark);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -217,7 +225,7 @@ class messageManager
|
||||||
dialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
dialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
Runnable runnable = () -> createMessage(app_context,Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.reported_success);
|
Runnable runnable = () -> createMessage(mContext,Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.reported_success);
|
||||||
handler.postDelayed(runnable, 1000);
|
handler.postDelayed(runnable, 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -232,17 +240,17 @@ class messageManager
|
||||||
if(mRatingBar.getRating()>=3){
|
if(mRatingBar.getRating()>=3){
|
||||||
event.invokeObserver(null, enums.etype.app_rated);
|
event.invokeObserver(null, enums.etype.app_rated);
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.darkweb.genesissearchengine"));
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.darkweb.genesissearchengine"));
|
||||||
if(intent.resolveActivity(app_context.getPackageManager()) != null)
|
if(intent.resolveActivity(mContext.getPackageManager()) != null)
|
||||||
{
|
{
|
||||||
app_context.startActivity(intent);
|
mContext.startActivity(intent);
|
||||||
}else {
|
}else {
|
||||||
helperMethod.showToastMessage("Playstore Not Found",app_context);
|
helperMethod.showToastMessage("Playstore Not Found", mContext);
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}else if(mRatingBar.getRating()>0) {
|
}else if(mRatingBar.getRating()>0) {
|
||||||
event.invokeObserver(null, enums.etype.app_rated);
|
event.invokeObserver(null, enums.etype.app_rated);
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
handler.postDelayed(() -> createMessage(app_context,Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.rate_failure), 1000);
|
handler.postDelayed(() -> createMessage(mContext,Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.rate_failure), 1000);
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -251,7 +259,7 @@ class messageManager
|
||||||
private void downloadFile()
|
private void downloadFile()
|
||||||
{
|
{
|
||||||
initializeDialog(R.layout.popup_download_file, Gravity.BOTTOM, FLAG_DIM_BEHIND);
|
initializeDialog(R.layout.popup_download_file, Gravity.BOTTOM, FLAG_DIM_BEHIND);
|
||||||
((TextView)dialog.findViewById(R.id.pDescription)).setText((app_context.getString(R.string.ALERT_DOWNLOAD_MESSAGE) + data.get(0)));
|
((TextView)dialog.findViewById(R.id.pDescription)).setText((mContext.getString(R.string.ALERT_DOWNLOAD_MESSAGE) + data.get(0)));
|
||||||
dialog.findViewById(R.id.pDismiss).setOnClickListener(v -> dialog.dismiss());
|
dialog.findViewById(R.id.pDismiss).setOnClickListener(v -> dialog.dismiss());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,7 +327,7 @@ class messageManager
|
||||||
String file = data.get(1).toString();
|
String file = data.get(1).toString();
|
||||||
String title = data.get(2).toString();
|
String title = data.get(2).toString();
|
||||||
|
|
||||||
String data_local = app_context.getString(R.string.ALERT_LONG_URL_MESSAGE);
|
String data_local = mContext.getString(R.string.ALERT_LONG_URL_MESSAGE);
|
||||||
|
|
||||||
int size = url.length();
|
int size = url.length();
|
||||||
if(size>235){
|
if(size>235){
|
||||||
|
@ -391,10 +399,10 @@ class messageManager
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
Runnable runnable = () -> {
|
Runnable runnable = () -> {
|
||||||
try{
|
try{
|
||||||
helperMethod.sendBridgeEmail(app_context);
|
helperMethod.sendBridgeEmail(mContext);
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
catch (Exception ex){
|
||||||
createMessage(app_context,Collections.singletonList(app_context.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),enums.etype.on_not_support);
|
createMessage(mContext,Collections.singletonList(mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),enums.etype.on_not_support);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handler.postDelayed(runnable, 1000);
|
handler.postDelayed(runnable, 1000);
|
||||||
|
@ -411,7 +419,7 @@ class messageManager
|
||||||
|
|
||||||
void createMessage(AppCompatActivity app_context, List<Object> data, enums.etype type)
|
void createMessage(AppCompatActivity app_context, List<Object> data, enums.etype type)
|
||||||
{
|
{
|
||||||
this.app_context = app_context;
|
this.mContext = app_context;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#50CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#10CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#20CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#30CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:bottom="1dp" />
|
||||||
|
<solid android:color="#50CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:right="1dp" />
|
||||||
|
<solid android:color="#50CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:right="1dp" />
|
||||||
|
<solid android:color="#10CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:right="1dp" />
|
||||||
|
<solid android:color="#20CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:right="1dp" />
|
||||||
|
<solid android:color="#30CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<padding android:right="1dp" />
|
||||||
|
<solid android:color="#50CCCCCC" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -10,8 +10,6 @@
|
||||||
android:layout_width="330dp"
|
android:layout_width="330dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@ android:layout_height="match_parent">
|
||||||
android:layout_width="330dp"
|
android:layout_width="330dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/gx_rounded_corner_alert"
|
android:background="@xml/gx_rounded_corner_alert"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="360dp"
|
android:layout_width="360dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="360dp"
|
android:layout_width="360dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="360dp"
|
android:layout_width="360dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
@ -10,8 +9,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="320dp"
|
android:layout_width="320dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="360dp"
|
android:layout_width="360dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="360dp"
|
android:layout_width="360dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="26dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:background="@xml/ax_background_inverted"
|
android:background="@xml/ax_background_inverted"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
android:id="@+id/pMainLayout"
|
android:id="@+id/pMainLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:background="@xml/hox_rounded_corner"
|
android:background="@xml/hox_rounded_corner"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -5,19 +5,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
tools:context="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController">
|
tools:context="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pHeaderContainer"
|
android:id="@+id/pHeaderContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="55dp"
|
||||||
|
android:elevation="1dp"
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
android:clickable="true"
|
|
||||||
android:elevation="7dp"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -27,12 +22,9 @@
|
||||||
android:id="@+id/pHeaderContainerTop"
|
android:id="@+id/pHeaderContainerTop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="@color/c_background"
|
|
||||||
android:clickable="true"
|
|
||||||
android:paddingEnd="7dp"
|
|
||||||
android:paddingStart="5dp"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="7dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
@ -45,22 +37,53 @@
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:background="@xml/gx_ripple_default_round"
|
android:background="@xml/gx_ripple_default_round"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="onNewTabInvoked"
|
android:onClick="onBackPressed"
|
||||||
android:src="@xml/ic_arrow_back"
|
android:src="@xml/ic_arrow_back"
|
||||||
android:tint="@color/c_navigation_tint" />
|
android:tint="@color/c_navigation_tint" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:id="@+id/pTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:onClick="onNewTabInvoked"
|
|
||||||
android:layout_marginTop="-3dp"
|
android:layout_marginTop="-3dp"
|
||||||
android:layout_weight="40"
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center_vertical|start"
|
||||||
|
android:onClick="onBackPressed"
|
||||||
android:text="@string/BOOKMARK_TITLE"
|
android:text="@string/BOOKMARK_TITLE"
|
||||||
android:textColor="@color/c_text_v1"
|
android:textColor="@color/c_text_v1"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/pSearchInput"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_marginTop="2.5dp"
|
||||||
|
android:layout_marginBottom="2.5dp"
|
||||||
|
android:layout_weight="80"
|
||||||
|
android:background="@xml/gx_generic_input"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/BOOKMARK_SEARCH_HINT"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="11dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:textColor="@color/c_text_v1"
|
||||||
|
android:textColorHighlight="@color/text_color_highlight_v1"
|
||||||
|
android:textColorHint="@color/c_text_v2"
|
||||||
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:targetApi="o" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="40"/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/pSearchButton"
|
android:id="@+id/pSearchButton"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
|
@ -68,7 +91,7 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_weight="2.5"
|
android:layout_weight="2.5"
|
||||||
android:background="@xml/ax_ripple_default_round_right"
|
android:background="@xml/gx_ripple_default_round"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="onHideSearch"
|
android:onClick="onHideSearch"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
@ -84,108 +107,88 @@
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_weight="2.5"
|
android:layout_weight="2.5"
|
||||||
android:background="@xml/ax_ripple_default_round_right"
|
android:background="@xml/gx_ripple_default_round"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="onLongPressMenu"
|
android:onClick="onLongPressMenu"
|
||||||
android:paddingTop="14dp"
|
android:paddingTop="14dp"
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="14dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/menu_item"
|
android:src="@drawable/menu_item"
|
||||||
android:tint="@color/black" />
|
android:tint="@color/c_navigation_tint" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pHeaderContainer">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/pAppBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/c_view_divier_background_inner"
|
android:elevation="10dp">
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pHeaderContainerBottom"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:background="@color/c_background"
|
||||||
android:background="@color/c_background"
|
android:orientation="horizontal"
|
||||||
android:clickable="true"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:focusable="true"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:orientation="horizontal"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/pClearButton"
|
android:id="@+id/pClearButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="0dp"
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_weight="17"
|
android:layout_weight="17"
|
||||||
android:background="@xml/gx_ripple_blue"
|
android:background="@xml/gx_ripple_blue"
|
||||||
android:paddingStart="16dp"
|
android:textAllCaps="false"
|
||||||
android:stateListAnimator="@null"
|
android:paddingStart="20dp"
|
||||||
android:text="@string/BOOKMARK_CLEAR"
|
android:stateListAnimator="@null"
|
||||||
android:textAlignment="textStart"
|
android:text="@string/BOOKMARK_CLEAR"
|
||||||
android:textColor="@color/c_text_setting_heading"
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="@color/c_text_setting_heading"
|
||||||
|
|
||||||
android:textSize="13sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="RtlSymmetry" />
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
<EditText
|
</LinearLayout>
|
||||||
android:id="@+id/pSearchInput"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
android:layout_weight="30"
|
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_marginBottom="0dp"
|
|
||||||
android:background="@xml/gx_generic_input_square"
|
|
||||||
android:ems="10"
|
|
||||||
android:hint="@string/BOOKMARK_SEARCH_HINT"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:inputType="textNoSuggestions"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="11dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:textColorHint="@color/c_text_v2"
|
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:textColorHighlight="@color/text_color_highlight_v1"
|
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:targetApi="o" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/pRecycleView"
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/pRecycleView"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:paddingBottom="60dp"
|
||||||
android:layout_height="match_parent"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||||
android:layout_marginTop="97dp"
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pHeaderContainer" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pEmptyListNotification"
|
android:id="@+id/pEmptyListNotification"
|
||||||
android:layout_width="150dp"
|
android:layout_width="130dp"
|
||||||
android:layout_height="150dp"
|
android:layout_height="130dp"
|
||||||
android:alpha="0"
|
android:alpha="0"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@drawable/empty_bookmark"
|
android:src="@drawable/empty_bookmark"
|
||||||
app:tint="@color/c_text_v3"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="@color/c_text_v3" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -5,19 +5,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
tools:context="com.darkweb.genesissearchengine.appManager.historyManager.historyController">
|
tools:context="com.darkweb.genesissearchengine.appManager.historyManager.historyController">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pHeaderContainer"
|
android:id="@+id/pHeaderContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="55dp"
|
||||||
|
android:elevation="1dp"
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
android:clickable="true"
|
|
||||||
android:elevation="7dp"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -27,8 +22,6 @@
|
||||||
android:id="@+id/pHeaderContainerTop"
|
android:id="@+id/pHeaderContainerTop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingEnd="7dp"
|
android:paddingEnd="7dp"
|
||||||
|
@ -49,17 +42,48 @@
|
||||||
android:tint="@color/c_navigation_tint" />
|
android:tint="@color/c_navigation_tint" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/pTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="-3dp"
|
android:layout_marginTop="-3dp"
|
||||||
android:layout_weight="40"
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
android:gravity="center_vertical|start"
|
android:gravity="center_vertical|start"
|
||||||
android:onClick="onBackPressed"
|
android:onClick="onBackPressed"
|
||||||
android:text="@string/HOME_TITLE"
|
android:text="@string/HISTORY_TITLE"
|
||||||
android:textColor="@color/c_text_v1"
|
android:textColor="@color/c_text_v1"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/pSearchInput"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_marginTop="2.5dp"
|
||||||
|
android:layout_marginBottom="2.5dp"
|
||||||
|
android:layout_weight="80"
|
||||||
|
android:background="@xml/gx_generic_input"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/HISTORY_SEARCH_HINT"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="11dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:textColor="@color/c_text_v1"
|
||||||
|
android:textColorHighlight="@color/text_color_highlight_v1"
|
||||||
|
android:textColorHint="@color/c_text_v2"
|
||||||
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:targetApi="o" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="40"/>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/pSearchButton"
|
android:id="@+id/pSearchButton"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
|
@ -95,100 +119,63 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/mMainScroll"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fillViewport="true"
|
|
||||||
android:paddingBottom="10dp"
|
|
||||||
android:layout_marginTop="48dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toBottomOf="@+id/pHeaderContainer">
|
||||||
|
|
||||||
<LinearLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/pAppBar"
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/pHeaderContainerBottom"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content">
|
||||||
android:background="@color/c_background"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:id="@+id/pClearButton"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:background="@color/c_background"
|
||||||
android:layout_marginStart="0dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_weight="17"
|
|
||||||
android:background="@xml/gx_ripple_blue"
|
|
||||||
android:paddingStart="20dp"
|
|
||||||
android:stateListAnimator="@null"
|
|
||||||
android:text="@string/HOME_CLEAR"
|
|
||||||
android:textAlignment="textStart"
|
|
||||||
android:textColor="@color/c_text_setting_heading"
|
|
||||||
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:ignore="RtlSymmetry" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed">
|
||||||
|
|
||||||
<EditText
|
<Button
|
||||||
android:id="@+id/pSearchInput"
|
android:id="@+id/pClearButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_weight="17"
|
||||||
android:layout_weight="30"
|
android:background="@xml/gx_ripple_blue"
|
||||||
android:background="@xml/gx_generic_input_square"
|
android:textAllCaps="false"
|
||||||
android:ems="10"
|
android:paddingStart="20dp"
|
||||||
android:hint="@string/HOME_SEARCH_HINT"
|
android:stateListAnimator="@null"
|
||||||
android:importantForAutofill="no"
|
android:text="@string/HISTORY_CLEAR"
|
||||||
android:inputType="textNoSuggestions"
|
android:textAlignment="textStart"
|
||||||
android:maxLines="1"
|
android:textColor="@color/c_text_setting_heading"
|
||||||
android:paddingStart="11dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:textColorHighlight="@color/text_color_highlight_v1"
|
|
||||||
android:textColorHint="@color/c_text_v2"
|
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:targetApi="o" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
<View
|
</LinearLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
android:background="@color/c_view_divier_background_inner"
|
|
||||||
android:paddingStart="10dp"
|
|
||||||
android:paddingEnd="10dp" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/pRecycleView"
|
android:id="@+id/pRecycleView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:paddingBottom="60dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pHeaderContainer" />
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pEmptyListNotification"
|
android:id="@+id/pEmptyListNotification"
|
||||||
android:layout_width="130dp"
|
android:layout_width="130dp"
|
||||||
|
@ -196,11 +183,11 @@
|
||||||
android:alpha="0"
|
android:alpha="0"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@drawable/empty_history"
|
android:src="@drawable/empty_history"
|
||||||
app:tint="@color/c_text_v3"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="@color/c_text_v3" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -7,156 +7,181 @@
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController">
|
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController">
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/webviewContainer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="60dp"
|
|
||||||
android:background="@color/c_background"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/frameLayout">
|
|
||||||
|
|
||||||
<org.mozilla.geckoview.GeckoView
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/pWebView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
android:alpha="1"
|
|
||||||
android:background="@color/c_background"
|
|
||||||
tools:layout_editor_absoluteX="8dp"
|
|
||||||
tools:layout_editor_absoluteY="8dp">
|
|
||||||
|
|
||||||
</org.mozilla.geckoview.GeckoView>
|
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/frameLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="71dp"
|
|
||||||
android:background="#00000000"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/topbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="@xml/ic_secondary_gradinet"
|
|
||||||
android:elevation="7dp"
|
|
||||||
android:gravity="left"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:ignore="RtlHardcoded,UselessParent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:elevation="7dp"
|
|
||||||
android:gravity="left"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:ignore="RtlHardcoded,UselessParent">
|
|
||||||
|
|
||||||
<AutoCompleteTextView
|
|
||||||
android:id="@+id/pSearchInput"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@xml/gx_generic_input"
|
|
||||||
android:completionHintView="@layout/hint_view"
|
|
||||||
android:ems="10"
|
|
||||||
android:hint="@string/GENERAL_SEARCH_HINT"
|
|
||||||
android:importantForAutofill="no"
|
|
||||||
android:inputType="textNoSuggestions"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="15dp"
|
|
||||||
android:paddingRight="15dp"
|
|
||||||
android:popupElevation="5dp"
|
|
||||||
android:selectAllOnFocus="true"
|
|
||||||
android:text="@string/GENERAL_HOME_URL"
|
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:textColorHighlight="@color/text_color_highlight_v3"
|
|
||||||
android:textColorHint="@color/c_text_v1"
|
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:targetApi="o" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:gravity="left"
|
|
||||||
android:onClick="onOpenTabViewBoundary"
|
|
||||||
android:paddingBottom="1dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/newButtonInvoke"
|
|
||||||
android:layout_width="22dp"
|
|
||||||
android:layout_height="22dp"
|
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:layout_marginTop="17dp"
|
|
||||||
android:layout_marginEnd="13dp"
|
|
||||||
android:layout_marginBottom="0dp"
|
|
||||||
android:background="@xml/gx_generic_tab_button"
|
|
||||||
android:clickable="false"
|
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:text="@string/HOME_TAB_TEXT"
|
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:textSize="12.5sp"
|
|
||||||
android:tint="@color/black" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/menu"
|
|
||||||
android:layout_width="35dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="-4dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:background="@xml/gx_ripple_gray"
|
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
|
||||||
android:onClick="onOpenMenuItem"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingTop="15dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:src="@drawable/menu_item"
|
|
||||||
android:tint="@color/c_navigation_tint" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.darkweb.genesissearchengine.widget.AnimatedProgressBar
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/appbar"
|
||||||
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="4dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="55.9dp"
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||||
android:alpha="0"
|
|
||||||
android:max="10000"
|
<FrameLayout
|
||||||
android:progress="0"
|
android:id="@+id/pTopLayout"
|
||||||
android:progressDrawable="@xml/hox_photon_progress"
|
android:layout_width="match_parent"
|
||||||
android:scaleY="0.7"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:background="#00000000"
|
||||||
app:shiftDuration="@integer/progress_shift_duration"
|
app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed"
|
||||||
app:wrapShiftDrawable="true"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:progress="0" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@xml/ic_secondary_gradinet"
|
||||||
|
android:elevation="7dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="RtlHardcoded,UselessParent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:elevation="7dp"
|
||||||
|
android:gravity="left"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="RtlHardcoded,UselessParent">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/pSearchInput"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@xml/gx_generic_input"
|
||||||
|
android:completionHintView="@layout/hint_view"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/GENERAL_SEARCH_HINT"
|
||||||
|
android:importantForAutofill="no"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
android:popupElevation="5dp"
|
||||||
|
android:selectAllOnFocus="true"
|
||||||
|
android:text="@string/GENERAL_HOME_URL"
|
||||||
|
android:textColor="@color/c_text_v1"
|
||||||
|
android:textColorHighlight="@color/text_color_highlight_v3"
|
||||||
|
android:textColorHint="@color/c_text_v1"
|
||||||
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:targetApi="o" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="left"
|
||||||
|
android:onClick="onOpenTabViewBoundary"
|
||||||
|
android:paddingBottom="1dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/newButtonInvoke"
|
||||||
|
android:layout_width="22dp"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="17dp"
|
||||||
|
android:layout_marginEnd="13dp"
|
||||||
|
android:layout_marginBottom="0dp"
|
||||||
|
android:background="@xml/gx_generic_tab_button"
|
||||||
|
android:clickable="false"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:text="@string/HOME_TAB_TEXT"
|
||||||
|
android:textColor="@color/c_text_v1"
|
||||||
|
android:textSize="12.5sp"
|
||||||
|
android:tint="@color/black" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/menu"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-4dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:background="@xml/gx_ripple_gray"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:onClick="onOpenMenuItem"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/menu_item"
|
||||||
|
android:tint="@color/c_navigation_tint" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="fill_vertical"
|
||||||
|
android:fillViewport="true"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/pWebLayoutView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="0dp"
|
||||||
|
android:background="@color/c_background"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pTopLayout">
|
||||||
|
|
||||||
|
<com.darkweb.genesissearchengine.widget.AnimatedProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:alpha="0"
|
||||||
|
android:max="10000"
|
||||||
|
android:layout_marginTop="-1dp"
|
||||||
|
android:progress="0"
|
||||||
|
android:progressDrawable="@xml/hox_photon_progress"
|
||||||
|
android:scaleY="0.7"
|
||||||
|
app:shiftDuration="@integer/progress_shift_duration"
|
||||||
|
app:wrapShiftDrawable="true"
|
||||||
|
tools:progress="0" />
|
||||||
|
|
||||||
|
<com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView
|
||||||
|
android:id="@+id/pWebView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="0dp"
|
||||||
|
android:alpha="1"
|
||||||
|
android:background="@color/c_background"
|
||||||
|
tools:layout_editor_absoluteX="8dp"
|
||||||
|
tools:layout_editor_absoluteY="8dp">
|
||||||
|
</com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView>
|
||||||
|
</FrameLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/pSplashLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/splashScreen"
|
android:id="@+id/splashScreen"
|
||||||
|
@ -266,7 +291,7 @@
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/floatingActionButton3"
|
android:id="@+id/pFloatingLayout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
|
@ -285,7 +310,7 @@
|
||||||
tools:ignore="ExtraText" />
|
tools:ignore="ExtraText" />
|
||||||
|
|
||||||
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
|
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/adView"
|
android:id="@+id/pAdView"
|
||||||
android:layout_width="395dp"
|
android:layout_width="395dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
|
@ -309,7 +334,7 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/frameLayout" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -250,9 +250,9 @@
|
||||||
<string name="SHARED_RECYCLER_VIEW_DELETE" translatable="false">Delete</string>
|
<string name="SHARED_RECYCLER_VIEW_DELETE" translatable="false">Delete</string>
|
||||||
|
|
||||||
<!-- History Popup Menu -->
|
<!-- History Popup Menu -->
|
||||||
<string name="HOME_TITLE" translatable="false">History</string>
|
<string name="HISTORY_TITLE" translatable="false">History</string>
|
||||||
<string name="HOME_CLEAR" translatable="false">Clear</string>
|
<string name="HISTORY_CLEAR" translatable="false">Clear</string>
|
||||||
<string name="HOME_SEARCH_HINT" translatable="false">Search ...</string>
|
<string name="HISTORY_SEARCH_HINT" translatable="false">Search ...</string>
|
||||||
|
|
||||||
<!-- BOOKMARK Popup Menu -->
|
<!-- BOOKMARK Popup Menu -->
|
||||||
<string name="BOOKMARK_TITLE" translatable="false">Bookmark</string>
|
<string name="BOOKMARK_TITLE" translatable="false">Bookmark</string>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<color name="c_view_divier_background_v2">#f2f2f2</color>
|
<color name="c_view_divier_background_v2">#f2f2f2</color>
|
||||||
<color name="c_profile_radial_inner">#000000</color>
|
<color name="c_profile_radial_inner">#000000</color>
|
||||||
<color name="c_profile_radial_outer">#ffffff</color>
|
<color name="c_profile_radial_outer">#ffffff</color>
|
||||||
<color name="c_edittext_background">#e6e6e6</color>
|
<color name="c_edittext_background">#f1f3f4</color>
|
||||||
<color name="c_button_warning">#610505</color>
|
<color name="c_button_warning">#610505</color>
|
||||||
<color name="c_rateus_warning">#b3b3b3</color>
|
<color name="c_rateus_warning">#b3b3b3</color>
|
||||||
<color name="c_splash_buttons">#ffffff</color>
|
<color name="c_splash_buttons">#ffffff</color>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<color name="c_list_alpha_black">#90000000</color>
|
<color name="c_list_alpha_black">#90000000</color>
|
||||||
<color name="c_text_home_menu">#212d45</color>
|
<color name="c_text_home_menu">#212d45</color>
|
||||||
<color name="c_hint_text">#b3b3b3</color>
|
<color name="c_hint_text">#b3b3b3</color>
|
||||||
<color name="c_list_item_current">#e6e6e6</color>
|
<color name="c_list_item_current">#f1f3f4</color>
|
||||||
|
|
||||||
<color name="c_menu_drop_shadow_05">#05e6e6e6</color>
|
<color name="c_menu_drop_shadow_05">#05e6e6e6</color>
|
||||||
<color name="c_menu_drop_shadow_10">#10e6e6e6</color>
|
<color name="c_menu_drop_shadow_10">#10e6e6e6</color>
|
||||||
|
|
|
@ -250,9 +250,9 @@
|
||||||
<string name="SHARED_RECYCLER_VIEW_DELETE" translatable="false">Delete</string>
|
<string name="SHARED_RECYCLER_VIEW_DELETE" translatable="false">Delete</string>
|
||||||
|
|
||||||
<!-- History Popup Menu -->
|
<!-- History Popup Menu -->
|
||||||
<string name="HOME_TITLE" translatable="false">History</string>
|
<string name="HISTORY_TITLE" translatable="false">History</string>
|
||||||
<string name="HOME_CLEAR" translatable="false">Clear</string>
|
<string name="HISTORY_CLEAR" translatable="false">Clear</string>
|
||||||
<string name="HOME_SEARCH_HINT" translatable="false">Search ...</string>
|
<string name="HISTORY_SEARCH_HINT" translatable="false">Search ...</string>
|
||||||
|
|
||||||
<!-- BOOKMARK Popup Menu -->
|
<!-- BOOKMARK Popup Menu -->
|
||||||
<string name="BOOKMARK_TITLE" translatable="false">Bookmark</string>
|
<string name="BOOKMARK_TITLE" translatable="false">Bookmark</string>
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
<item name="android:colorForeground">#bfbfbf</item>
|
<item name="android:colorForeground">#bfbfbf</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="dialog_theme">
|
||||||
|
<item name="android:windowBackground">@xml/ax_shadow</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="WindowAnimationFadeInOut">
|
<style name="WindowAnimationFadeInOut">
|
||||||
<item name="android:windowEnterAnimation">@anim/fade_in</item>
|
<item name="android:windowEnterAnimation">@anim/fade_in</item>
|
||||||
<item name="android:windowExitAnimation">@anim/fade_out</item>
|
<item name="android:windowExitAnimation">@anim/fade_out</item>
|
||||||
|
|
Loading…
Reference in New Issue