DF1E
10 years ago
22 changed files with 506 additions and 572 deletions
@ -1,89 +0,0 @@
@@ -1,89 +0,0 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.activity; |
||||
|
||||
import android.content.Intent; |
||||
import android.content.pm.PackageInfo; |
||||
import android.content.pm.PackageManager.NameNotFoundException; |
||||
import android.net.Uri; |
||||
import android.os.Bundle; |
||||
import android.support.v7.widget.Toolbar; |
||||
import android.view.MenuItem; |
||||
import android.view.View; |
||||
import android.view.View.OnClickListener; |
||||
import android.widget.RelativeLayout; |
||||
import android.widget.TextView; |
||||
|
||||
import acr.browser.lightning.R; |
||||
|
||||
public class AboutSettingsActivity extends ThemableSettingsActivity implements OnClickListener { |
||||
|
||||
private int mEasterEggCounter; |
||||
|
||||
@Override |
||||
protected void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
setContentView(R.layout.about_settings); |
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); |
||||
setSupportActionBar(toolbar); |
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||
|
||||
initialize(); |
||||
} |
||||
|
||||
private void initialize() { |
||||
String code = "1.0"; |
||||
try { |
||||
PackageInfo p = getPackageManager().getPackageInfo(getPackageName(), 0); |
||||
code = p.versionName; |
||||
} catch (NameNotFoundException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
|
||||
TextView versionCode = (TextView) findViewById(R.id.versionCode); |
||||
versionCode.setText(code); |
||||
|
||||
RelativeLayout licenses = (RelativeLayout) findViewById(R.id.layoutLicense); |
||||
RelativeLayout source = (RelativeLayout) findViewById(R.id.layoutSource); |
||||
RelativeLayout version = (RelativeLayout) findViewById(R.id.layoutVersion); |
||||
licenses.setOnClickListener(this); |
||||
source.setOnClickListener(this); |
||||
version.setOnClickListener(this); |
||||
} |
||||
|
||||
@Override |
||||
public void onClick(View view) { |
||||
switch (view.getId()) { |
||||
case R.id.layoutLicense: |
||||
// NOTE: In order to comply legally with open source licenses,
|
||||
// it is advised that you leave this code so that the License
|
||||
// Activity may be viewed by the user.
|
||||
startActivity(new Intent(this, LicenseActivity.class)); |
||||
break; |
||||
case R.id.layoutSource: |
||||
startActivity(new Intent(Intent.ACTION_VIEW, |
||||
Uri.parse("http://twitter.com/RestainoAnthony"), this, MainActivity.class)); |
||||
finish(); |
||||
break; |
||||
case R.id.layoutVersion: |
||||
mEasterEggCounter++; |
||||
if (mEasterEggCounter == 10) { |
||||
startActivity(new Intent(Intent.ACTION_VIEW, |
||||
Uri.parse("http://imgs.xkcd.com/comics/compiling.png"), this, |
||||
MainActivity.class)); |
||||
finish(); |
||||
mEasterEggCounter = 0; |
||||
} |
||||
break; |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public boolean onOptionsItemSelected(MenuItem item) { |
||||
finish(); |
||||
return true; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,112 @@
@@ -0,0 +1,112 @@
|
||||
package acr.browser.lightning.activity; |
||||
|
||||
import android.content.res.Configuration; |
||||
import android.os.Bundle; |
||||
import android.preference.PreferenceActivity; |
||||
import android.support.annotation.LayoutRes; |
||||
import android.support.annotation.Nullable; |
||||
import android.support.v7.app.ActionBar; |
||||
import android.support.v7.app.AppCompatDelegate; |
||||
import android.support.v7.widget.Toolbar; |
||||
import android.view.MenuInflater; |
||||
import android.view.View; |
||||
import android.view.ViewGroup; |
||||
|
||||
/** |
||||
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls |
||||
* to be used with AppCompat. |
||||
* <p/> |
||||
* This technique can be used with an {@link android.app.Activity} class, not just |
||||
* {@link android.preference.PreferenceActivity}. |
||||
*/ |
||||
public abstract class AppCompatPreferenceActivity extends PreferenceActivity { |
||||
|
||||
private AppCompatDelegate mDelegate; |
||||
|
||||
@Override |
||||
protected void onCreate(Bundle savedInstanceState) { |
||||
getDelegate().installViewFactory(); |
||||
getDelegate().onCreate(savedInstanceState); |
||||
super.onCreate(savedInstanceState); |
||||
} |
||||
|
||||
@Override |
||||
protected void onPostCreate(Bundle savedInstanceState) { |
||||
super.onPostCreate(savedInstanceState); |
||||
getDelegate().onPostCreate(savedInstanceState); |
||||
} |
||||
|
||||
public ActionBar getSupportActionBar() { |
||||
return getDelegate().getSupportActionBar(); |
||||
} |
||||
|
||||
public void setSupportActionBar(@Nullable Toolbar toolbar) { |
||||
getDelegate().setSupportActionBar(toolbar); |
||||
} |
||||
|
||||
@Override |
||||
public MenuInflater getMenuInflater() { |
||||
return getDelegate().getMenuInflater(); |
||||
} |
||||
|
||||
@Override |
||||
public void setContentView(@LayoutRes int layoutResID) { |
||||
getDelegate().setContentView(layoutResID); |
||||
} |
||||
|
||||
@Override |
||||
public void setContentView(View view) { |
||||
getDelegate().setContentView(view); |
||||
} |
||||
|
||||
@Override |
||||
public void setContentView(View view, ViewGroup.LayoutParams params) { |
||||
getDelegate().setContentView(view, params); |
||||
} |
||||
|
||||
@Override |
||||
public void addContentView(View view, ViewGroup.LayoutParams params) { |
||||
getDelegate().addContentView(view, params); |
||||
} |
||||
|
||||
@Override |
||||
protected void onPostResume() { |
||||
super.onPostResume(); |
||||
getDelegate().onPostResume(); |
||||
} |
||||
|
||||
@Override |
||||
protected void onTitleChanged(CharSequence title, int color) { |
||||
super.onTitleChanged(title, color); |
||||
getDelegate().setTitle(title); |
||||
} |
||||
|
||||
@Override |
||||
public void onConfigurationChanged(Configuration newConfig) { |
||||
super.onConfigurationChanged(newConfig); |
||||
getDelegate().onConfigurationChanged(newConfig); |
||||
} |
||||
|
||||
@Override |
||||
protected void onStop() { |
||||
super.onStop(); |
||||
getDelegate().onStop(); |
||||
} |
||||
|
||||
@Override |
||||
protected void onDestroy() { |
||||
super.onDestroy(); |
||||
getDelegate().onDestroy(); |
||||
} |
||||
|
||||
public void invalidateOptionsMenu() { |
||||
getDelegate().invalidateOptionsMenu(); |
||||
} |
||||
|
||||
private AppCompatDelegate getDelegate() { |
||||
if (mDelegate == null) { |
||||
mDelegate = AppCompatDelegate.create(this, null); |
||||
} |
||||
return mDelegate; |
||||
} |
||||
} |
@ -1,167 +0,0 @@
@@ -1,167 +0,0 @@
|
||||
package acr.browser.lightning.activity; |
||||
|
||||
import java.io.File; |
||||
import java.util.Arrays; |
||||
import java.util.Comparator; |
||||
|
||||
import android.app.AlertDialog; |
||||
import android.app.AlertDialog.Builder; |
||||
import android.app.Dialog; |
||||
import android.content.DialogInterface; |
||||
import android.os.Bundle; |
||||
import android.os.Environment; |
||||
import android.support.v7.widget.Toolbar; |
||||
import android.view.MenuItem; |
||||
import android.view.View; |
||||
import android.view.View.OnClickListener; |
||||
import android.widget.LinearLayout; |
||||
import android.widget.TextView; |
||||
|
||||
import acr.browser.lightning.database.BookmarkManager; |
||||
import acr.browser.lightning.preference.PreferenceManager; |
||||
import acr.browser.lightning.R; |
||||
|
||||
public class BookmarkActivity extends ThemableSettingsActivity implements OnClickListener { |
||||
|
||||
private BookmarkManager mBookmarkManager; |
||||
private File[] mFileList; |
||||
private String[] mFileNameList; |
||||
private static final File mPath = new File(Environment.getExternalStorageDirectory().toString()); |
||||
private static final int DIALOG_LOAD_FILE = 1000; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
setContentView(R.layout.bookmark_settings); |
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); |
||||
setSupportActionBar(toolbar); |
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||
|
||||
LinearLayout exportBackup = (LinearLayout) findViewById(R.id.exportBackup); |
||||
LinearLayout importBackup = (LinearLayout) findViewById(R.id.importBackup); |
||||
LinearLayout importFromBrowser = (LinearLayout) findViewById(R.id.importFromBrowser); |
||||
|
||||
TextView importBookmarks = (TextView) findViewById(R.id.isImportBrowserAvailable); |
||||
|
||||
mBookmarkManager = BookmarkManager.getInstance(getApplicationContext()); |
||||
PreferenceManager mPreferences = PreferenceManager.getInstance(); |
||||
|
||||
boolean systemBrowser = mPreferences.getSystemBrowserPresent(); |
||||
|
||||
exportBackup.setOnClickListener(this); |
||||
importBackup.setOnClickListener(this); |
||||
importFromBrowser.setOnClickListener(this); |
||||
|
||||
if (systemBrowser) { |
||||
importBookmarks.setText(getResources().getString(R.string.stock_browser_available)); |
||||
} else { |
||||
importBookmarks.setText(getResources().getString(R.string.stock_browser_unavailable)); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void onClick(View v) { |
||||
switch (v.getId()) { |
||||
case R.id.importBackup: |
||||
loadFileList(null); |
||||
onCreateDialog(DIALOG_LOAD_FILE); |
||||
break; |
||||
case R.id.importFromBrowser: |
||||
mBookmarkManager.importBookmarksFromBrowser(BookmarkActivity.this); |
||||
break; |
||||
case R.id.exportBackup: |
||||
mBookmarkManager.exportBookmarks(); |
||||
break; |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public boolean onOptionsItemSelected(MenuItem item) { |
||||
finish(); |
||||
return true; |
||||
} |
||||
|
||||
private void loadFileList(File path) { |
||||
File file; |
||||
if (path != null) { |
||||
file = path; |
||||
} else { |
||||
file = mPath; |
||||
} |
||||
try { |
||||
file.mkdirs(); |
||||
} catch (SecurityException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
if (file.exists()) { |
||||
mFileList = file.listFiles(); |
||||
} else { |
||||
mFileList = new File[0]; |
||||
} |
||||
|
||||
Arrays.sort(mFileList, new SortName()); |
||||
|
||||
if (mFileList == null) { |
||||
mFileNameList = new String[0]; |
||||
mFileList = new File[0]; |
||||
} else { |
||||
mFileNameList = new String[mFileList.length]; |
||||
} |
||||
for (int n = 0; n < mFileList.length; n++) { |
||||
mFileNameList[n] = mFileList[n].getName(); |
||||
} |
||||
} |
||||
|
||||
private class SortName implements Comparator<File> { |
||||
|
||||
@Override |
||||
public int compare(File a, File b) { |
||||
if (a.isDirectory() && b.isDirectory()) |
||||
return a.getName().compareTo(b.getName()); |
||||
|
||||
if (a.isDirectory()) |
||||
return -1; |
||||
|
||||
if (b.isDirectory()) |
||||
return 1; |
||||
|
||||
if (a.isFile() && b.isFile()) |
||||
return a.getName().compareTo(b.getName()); |
||||
else |
||||
return 1; |
||||
} |
||||
} |
||||
|
||||
protected Dialog onCreateDialog(int id) { |
||||
Dialog dialog; |
||||
final AlertDialog.Builder builder = new Builder(this); |
||||
|
||||
switch (id) { |
||||
case DIALOG_LOAD_FILE: |
||||
builder.setTitle(R.string.title_chooser); |
||||
if (mFileList == null) { |
||||
dialog = builder.create(); |
||||
return dialog; |
||||
} |
||||
builder.setItems(mFileNameList, new DialogInterface.OnClickListener() { |
||||
|
||||
@Override |
||||
public void onClick(DialogInterface dialog, int which) { |
||||
if (mFileList[which].isDirectory()) { |
||||
loadFileList(mFileList[which]); |
||||
builder.setItems(mFileNameList, this); |
||||
builder.show(); |
||||
} else { |
||||
mBookmarkManager.importBookmarksFromFile(mFileList[which], BookmarkActivity.this); |
||||
} |
||||
} |
||||
|
||||
}); |
||||
break; |
||||
} |
||||
dialog = builder.show(); |
||||
return dialog; |
||||
} |
||||
} |
@ -0,0 +1,42 @@
@@ -0,0 +1,42 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.fragment; |
||||
|
||||
import android.app.Activity; |
||||
import android.content.pm.PackageInfo; |
||||
import android.content.pm.PackageManager; |
||||
import android.os.Bundle; |
||||
import android.preference.Preference; |
||||
import android.preference.PreferenceFragment; |
||||
|
||||
import acr.browser.lightning.R; |
||||
|
||||
public class AboutSettingsFragment extends PreferenceFragment { |
||||
|
||||
private Activity mActivity; |
||||
|
||||
private static final String SETTINGS_VERSION = "pref_version"; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
// Load the preferences from an XML resource
|
||||
addPreferencesFromResource(R.xml.preference_about); |
||||
|
||||
mActivity = getActivity(); |
||||
|
||||
Preference version = findPreference(SETTINGS_VERSION); |
||||
version.setSummary(getVersion()); |
||||
} |
||||
|
||||
private String getVersion() { |
||||
try { |
||||
PackageInfo p = mActivity.getPackageManager().getPackageInfo(mActivity.getPackageName(), 0); |
||||
return p.versionName; |
||||
} catch (PackageManager.NameNotFoundException e) { |
||||
e.printStackTrace(); |
||||
return "1.0"; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.fragment; |
||||
|
||||
import android.app.Activity; |
||||
import android.os.Bundle; |
||||
import android.preference.PreferenceFragment; |
||||
|
||||
import acr.browser.lightning.R; |
||||
|
||||
public class AdvancedSettingsFragment extends PreferenceFragment { |
||||
|
||||
private Activity mActivity; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
// Load the preferences from an XML resource
|
||||
addPreferencesFromResource(R.xml.preference_advanced); |
||||
|
||||
mActivity = getActivity(); |
||||
} |
||||
} |
@ -0,0 +1,168 @@
@@ -0,0 +1,168 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.fragment; |
||||
|
||||
import android.app.Activity; |
||||
import android.app.AlertDialog; |
||||
import android.app.Dialog; |
||||
import android.content.DialogInterface; |
||||
import android.os.Bundle; |
||||
import android.os.Environment; |
||||
import android.preference.Preference; |
||||
import android.preference.PreferenceFragment; |
||||
|
||||
import java.io.File; |
||||
import java.util.Arrays; |
||||
import java.util.Comparator; |
||||
|
||||
import acr.browser.lightning.R; |
||||
import acr.browser.lightning.database.BookmarkManager; |
||||
import acr.browser.lightning.preference.PreferenceManager; |
||||
|
||||
public class BookmarkSettingsFragment extends PreferenceFragment implements Preference.OnPreferenceClickListener { |
||||
|
||||
private static final String SETTINGS_EXPORT = "export_bookmark"; |
||||
private static final String SETTINGS_IMPORT = "import_bookmark"; |
||||
private static final String SETTINGS_BROWSER_IMPORT = "import_browser_bookmark"; |
||||
|
||||
private Activity mActivity; |
||||
private PreferenceManager mPreferences; |
||||
private BookmarkManager mBookmarkManager; |
||||
private File[] mFileList; |
||||
private String[] mFileNameList; |
||||
private static final File mPath = new File(Environment.getExternalStorageDirectory().toString()); |
||||
private static final int DIALOG_LOAD_FILE = 1000; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
// Load the preferences from an XML resource
|
||||
addPreferencesFromResource(R.xml.preference_bookmarks); |
||||
|
||||
mActivity = getActivity(); |
||||
|
||||
mBookmarkManager = BookmarkManager.getInstance(mActivity); |
||||
|
||||
initPrefs(); |
||||
} |
||||
|
||||
private void initPrefs() { |
||||
// mPreferences storage
|
||||
mPreferences = PreferenceManager.getInstance(); |
||||
|
||||
Preference exportpref = findPreference(SETTINGS_EXPORT); |
||||
Preference importpref = findPreference(SETTINGS_IMPORT); |
||||
Preference importBrowserpref = findPreference(SETTINGS_BROWSER_IMPORT); |
||||
|
||||
exportpref.setOnPreferenceClickListener(this); |
||||
importpref.setOnPreferenceClickListener(this); |
||||
importBrowserpref.setOnPreferenceClickListener(this); |
||||
|
||||
if (mPreferences.getSystemBrowserPresent()) { |
||||
importBrowserpref.setSummary(getResources().getString(R.string.stock_browser_available)); |
||||
} else { |
||||
importBrowserpref.setSummary(getResources().getString(R.string.stock_browser_unavailable)); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public boolean onPreferenceClick(Preference preference) { |
||||
switch (preference.getKey()) { |
||||
case SETTINGS_EXPORT: |
||||
mBookmarkManager.exportBookmarks(); |
||||
return true; |
||||
case SETTINGS_IMPORT: |
||||
loadFileList(null); |
||||
onCreateDialog(DIALOG_LOAD_FILE); |
||||
return true; |
||||
case SETTINGS_BROWSER_IMPORT: |
||||
mBookmarkManager.importBookmarksFromBrowser(mActivity); |
||||
return true; |
||||
default: |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
private void loadFileList(File path) { |
||||
File file; |
||||
if (path != null) { |
||||
file = path; |
||||
} else { |
||||
file = mPath; |
||||
} |
||||
try { |
||||
file.mkdirs(); |
||||
} catch (SecurityException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
if (file.exists()) { |
||||
mFileList = file.listFiles(); |
||||
} else { |
||||
mFileList = new File[0]; |
||||
} |
||||
|
||||
Arrays.sort(mFileList, new SortName()); |
||||
|
||||
if (mFileList == null) { |
||||
mFileNameList = new String[0]; |
||||
mFileList = new File[0]; |
||||
} else { |
||||
mFileNameList = new String[mFileList.length]; |
||||
} |
||||
for (int n = 0; n < mFileList.length; n++) { |
||||
mFileNameList[n] = mFileList[n].getName(); |
||||
} |
||||
} |
||||
|
||||
private class SortName implements Comparator<File> { |
||||
|
||||
@Override |
||||
public int compare(File a, File b) { |
||||
if (a.isDirectory() && b.isDirectory()) |
||||
return a.getName().compareTo(b.getName()); |
||||
|
||||
if (a.isDirectory()) |
||||
return -1; |
||||
|
||||
if (b.isDirectory()) |
||||
return 1; |
||||
|
||||
if (a.isFile() && b.isFile()) |
||||
return a.getName().compareTo(b.getName()); |
||||
else |
||||
return 1; |
||||
} |
||||
} |
||||
|
||||
protected Dialog onCreateDialog(int id) { |
||||
Dialog dialog; |
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); |
||||
|
||||
switch (id) { |
||||
case DIALOG_LOAD_FILE: |
||||
builder.setTitle(R.string.title_chooser); |
||||
if (mFileList == null) { |
||||
dialog = builder.create(); |
||||
return dialog; |
||||
} |
||||
builder.setItems(mFileNameList, new DialogInterface.OnClickListener() { |
||||
|
||||
@Override |
||||
public void onClick(DialogInterface dialog, int which) { |
||||
if (mFileList[which].isDirectory()) { |
||||
loadFileList(mFileList[which]); |
||||
builder.setItems(mFileNameList, this); |
||||
builder.show(); |
||||
} else { |
||||
mBookmarkManager.importBookmarksFromFile(mFileList[which], mActivity); |
||||
} |
||||
} |
||||
|
||||
}); |
||||
break; |
||||
} |
||||
dialog = builder.show(); |
||||
return dialog; |
||||
} |
||||
} |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.fragment; |
||||
|
||||
import android.app.Activity; |
||||
import android.os.Bundle; |
||||
import android.preference.PreferenceFragment; |
||||
|
||||
import acr.browser.lightning.R; |
||||
|
||||
public class DisplaySettingsFragment extends PreferenceFragment { |
||||
|
||||
private Activity mActivity; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
// Load the preferences from an XML resource
|
||||
addPreferencesFromResource(R.xml.preference_display); |
||||
|
||||
mActivity = getActivity(); |
||||
} |
||||
} |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
/* |
||||
* Copyright 2014 A.C.R. Development |
||||
*/ |
||||
package acr.browser.lightning.fragment; |
||||
|
||||
import android.app.Activity; |
||||
import android.os.Bundle; |
||||
import android.preference.PreferenceFragment; |
||||
|
||||
import acr.browser.lightning.R; |
||||
|
||||
public class PrivacySettingsFragment extends PreferenceFragment { |
||||
|
||||
private Activity mActivity; |
||||
|
||||
@Override |
||||
public void onCreate(Bundle savedInstanceState) { |
||||
super.onCreate(savedInstanceState); |
||||
// Load the preferences from an XML resource
|
||||
addPreferencesFromResource(R.xml.preference_privacy); |
||||
|
||||
mActivity = getActivity(); |
||||
} |
||||
} |
@ -1,137 +0,0 @@
@@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical" > |
||||
|
||||
<include layout="@layout/toolbar_settings" /> |
||||
|
||||
<ScrollView |
||||
android:id="@+id/scrollView1" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" > |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:orientation="vertical" > |
||||
|
||||
<RelativeLayout |
||||
android:id="@+id/layoutSource" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:minHeight="60dp" |
||||
android:paddingBottom="10dp" |
||||
android:paddingTop="10dp" > |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentLeft="true" |
||||
android:layout_centerVertical="true" |
||||
android:orientation="vertical" > |
||||
|
||||
<TextView |
||||
android:id="@+id/textView1" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/action_follow_me" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/isImportAvailable" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/url_twitter" |
||||
android:textAppearance="?android:attr/textAppearanceSmall" |
||||
android:textColor="@color/light" /> |
||||
</LinearLayout> |
||||
</RelativeLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
|
||||
<RelativeLayout |
||||
android:id="@+id/layoutLicense" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:minHeight="60dp" |
||||
android:paddingBottom="10dp" |
||||
android:paddingTop="10dp" > |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentLeft="true" |
||||
android:layout_centerVertical="true" |
||||
android:orientation="vertical" > |
||||
|
||||
<TextView |
||||
android:id="@+id/textView12" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/licenses" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
</LinearLayout> |
||||
</RelativeLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
|
||||
<RelativeLayout |
||||
android:id="@+id/layoutVersion" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:minHeight="60dp" |
||||
android:paddingBottom="10dp" |
||||
android:paddingTop="10dp" > |
||||
|
||||
<LinearLayout |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentLeft="true" |
||||
android:layout_centerVertical="true" |
||||
android:orientation="vertical" > |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/version" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/versionCode" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="Small Text" |
||||
android:textAppearance="?android:attr/textAppearanceSmall" |
||||
android:textColor="@color/light" /> |
||||
</LinearLayout> |
||||
</RelativeLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
</LinearLayout> |
||||
</ScrollView> |
||||
|
||||
</LinearLayout> |
@ -1,93 +0,0 @@
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical" > |
||||
|
||||
<include layout="@layout/toolbar_settings" /> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/exportBackup" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="60dp" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:gravity="center_vertical" |
||||
android:orientation="vertical" |
||||
android:paddingBottom="10dp" |
||||
android:paddingTop="10dp" > |
||||
|
||||
<TextView |
||||
android:id="@+id/textView1" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/export_bookmarks" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/importBackup" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="60dp" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:gravity="center_vertical" |
||||
android:orientation="vertical" |
||||
android:paddingBottom="10dp" |
||||
android:paddingTop="10dp" > |
||||
|
||||
<TextView |
||||
android:id="@+id/textView2" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/import_backup" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/importFromBrowser" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="60dp" |
||||
android:background="?attr/listChoiceBackgroundIndicator" |
||||
android:gravity="center_vertical" |
||||
android:orientation="vertical" > |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/importbookmarks" |
||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/isImportBrowserAvailable" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingLeft="16dp" |
||||
android:text="@string/recommended" |
||||
android:textAppearance="?android:attr/textAppearanceSmall" |
||||
android:textColor="@color/light" /> |
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="1dp" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="10dp" |
||||
android:background="?attr/dividerColor" /> |
||||
|
||||
</LinearLayout> |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<PreferenceCategory android:title="@string/settings_about"> |
||||
<Preference |
||||
android:title="@string/action_follow_me" |
||||
android:summary="@string/url_twitter"> |
||||
<intent |
||||
android:action="android.intent.action.VIEW" |
||||
android:data="http://twitter.com/RestainoAnthony" /> |
||||
</Preference> |
||||
<Preference android:title="@string/licenses"> |
||||
<intent |
||||
android:targetPackage="acr.browser.lightning" |
||||
android:targetClass="acr.browser.lightning.activity.LicenseActivity" /> |
||||
</Preference> |
||||
<Preference |
||||
android:title="@string/version" |
||||
android:key="pref_version" /> |
||||
</PreferenceCategory> |
||||
</PreferenceScreen> |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<PreferenceCategory android:title="@string/settings_advanced"> |
||||
|
||||
</PreferenceCategory> |
||||
</PreferenceScreen> |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<PreferenceCategory android:title="@string/bookmark_settings"> |
||||
<Preference |
||||
android:key="export_bookmark" |
||||
android:title="@string/export_bookmarks" /> |
||||
<Preference |
||||
android:key="import_bookmark" |
||||
android:title="@string/import_backup" /> |
||||
<Preference |
||||
android:key="import_browser_bookmark" |
||||
android:title="@string/importbookmarks" |
||||
android:summary="@string/recommended" /> |
||||
</PreferenceCategory> |
||||
</PreferenceScreen> |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<PreferenceCategory android:title="@string/settings_display"> |
||||
|
||||
</PreferenceCategory> |
||||
</PreferenceScreen> |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
||||
<PreferenceCategory android:title="@string/settings_privacy"> |
||||
|
||||
</PreferenceCategory> |
||||
</PreferenceScreen> |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.GeneralSettingsFragment" |
||||
android:title="@string/settings_general" /> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.BookmarkSettingsFragment" |
||||
android:title="@string/bookmark_settings" /> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.DisplaySettingsFragment" |
||||
android:title="@string/settings_display" /> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.PrivacySettingsFragment" |
||||
android:title="@string/settings_privacy" /> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.AdvancedSettingsFragment" |
||||
android:title="@string/settings_advanced" /> |
||||
<header |
||||
android:fragment="acr.browser.lightning.fragment.AboutSettingsFragment" |
||||
android:title="@string/settings_about" |
||||
android:summary="@string/settings_about_explain" /> |
||||
</preference-headers> |
Loading…
Reference in new issue