Bug Fixes

master
msmannan00 2020-10-24 01:36:58 +05:00
parent 4733f08dc6
commit 31192667e5
15 changed files with 772 additions and 35 deletions

View File

@ -1,10 +1,6 @@
<component name="InspectionProjectProfileManager"> <component name="InspectionProjectProfileManager">
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<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="FieldCanBeLocal" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="FieldCanBeLocal" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="FieldMayBeFinal" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="FieldMayBeFinal" 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" />
@ -15,6 +11,7 @@
<option name="processComments" value="true" /> <option name="processComments" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="SuspiciousListRemoveInLoop" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="SuspiciousListRemoveInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="TrivialIf" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UNCHECKED_WARNING" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="UNCHECKED_WARNING" enabled="false" level="WARNING" enabled_by_default="false" />
</profile> </profile>
</component> </component>

View File

@ -47,6 +47,11 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/SETTING_HEADER" android:label="@string/SETTING_HEADER"
android:windowSoftInputMode="adjustNothing" /> android:windowSoftInputMode="adjustNothing" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager.settingAccessibilityController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/SETTING_HEADER"
android:windowSoftInputMode="adjustNothing" />
<activity <activity
android:name="com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController" android:name="com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

View File

@ -195,7 +195,7 @@ class geckoClients
} }
void onUpdateFont(){ void onUpdateFont(){
float font = (status.sSettingFontSize -100)/4+100; float font = (status.sSettingFontSize -100)/3+100;
mRuntime.getSettings().setAutomaticFontSizeAdjustment(status.sSettingFontAdjustable); mRuntime.getSettings().setAutomaticFontSizeAdjustment(status.sSettingFontAdjustable);
if(!mRuntime.getSettings().getAutomaticFontSizeAdjustment()){ if(!mRuntime.getSettings().getAutomaticFontSizeAdjustment()){
mRuntime.getSettings().setFontSizeFactor(font/100); mRuntime.getSettings().setFontSizeFactor(font/100);

View File

@ -0,0 +1,147 @@
package com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager;
import android.os.Bundle;
import android.view.View;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial;
import java.util.Arrays;
import java.util.List;
public class settingAccessibilityController extends AppCompatActivity {
/* PRIVATE VARIABLES */
private settingAccessibilityModel mSettingAccessibilityModel;
private settingAccessibilityViewController mSettingAccessibilityViewController;
private SwitchMaterial mZoom;
private SwitchMaterial mVoiceInput;
private SwitchMaterial mFontSizeAdjustable;
private SeekBar mSeekBar;
private TextView mSeekBarSample;
private TextView mScalePercentage;
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.setting_accessibility_view);
viewsInitializations();
initializeListeners();
}
public void viewsInitializations() {
mZoom = findViewById(R.id.pZoom);
mVoiceInput = findViewById(R.id.pVoiceInput);
mFontSizeAdjustable = findViewById(R.id.pFontSizeAdjustable);
mSeekBar = findViewById(R.id.pSeekBar);
mSeekBarSample = findViewById(R.id.pSeekBarSample);
mScalePercentage = findViewById(R.id.pScalePercentage);
mSettingAccessibilityViewController = new settingAccessibilityViewController(this, new settingAccessibilityController.settingAccessibilityViewCallback(), mZoom, mVoiceInput, mFontSizeAdjustable, mSeekBar, mSeekBarSample, mScalePercentage);
mSettingAccessibilityModel = new settingAccessibilityModel(new settingAccessibilityController.settingAccessibilityModelCallback());
}
/* LISTENERS */
public class settingAccessibilityViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, enums.etype e_type)
{
return null;
}
}
public class settingAccessibilityModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, enums.etype e_type)
{
return null;
}
}
public void initializeListeners(){
mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {
int percentage = ((progress+5)*10);
mSeekBarSample.setTextSize((int)((12.0*percentage)/100));
mScalePercentage.setText(percentage+"%");
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_FONT_SIZE,percentage));
status.sSettingFontSize = percentage;
activityContextManager.getInstance().getHomeController().onLoadFont();
}
});
}
/* LOCAL OVERRIDES */
@Override
public void onResume()
{
activityContextManager.getInstance().setCurrentActivity(this);
super.onResume();
}
@Override
public void onPause()
{
super.onPause();
}
@Override
public void onBackPressed() {
finish();
}
/*UI Redirection*/
public void onClose(View view){
finish();
}
public void onZoomSettingUpdate(View view){
mSettingAccessibilityModel.onZoomSettingUpdate(!mZoom.isChecked());
mZoom.toggle();
}
public void onVoiceInputSettingUpdate(View view){
mSettingAccessibilityModel.onVoiceInputSettingUpdate(!mVoiceInput.isChecked());
mVoiceInput.toggle();
}
public void onFontSizeAdjustableUpdate(View view){
mSettingAccessibilityModel.onFontSizeAdjustableUpdate(!mFontSizeAdjustable.isChecked());
mFontSizeAdjustable.toggle();
if(!mFontSizeAdjustable.isChecked()){
mSettingAccessibilityViewController.enableFontManual();
}else {
mSettingAccessibilityViewController.disableFontManual();
}
activityContextManager.getInstance().getHomeController().onLoadFont();
}
}

View File

@ -0,0 +1,44 @@
package com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager;
import android.view.View;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import java.util.Arrays;
class settingAccessibilityModel
{
/*Variable Declaration*/
private eventObserver.eventListener mEvent;
/*Initializations*/
settingAccessibilityModel(eventObserver.eventListener mEvent){
this.mEvent = mEvent;
}
/*Helper Methods*/
public void onZoomSettingUpdate(boolean pStatus){
status.sSettingEnableZoom = pStatus;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_ZOOM,pStatus));
}
public void onVoiceInputSettingUpdate(boolean pStatus){
status.sSettingEnableVoiceInput = pStatus;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,pStatus));
}
public void onFontSizeAdjustableUpdate(boolean pStatus){
status.sSettingFontAdjustable = pStatus;
status.sSettingFontSize = 5;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,pStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_FONT_SIZE,(int)status.sSettingFontSize));
}
}

View File

@ -0,0 +1,122 @@
package com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager;
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial;
class settingAccessibilityViewController
{
/*Private Variables*/
private eventObserver.eventListener mEvent;
private AppCompatActivity mContext;
private SwitchMaterial mZoom;
private SwitchMaterial mVoiceInput;
private SwitchMaterial mFontSizeAdjustable;
private SeekBar mSeekBar;
private TextView mSeekBarSample;
private TextView mScalePercentage;
/*Initializations*/
settingAccessibilityViewController(settingAccessibilityController pContext, eventObserver.eventListener pEvent, SwitchMaterial pZoom, SwitchMaterial pVoiceInput, SwitchMaterial pFontSizeAdjustable, SeekBar pSeekBar, TextView mSeekBarSample, TextView pScalePercentage)
{
this.mEvent = pEvent;
this.mContext = pContext;
this.mZoom = pZoom;
this.mVoiceInput = pVoiceInput;
this.mFontSizeAdjustable = pFontSizeAdjustable;
this.mSeekBar = pSeekBar;
this.mSeekBarSample = mSeekBarSample;
this.mScalePercentage = pScalePercentage;
initViews();
initPostUI();
}
private void initPostUI(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = mContext.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
}
else {
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);// set status text dark
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.white));
}
}
}
private void initViews()
{
if(status.sSettingEnableZoom){
mZoom.setChecked(true);
}else {
mZoom.setChecked(false);
}
if(status.sSettingEnableVoiceInput){
mVoiceInput.setChecked(true);
}else {
mVoiceInput.setChecked(false);
}
if(status.sSettingFontAdjustable){
mFontSizeAdjustable.setChecked(true);
mSeekBar.setProgress(5);
mScalePercentage.setText("100%");
mSeekBar.setEnabled(false);
mSeekBar.setAlpha(0.5f);
mScalePercentage.setAlpha(0.5f);
mSeekBarSample.setAlpha(0.3f);
disableFontManual();
}else {
mFontSizeAdjustable.setChecked(false);
mSeekBar.setProgress((int)status.sSettingFontSize/10-5);
int percentage = (int)status.sSettingFontSize;
if(status.sSettingFontSize<100){
mSeekBarSample.setTextSize((int)(12.0*percentage)/100);
}else if(status.sSettingFontSize>100){
mSeekBarSample.setTextSize((int)(12.0*percentage)/100);
}
mScalePercentage.setText(percentage+"%");
mSeekBar.setAlpha(1f);
mScalePercentage.setAlpha(1f);
mSeekBarSample.setAlpha(1f);
mSeekBar.setEnabled(true);
}
}
public void disableFontManual(){
mSeekBar.setProgress(5);
mSeekBarSample.setTextSize(12);
mScalePercentage.setText("100%");
mSeekBar.setEnabled(false);
mSeekBar.animate().setDuration(250).alpha(0.5f);
mScalePercentage.animate().setDuration(250).alpha(0.5f);
mSeekBarSample.animate().setDuration(250).alpha(0.3f);
}
public void enableFontManual(){
mSeekBar.setProgress(5);
mSeekBarSample.setTextSize(12);
mScalePercentage.setText("100%");
mSeekBar.setEnabled(true);
mSeekBar.animate().setDuration(250).alpha(1f);
mScalePercentage.animate().setDuration(250).alpha(1f);
mSeekBarSample.animate().setDuration(250).alpha(1f);
}
}

View File

@ -11,6 +11,7 @@ import android.widget.TextView;
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.appManager.homeManager.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager.settingAccessibilityController;
import com.darkweb.genesissearchengine.appManager.settingManager.notificationManager.settingNotificationController; import com.darkweb.genesissearchengine.appManager.settingManager.notificationManager.settingNotificationController;
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController; import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
@ -222,6 +223,10 @@ public class settingController extends AppCompatActivity
helperMethod.openActivity(settingSearchController.class, constants.CONST_LIST_HISTORY, this,true); helperMethod.openActivity(settingSearchController.class, constants.CONST_LIST_HISTORY, this,true);
} }
public void onManageSearchAccessibility(View view) {
helperMethod.openActivity(settingAccessibilityController.class, constants.CONST_LIST_HISTORY, this,true);
}
/*Event Observer*/ /*Event Observer*/
public class settingViewCallback implements eventObserver.eventListener{ public class settingViewCallback implements eventObserver.eventListener{

View File

@ -124,32 +124,6 @@ class settingModel
status.sSettingHistoryStatus = mHistoryStatus; status.sSettingHistoryStatus = mHistoryStatus;
mEvent.invokeObserver(Collections.singletonList(mHistoryStatus), enums.etype.update_history); mEvent.invokeObserver(Collections.singletonList(mHistoryStatus), enums.etype.update_history);
} }
if(status.sSettingFontAdjustable != mFontAdjustable)
{
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,mFontAdjustable));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_FONT_SIZE,100));
status.sSettingFontAdjustable = mFontAdjustable;
status.sSettingFontSize = 100;
mFontSize = 100;
mEvent.invokeObserver(Collections.singletonList(mFontSize), enums.etype.update_font_adjustable);
}
if(status.sSettingFontSize != mFontSize)
{
if(mFontSize <=0){
mFontSize = 1;
}
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_FONT_SIZE,(int)mFontSize));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,false));
status.sSettingFontSize = mFontSize;
status.sSettingFontAdjustable = false;
mFontAdjustable = false;
mEvent.invokeObserver(Collections.singletonList(mFontSize), enums.etype.update_font_size);
}
if(status.sSettingCookieStatus != mCookieStatus) if(status.sSettingCookieStatus != mCookieStatus)
{ {
status.sSettingCookieStatus = mCookieStatus; status.sSettingCookieStatus = mCookieStatus;

View File

@ -38,6 +38,8 @@ public class keys
public static final String SETTING_NOTIFICATION_STATUS = "NOTIFICATION_STATUS"; public static final String SETTING_NOTIFICATION_STATUS = "NOTIFICATION_STATUS";
public static final String SETTING_SEARCH_HISTORY = "SETTING_SEARCH_HISTORY"; public static final String SETTING_SEARCH_HISTORY = "SETTING_SEARCH_HISTORY";
public static final String SETTING_SEARCH_SUGGESTION = "SETTING_SEARCH_STATUS"; public static final String SETTING_SEARCH_SUGGESTION = "SETTING_SEARCH_STATUS";
public static final String SETTING_ZOOM = "SETTING_ZOOM";
public static final String SETTING_VOICE_INPUT = "SETTING_VOICE_INPUT";
/*Bridge Settings*/ /*Bridge Settings*/

View File

@ -20,6 +20,8 @@ public class status
public static String sSettingRedirectStatus = strings.GENERIC_EMPTY_STR; public static String sSettingRedirectStatus = strings.GENERIC_EMPTY_STR;
public static boolean sSettingEnableZoom = true;
public static boolean sSettingEnableVoiceInput = true;
public static boolean sSettingSearchHistory = false; public static boolean sSettingSearchHistory = false;
public static boolean getsSettingSearchSuggestion = false; public static boolean getsSettingSearchSuggestion = false;
public static boolean sSettingJavaStatus = true; public static boolean sSettingJavaStatus = true;
@ -58,6 +60,8 @@ public class status
status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_BRIDGE_ENABLES,true)); status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_BRIDGE_ENABLES,true));
status.sSettingFontAdjustable = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true)); status.sSettingFontAdjustable = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true));
status.sSettingFirstStart = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FIRST_INSTALLED,true)); status.sSettingFirstStart = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FIRST_INSTALLED,true));
status.sSettingEnableZoom = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_ZOOM,true));
status.sSettingEnableVoiceInput = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true));
status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY)); status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY));
status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100)); status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100));

View File

@ -255,6 +255,70 @@
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/holo_gray_light"/> android:background="@color/holo_gray_light"/>
<LinearLayout
android:id="@+id/pOption5"
android:layout_width="match_parent"
android:layout_height="65dp"
android:onClick="onManageSearchAccessibility"
android:background="@xml/gx_ripple_gray"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="6"
android:layout_height="65dp"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="12dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/blue_dark"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/text_color_v3"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/transparent"
android:scaleX="0.5"
android:scaleY="0.5"
android:src="@xml/ic_arrow_right"
android:contentDescription="@string/GENERAL_TODO" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/holo_gray_light"/>

View File

@ -0,0 +1,355 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager.settingAccessibilityController">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:layout_height="wrap_content">
<!-- Title Header -->
<LinearLayout
android:id="@+id/pHeaderContainerTop"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/white"
android:clickable="true"
android:paddingEnd="7dp"
android:paddingStart="5dp"
android:focusable="true"
android:orientation="horizontal"
tools:ignore="RtlSymmetry">
<ImageButton
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="0dp"
android:layout_marginTop="1dp"
android:background="@xml/gx_ripple_default_round"
android:contentDescription="@string/GENERAL_TODO"
android:onClick="onClose"
android:src="@xml/ic_arrow_back"
android:tint="@color/black" />
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="-3dp"
android:layout_weight="40"
android:gravity="center_vertical|start"
android:text="@string/SETTING_ACCESSIBILITY_HEADER"
android:textColor="@color/text_color_v1"
android:textSize="17sp"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/white_dark" />
<!-- Title Header -->
<LinearLayout
android:id="@+id/pOption2"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onFontSizeAdjustableUpdate"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_weight="6"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="12dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_FONT"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/blue_dark"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_FONT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/text_color_v3"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/pFontSizeAdjustable"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:clickable="false">
</com.google.android.material.switchmaterial.SwitchMaterial>
</LinearLayout>
<LinearLayout
android:id="@+id/pOption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/gx_ripple_gray"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:layout_marginEnd="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_FONT_CUSTOM"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/text_color_v3"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:weightSum="20"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="20dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="200%"
android:id="@+id/pScalePercentage"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/blue_dark"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
<SeekBar
style="@style/Widget.AppCompat.SeekBar.Discrete"
android:thumbTint="@color/secondary"
android:progressTint="@color/secondary"
android:layout_weight="17"
android:id="@+id/pSeekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:max="15"
android:progress="5" />
</LinearLayout>
<TextView
android:id="@+id/pSeekBarSample"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:layout_marginBottom="10dp"
android:background="@color/button_light"
android:layout_marginStart="15dp"
android:clickable="false"
android:padding="10dp"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/SETTING_ACCESSIBILITY_FONT_CUSTOM_SAMPLE"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/headerblack"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/holo_gray_light"/>
<LinearLayout
android:id="@+id/pOption4"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onZoomSettingUpdate"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_weight="6"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="12dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_ZOOM"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/blue_dark"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_ZOOM_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/text_color_v3"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="0dp"
android:layout_height="match_parent"
android:id="@+id/pZoom"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:contentDescription="@string/GENERAL_TODO" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/holo_gray_light"/>
<LinearLayout
android:id="@+id/pOption5"
android:layout_width="match_parent"
android:layout_height="65dp"
android:background="@xml/gx_ripple_gray"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_weight="6"
android:onClick="onVoiceInputSettingUpdate"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginTop="12dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_VOICE"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/blue_dark"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="0.7"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ACCESSIBILITY_VOICE_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/text_color_v3"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="0dp"
android:layout_height="match_parent"
android:id="@+id/pVoiceInput"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:contentDescription="@string/GENERAL_TODO" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/holo_gray_light"/>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -148,6 +148,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="false" android:clickable="false"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="50dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:src="@xml/ic_arrow_right" android:src="@xml/ic_arrow_right"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
@ -222,6 +223,7 @@
android:id="@+id/mRadioSearch_2" android:id="@+id/mRadioSearch_2"
android:layout_weight="1" android:layout_weight="1"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:layout_marginStart="50dp"
android:src="@xml/ic_arrow_right" android:src="@xml/ic_arrow_right"
android:clickable="false" android:clickable="false"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
@ -295,6 +297,7 @@
android:id="@+id/mRadioSearch_3" android:id="@+id/mRadioSearch_3"
android:clickable="false" android:clickable="false"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="50dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:src="@xml/ic_arrow_right" android:src="@xml/ic_arrow_right"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
@ -367,6 +370,7 @@
android:id="@+id/mRadioSearch_4" android:id="@+id/mRadioSearch_4"
android:layout_weight="1" android:layout_weight="1"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:layout_marginStart="50dp"
android:src="@xml/ic_arrow_right" android:src="@xml/ic_arrow_right"
android:clickable="false" android:clickable="false"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
@ -440,6 +444,7 @@
android:id="@+id/mRadioSearch_5" android:id="@+id/mRadioSearch_5"
android:layout_weight="1" android:layout_weight="1"
android:clickable="false" android:clickable="false"
android:layout_marginStart="50dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:src="@xml/ic_arrow_right" android:src="@xml/ic_arrow_right"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />

View File

@ -27,6 +27,7 @@
<color name="holo_gray">#b3b3b3</color> <color name="holo_gray">#b3b3b3</color>
<color name="float_white">#bfbfbf</color> <color name="float_white">#bfbfbf</color>
<color name="button_gray">#d9d9d9</color> <color name="button_gray">#d9d9d9</color>
<color name="button_light">#e3e3e3</color>
<color name="holo_gray_light">#f2f2f2</color> <color name="holo_gray_light">#f2f2f2</color>
<color name="holo_light">#e6e6e6</color> <color name="holo_light">#e6e6e6</color>
<color name="white_darker">#f8f8f8</color> <color name="white_darker">#f8f8f8</color>

View File

@ -46,6 +46,18 @@
<string name="SETTING_SEARCH_SUGGESTIONS" translatable="false">Show search suggestions</string> <string name="SETTING_SEARCH_SUGGESTIONS" translatable="false">Show search suggestions</string>
<string name="SETTING_SEARCH_HISTORY_INFO" translatable="false">Search websites appears when you type in searchbar</string> <string name="SETTING_SEARCH_HISTORY_INFO" translatable="false">Search websites appears when you type in searchbar</string>
<string name="SETTING_SEARCH_SUGGESTION_INFO" translatable="false">Focused suggestions appears when you type in searchbar</string> <string name="SETTING_SEARCH_SUGGESTION_INFO" translatable="false">Focused suggestions appears when you type in searchbar</string>
<string name="SETTING_ACCESSIBILITY" translatable="false">Accessiblity</string>
<string name="SETTING_ACCESSIBILITY_INFO" translatable="false">Text size, zoom, voice input</string>
<string name="SETTING_ACCESSIBILITY_HEADER" translatable="false">Settings | Accessibility</string>
<string name="SETTING_ACCESSIBILITY_FONT" translatable="false">Use system font size</string>
<string name="SETTING_ACCESSIBILITY_FONT_INFO" translatable="false">Scale web content according to system font size</string>
<string name="SETTING_ACCESSIBILITY_ZOOM" translatable="false">Enable Zoom</string>
<string name="SETTING_ACCESSIBILITY_ZOOM_INFO" translatable="false">Enable zoom on all webpages</string>
<string name="SETTING_ACCESSIBILITY_VOICE" translatable="false">Voice input</string>
<string name="SETTING_ACCESSIBILITY_VOICE_INFO" translatable="false">Allow voice dictation in the URL bar</string>
<string name="SETTING_ACCESSIBILITY_FONT_CUSTOM" translatable="false">select custom font scale</string>
<string name="SETTING_ACCESSIBILITY_FONT_CUSTOM_SAMPLE" translatable="false">Drag the slider until you can read this comfortably. Text should look at least this big after double-tapping on a paragraph</string>
<!-- Alerts --> <!-- Alerts -->
<string name="ALERT_CREATE_BOOKMARK" translatable="false">Bookmark Website</string> <string name="ALERT_CREATE_BOOKMARK" translatable="false">Bookmark Website</string>