Compare commits
26 Commits
android-0.
...
android-cl
Author | SHA1 | Date | |
---|---|---|---|
6db307c681 | |||
cdec6d2f98 | |||
18a6dc9719 | |||
fb92d7858a | |||
b8e005bdd5 | |||
6568489b27 | |||
3ff3e14fc2 | |||
092591f4ec | |||
895a3a1dcc | |||
dc4ce3f8c7 | |||
7e3b9d5065 | |||
e58ffc9fd4 | |||
0d029988c3 | |||
6f01989a4b | |||
19aeaec406 | |||
b4d1241a9e | |||
fef4aa0e86 | |||
766266b147 | |||
93410c07bb | |||
dc27a782b0 | |||
b633df73c0 | |||
41d1200df7 | |||
c9a62fba9a | |||
c9598fa831 | |||
9965c31b2d | |||
43de6425b2 |
12
.mtn-ignore
@ -39,9 +39,13 @@ signing.properties
|
||||
build
|
||||
|
||||
# I2P-specific ignores
|
||||
^res/raw/blocklist_txt
|
||||
^res/raw/certificates_zip
|
||||
^res/raw/hosts_txt
|
||||
^res/raw/license_
|
||||
^app/src/main/res/drawable/i2plogo.png
|
||||
^app/src/main/res/raw/blocklist_txt
|
||||
^app/src/main/res/raw/hosts_txt
|
||||
^app/src/main/res/raw/license_
|
||||
^app/src/main/res/raw/certificates_zip
|
||||
^app/src/main/assets/themes/console/images
|
||||
^app/src/main/assets/themes/console/light/console.css
|
||||
^app/src/main/assets/themes/console/light/images/header.png
|
||||
^scripts/build.number
|
||||
^scripts/version.properties
|
||||
|
22
README.md
@ -7,9 +7,10 @@
|
||||
- Java SDK (preferably Oracle/Sun or OpenJDK) 1.6.0 or higher
|
||||
- Apache Ant 1.8.0 or higher
|
||||
- I2P source
|
||||
- Android SDK (tested with Rev 22.6.4 and platform-tools version 19.1)
|
||||
- Android SDK for API 21
|
||||
- Android Build Tools 21.0.2
|
||||
- Android Support Repository
|
||||
- Gradle 1.12
|
||||
- Gradle 2.1
|
||||
|
||||
### Gradle
|
||||
|
||||
@ -86,24 +87,15 @@ systemProp.socksProxyPort=9150
|
||||
|
||||
## Client library
|
||||
|
||||
### "Uploading" to a local file repository (to use a local build of the library in a project)
|
||||
### "Uploading" to the local Maven repository (to use a local build of the library in a project)
|
||||
|
||||
1. Add the following line to your `~/.gradle/gradle.properties`:
|
||||
1. `gradle :client:installArchives`
|
||||
|
||||
```
|
||||
localFileRepoDir=/path/to/local/file/repo
|
||||
```
|
||||
|
||||
2. `gradle :client:uploadArchives`
|
||||
|
||||
3. Add the resulting directory to your project as a repository. For Gradle projects, add the following above any existing repositories (so it is checked first):
|
||||
2. Add the local Maven repository to your project. For Gradle projects, add the following above any existing repositories (so it is checked first):
|
||||
|
||||
```
|
||||
repositories {
|
||||
flatDir {
|
||||
name 'fileRepo'
|
||||
dirs file('/path/to/local/file/repo')
|
||||
}
|
||||
mavenLocal()
|
||||
}
|
||||
```
|
||||
|
||||
|
123
app/build.gradle
@ -1,4 +1,4 @@
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'witness'
|
||||
|
||||
android {
|
||||
@ -37,15 +37,19 @@ android {
|
||||
dependencies {
|
||||
compile project(':routerjars')
|
||||
compile project(':client')
|
||||
compile 'com.android.support:support-v4:20.0.0'
|
||||
compile 'com.android.support:appcompat-v7:20.0.0'
|
||||
compile 'com.android.support:support-v4:21.0.0'
|
||||
compile 'com.android.support:appcompat-v7:21.0.0'
|
||||
compile 'com.android.support:recyclerview-v7:21.0.0'
|
||||
compile 'com.android.support:cardview-v7:21.0.0'
|
||||
compile files('libs/androidplot-core-0.6.1.jar')
|
||||
}
|
||||
|
||||
dependencyVerification {
|
||||
verify = [
|
||||
'com.android.support:support-v4:81f2b1c2c94efd5a4ec7fcd97b6cdcd00e87a933905c5c86103c7319eb024572',
|
||||
'com.android.support:appcompat-v7:736f576ab0b68d27bdf18b1e7931566e6d8254b73965175313e87f8866b91547',
|
||||
'com.android.support:support-v4:199ef7bb169386c80b4836354df6747ce2ae3d24434db923c22439e47106a1e2',
|
||||
'com.android.support:appcompat-v7:45e999dda55fe81d9cc1c7342b7b70480ff3f307baa8da0df767f92fc5c52cd1',
|
||||
'com.android.support:recyclerview-v7:ab2390d688601b65e2f3a0718b3d25487e61546c4e20f81eb0b033f30ca15b31',
|
||||
'com.android.support:cardview-v7:7b724eb46efc98eee70c333cd0e9c34ca89b1a4456c3e40cfcc33501c43570bf',
|
||||
]
|
||||
}
|
||||
|
||||
@ -66,58 +70,72 @@ if (propFile.canRead()) {
|
||||
println 'local.properties not found'
|
||||
}
|
||||
|
||||
task copyDrawableResources(type: Copy) {
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
|
||||
into 'src/main/res/drawable'
|
||||
}
|
||||
task certificatesZip(type: Zip) {
|
||||
archiveName = 'certificates_zip'
|
||||
from files('' + i2pbase + '/installer/resources/certificates')
|
||||
}
|
||||
task copyI2PResources(type: Copy) {
|
||||
into 'src/main'
|
||||
into('res/drawable') {
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
|
||||
}
|
||||
into('res/raw') {
|
||||
from(i2pbase + '/installer/resources/blocklist.txt') { rename {'blocklist_txt' } }
|
||||
from(i2pbase + '/installer/resources/hosts.txt') { rename {'hosts_txt' } }
|
||||
from('../LICENSE.txt') { rename {'license_app_txt' } }
|
||||
from('../licenses/LICENSE-Apache2.0.txt') { rename {'license_apache20_txt' } }
|
||||
from(i2pbase + '/licenses') {
|
||||
include { elem ->
|
||||
elem.name in [
|
||||
'LICENSE-ElGamalDSA.txt',
|
||||
'LICENSE-SHA256.txt',
|
||||
'LICENSE-BSD.txt',
|
||||
'LICENSE-SNTP.txt',
|
||||
'LICENSE-LGPLv2.1.txt',
|
||||
'LICENSE-InstallCert.txt',
|
||||
'LICENSE-BlockFile.txt',
|
||||
'LICENSE-GPLv2.txt',
|
||||
'LICENSE-GPLv3.txt',
|
||||
'LICENSE-LGPLv3.txt',
|
||||
'LICENSE-FatCowIcons.txt',
|
||||
'LICENSE-Addressbook.txt',
|
||||
]
|
||||
}
|
||||
rename { String name ->
|
||||
String part = name.substring(8, name.lastIndexOf('.txt'))
|
||||
String.format('license_%s_txt',
|
||||
part.toLowerCase(Locale.US).replace('.', '_'))
|
||||
}
|
||||
task copyRawResources(type:Copy) {
|
||||
from(i2pbase + '/installer/resources/blocklist.txt') { rename { 'blocklist_txt' } }
|
||||
from(i2pbase + '/installer/resources/hosts.txt') { rename { 'hosts_txt' } }
|
||||
from('../LICENSE.txt') { rename { 'license_app_txt' } }
|
||||
from('../licenses/LICENSE-Apache2.0.txt') { rename { 'license_apache20_txt' } }
|
||||
from(i2pbase + '/licenses') {
|
||||
include { elem ->
|
||||
elem.name in [
|
||||
'LICENSE-ElGamalDSA.txt',
|
||||
'LICENSE-SHA256.txt',
|
||||
'LICENSE-BSD.txt',
|
||||
'LICENSE-SNTP.txt',
|
||||
'LICENSE-LGPLv2.1.txt',
|
||||
'LICENSE-InstallCert.txt',
|
||||
'LICENSE-BlockFile.txt',
|
||||
'LICENSE-GPLv2.txt',
|
||||
'LICENSE-GPLv3.txt',
|
||||
'LICENSE-LGPLv3.txt',
|
||||
'LICENSE-FatCowIcons.txt',
|
||||
'LICENSE-Addressbook.txt',
|
||||
]
|
||||
}
|
||||
rename { String name ->
|
||||
String part = name.substring(8, name.lastIndexOf('.txt'))
|
||||
String.format('license_%s_txt',
|
||||
part.toLowerCase(Locale.US).replace('.', '_'))
|
||||
}
|
||||
from certificatesZip
|
||||
}
|
||||
// For peers WebView
|
||||
into('assets/themes/console/images') {
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/inbound.png')
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/outbound.png')
|
||||
}
|
||||
into ('assets/themes/console/light') {
|
||||
from file(i2pbase + '/installer/resources/themes/console/light/console.css')
|
||||
}
|
||||
into('assets/themes/console/light/images') {
|
||||
from file(i2pbase + '/installer/resources/themes/console/light/images/header.png')
|
||||
}
|
||||
from certificatesZip
|
||||
into 'src/main/res/raw'
|
||||
}
|
||||
task copyI2PResources
|
||||
copyI2PResources.dependsOn copyDrawableResources
|
||||
copyI2PResources.dependsOn copyRawResources
|
||||
|
||||
// For peers WebView
|
||||
task copyConsoleImagesAssets(type: Copy) {
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/i2plogo.png')
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/inbound.png')
|
||||
from file(i2pbase + '/installer/resources/themes/console/images/outbound.png')
|
||||
into 'src/main/assets/themes/console/images'
|
||||
}
|
||||
task copyConsoleLightAssets(type: Copy) {
|
||||
from file(i2pbase + '/installer/resources/themes/console/light/console.css')
|
||||
into 'src/main/assets/themes/console/light'
|
||||
}
|
||||
task copyConsoleLightImagesAssets(type: Copy) {
|
||||
from file(i2pbase + '/installer/resources/themes/console/light/images/header.png')
|
||||
into 'src/main/assets/themes/console/light/images'
|
||||
}
|
||||
task copyI2PAssets
|
||||
copyI2PAssets.dependsOn copyConsoleImagesAssets
|
||||
copyI2PAssets.dependsOn copyConsoleLightAssets
|
||||
copyI2PAssets.dependsOn copyConsoleLightImagesAssets
|
||||
|
||||
preBuild.dependsOn copyI2PResources
|
||||
preBuild.dependsOn copyI2PAssets
|
||||
|
||||
task cleanI2PResources(type: Delete) {
|
||||
delete file('src/main/res/drawable/i2plogo.png')
|
||||
delete fileTree('src/main/res/raw') {
|
||||
@ -126,12 +144,15 @@ task cleanI2PResources(type: Delete) {
|
||||
include 'license_*'
|
||||
include 'certificates_zip'
|
||||
}
|
||||
}
|
||||
task cleanI2PAssets(type: Delete) {
|
||||
delete fileTree('src/main/assets/themes/console/images')
|
||||
delete file('src/main/assets/themes/console/light/console.css')
|
||||
delete file('src/main/assets/themes/console/light/images/header.png')
|
||||
}
|
||||
preBuild.dependsOn copyI2PResources
|
||||
|
||||
clean.dependsOn cleanI2PResources
|
||||
clean.dependsOn cleanI2PAssets
|
||||
|
||||
props = new Properties()
|
||||
propFile = new File(project.rootDir, 'signing.properties')
|
||||
|
@ -2,8 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.i2p.android.router"
|
||||
android:installLocation="auto"
|
||||
android:versionCode="4745221"
|
||||
android:versionName="0.9.15">
|
||||
android:versionCode="4745222"
|
||||
android:versionName="0.9.15.1">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
@ -15,7 +15,7 @@
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher_itoopie"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/I2PAndroid">
|
||||
android:theme="@style/Theme.I2P">
|
||||
<service
|
||||
android:name=".service.RouterService"
|
||||
android:icon="@drawable/ic_launcher_itoopie"
|
||||
|
@ -22,8 +22,7 @@ import net.i2p.android.router.dialog.TextResourceDialog;
|
||||
|
||||
import org.sufficientlysecure.htmltextview.HtmlTextView;
|
||||
|
||||
public class HelpActivity extends ActionBarActivity implements
|
||||
BrowserConfigFragment.OnBrowserSelectedListener {
|
||||
public class HelpActivity extends ActionBarActivity {
|
||||
public static final String CATEGORY = "help_category";
|
||||
public static final int CAT_MAIN = 0;
|
||||
public static final int CAT_CONFIGURE_BROWSER = 1;
|
||||
@ -154,11 +153,4 @@ public class HelpActivity extends ActionBarActivity implements
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
// BrowserConfigFragment.OnBrowserSelectedListener
|
||||
|
||||
@Override
|
||||
public void onBrowserSelected(String browserPackage) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
package net.i2p.android.i2ptunnel;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBar.Tab;
|
||||
|
||||
public class TunnelListActivity extends I2PActivityBase implements
|
||||
TunnelListFragment.OnTunnelSelectedListener,
|
||||
@ -16,7 +19,10 @@ public class TunnelListActivity extends I2PActivityBase implements
|
||||
*/
|
||||
private boolean mTwoPane;
|
||||
|
||||
private static final String SELECTED_TAB = "selected_tab";
|
||||
private static final String SELECTED_PAGE = "selected_page";
|
||||
private static final int PAGE_CLIENT = 0;
|
||||
|
||||
private Spinner mSpinner;
|
||||
|
||||
@Override
|
||||
protected boolean canUseTwoPanes() {
|
||||
@ -27,34 +33,22 @@ public class TunnelListActivity extends I2PActivityBase implements
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Set up action bar for tabs
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||
mSpinner = (Spinner) findViewById(R.id.main_spinner);
|
||||
mSpinner.setVisibility(View.VISIBLE);
|
||||
|
||||
// Client tunnels tab
|
||||
TunnelListFragment cf = new TunnelListFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(TunnelListFragment.SHOW_CLIENT_TUNNELS, true);
|
||||
cf.setArguments(args);
|
||||
Tab tab = actionBar.newTab()
|
||||
.setText(R.string.label_i2ptunnel_client)
|
||||
.setTabListener(new TabListener(cf));
|
||||
actionBar.addTab(tab);
|
||||
mSpinner.setAdapter(ArrayAdapter.createFromResource(this,
|
||||
R.array.i2ptunnel_pages, android.R.layout.simple_spinner_dropdown_item));
|
||||
|
||||
// Server tunnels tab
|
||||
TunnelListFragment sf = new TunnelListFragment();
|
||||
args = new Bundle();
|
||||
args.putBoolean(TunnelListFragment.SHOW_CLIENT_TUNNELS, false);
|
||||
sf.setArguments(args);
|
||||
tab = actionBar.newTab()
|
||||
.setText(R.string.label_i2ptunnel_server)
|
||||
.setTabListener(new TabListener(sf));
|
||||
actionBar.addTab(tab);
|
||||
mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
selectPage(i);
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_TAB);
|
||||
actionBar.setSelectedNavigationItem(selected);
|
||||
}
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
}
|
||||
});
|
||||
|
||||
if (findViewById(R.id.detail_fragment) != null) {
|
||||
// The detail container view will be present only in the
|
||||
@ -62,19 +56,34 @@ public class TunnelListActivity extends I2PActivityBase implements
|
||||
// res/values-sw600dp). If this view is present, then the
|
||||
// activity should be in two-pane mode.
|
||||
mTwoPane = true;
|
||||
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
cf.setActivateOnItemClick(true);
|
||||
sf.setActivateOnItemClick(true);
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_PAGE);
|
||||
mSpinner.setSelection(selected);
|
||||
} else
|
||||
selectPage(PAGE_CLIENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(SELECTED_TAB,
|
||||
getSupportActionBar().getSelectedNavigationIndex());
|
||||
outState.putInt(SELECTED_PAGE, mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
||||
private void selectPage(int page) {
|
||||
TunnelListFragment f = new TunnelListFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(TunnelListFragment.SHOW_CLIENT_TUNNELS, page == PAGE_CLIENT);
|
||||
f.setArguments(args);
|
||||
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
if (mTwoPane)
|
||||
f.setActivateOnItemClick(true);
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f).commit();
|
||||
}
|
||||
|
||||
// TunnelListFragment.OnTunnelSelectedListener
|
||||
@ -86,7 +95,7 @@ public class TunnelListActivity extends I2PActivityBase implements
|
||||
// fragment transaction.
|
||||
TunnelDetailFragment detailFrag = TunnelDetailFragment.newInstance(tunnelId);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
} else {
|
||||
// In single-pane mode, simply start the detail activity
|
||||
// for the selected item ID.
|
||||
@ -105,11 +114,11 @@ public class TunnelListActivity extends I2PActivityBase implements
|
||||
TunnelDetailFragment detailFrag = TunnelDetailFragment.newInstance(
|
||||
(tunnelId > 0 ? tunnelId - 1 : 0));
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
} else {
|
||||
TunnelDetailFragment detailFrag = (TunnelDetailFragment) getSupportFragmentManager().findFragmentById(R.id.detail_fragment);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.remove(detailFrag).commit();
|
||||
.remove(detailFrag).commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.ActionBarDrawerToggle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
@ -16,6 +15,8 @@ import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBar.Tab;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@ -60,13 +61,16 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
|
||||
private static final String SHARED_PREFS = "net.i2p.android.router";
|
||||
protected static final String PREF_AUTO_START = "autoStart";
|
||||
/** true leads to a poor install experience, very slow to paint the screen */
|
||||
/**
|
||||
* true leads to a poor install experience, very slow to paint the screen
|
||||
*/
|
||||
protected static final boolean DEFAULT_AUTO_START = false;
|
||||
protected static final String PREF_NAV_DRAWER_OPENED = "navDrawerOpened";
|
||||
|
||||
/**
|
||||
* Override this in subclasses that need a ViewPager, such as a
|
||||
* category view.
|
||||
*
|
||||
* @return whether this Activity needs a ViewPager.
|
||||
*/
|
||||
protected boolean useViewPager() {
|
||||
@ -76,16 +80,18 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
/**
|
||||
* Override this in subclasses that can use two panes, such as a
|
||||
* list/detail class.
|
||||
*
|
||||
* @return whether this Activity can use a two-pane layout.
|
||||
*/
|
||||
protected boolean canUseTwoPanes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
/**
|
||||
* Called when the activity is first created.
|
||||
*/
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Util.d(this + " onCreate called");
|
||||
super.onCreate(savedInstanceState);
|
||||
_sharedPrefs = getSharedPreferences(SHARED_PREFS, 0);
|
||||
@ -102,6 +108,10 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
else
|
||||
setContentView(R.layout.activity_navdrawer_onepane);
|
||||
|
||||
// Set the action bar
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
mTitle = mDrawerTitle = getTitle();
|
||||
String[] activityTitles = getResources().getStringArray(R.array.navdrawer_activity_titles);
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("i2pandroid.main.showStats", false)) {
|
||||
@ -119,16 +129,12 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
mDrawerList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
||||
// Set the adapter for the list view
|
||||
mDrawerList.setAdapter(new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_list_item_1, activityTitles));
|
||||
R.layout.listitem_navdrawer, activityTitles));
|
||||
// Set the list's click listener
|
||||
mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
|
||||
|
||||
// Enable ActionBar app icon to behave as action to toggle nav drawer
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
|
||||
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
|
||||
R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) {
|
||||
R.string.drawer_open, R.string.drawer_close) {
|
||||
private boolean wasDragged = false;
|
||||
|
||||
/** Called when a drawer has settled in a completely closed state. */
|
||||
@ -167,57 +173,55 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
|
||||
private void selectItem(int pos) {
|
||||
switch (pos) {
|
||||
case 1:
|
||||
Intent news = new Intent(I2PActivityBase.this, NewsActivity.class);
|
||||
startActivity(news);
|
||||
break;
|
||||
case 2:
|
||||
Intent ab = new Intent(I2PActivityBase.this, AddressbookActivity.class);
|
||||
startActivity(ab);
|
||||
break;
|
||||
case 3:
|
||||
Intent itb = new Intent(I2PActivityBase.this, TunnelListActivity.class);
|
||||
startActivity(itb);
|
||||
break;
|
||||
case 4:
|
||||
Intent log = new Intent(I2PActivityBase.this, LogActivity.class);
|
||||
startActivity(log);
|
||||
break;
|
||||
case 5:
|
||||
Intent wp = new Intent(I2PActivityBase.this, WebActivity.class);
|
||||
wp.putExtra(WebFragment.HTML_RESOURCE_ID, R.raw.welcome_html);
|
||||
startActivity(wp);
|
||||
break;
|
||||
case 6:
|
||||
Intent active = new Intent(I2PActivityBase.this, RateGraphActivity.class);
|
||||
startActivity(active);
|
||||
break;
|
||||
case 7:
|
||||
Intent peers = new Intent(I2PActivityBase.this, PeersActivity.class);
|
||||
startActivity(peers);
|
||||
break;
|
||||
case 8:
|
||||
Intent netdb = new Intent(I2PActivityBase.this, NetDbActivity.class);
|
||||
startActivity(netdb);
|
||||
break;
|
||||
default:
|
||||
Intent main = new Intent(I2PActivityBase.this, MainActivity.class);
|
||||
startActivity(main);
|
||||
break;
|
||||
case 1:
|
||||
Intent news = new Intent(I2PActivityBase.this, NewsActivity.class);
|
||||
startActivity(news);
|
||||
break;
|
||||
case 2:
|
||||
Intent ab = new Intent(I2PActivityBase.this, AddressbookActivity.class);
|
||||
startActivity(ab);
|
||||
break;
|
||||
case 3:
|
||||
Intent itb = new Intent(I2PActivityBase.this, TunnelListActivity.class);
|
||||
startActivity(itb);
|
||||
break;
|
||||
case 4:
|
||||
Intent log = new Intent(I2PActivityBase.this, LogActivity.class);
|
||||
startActivity(log);
|
||||
break;
|
||||
case 5:
|
||||
Intent wp = new Intent(I2PActivityBase.this, WebActivity.class);
|
||||
wp.putExtra(WebFragment.HTML_RESOURCE_ID, R.raw.welcome_html);
|
||||
startActivity(wp);
|
||||
break;
|
||||
case 6:
|
||||
Intent active = new Intent(I2PActivityBase.this, RateGraphActivity.class);
|
||||
startActivity(active);
|
||||
break;
|
||||
case 7:
|
||||
Intent peers = new Intent(I2PActivityBase.this, PeersActivity.class);
|
||||
startActivity(peers);
|
||||
break;
|
||||
case 8:
|
||||
Intent netdb = new Intent(I2PActivityBase.this, NetDbActivity.class);
|
||||
startActivity(netdb);
|
||||
break;
|
||||
default:
|
||||
Intent main = new Intent(I2PActivityBase.this, MainActivity.class);
|
||||
startActivity(main);
|
||||
break;
|
||||
}
|
||||
mDrawerLayout.closeDrawer(mDrawerList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestart()
|
||||
{
|
||||
public void onRestart() {
|
||||
Util.d(this + " onRestart called");
|
||||
super.onRestart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
public void onStart() {
|
||||
Util.d(this + " onStart called");
|
||||
super.onStart();
|
||||
if (_sharedPrefs.getBoolean(PREF_AUTO_START, DEFAULT_AUTO_START))
|
||||
@ -226,24 +230,32 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
bindRouter(false);
|
||||
}
|
||||
|
||||
/** @param def default */
|
||||
/**
|
||||
* @param def default
|
||||
*/
|
||||
public boolean getPref(String pref, boolean def) {
|
||||
return _sharedPrefs.getBoolean(pref, def);
|
||||
}
|
||||
|
||||
/** @param def default */
|
||||
/**
|
||||
* @param def default
|
||||
*/
|
||||
public String getPref(String pref, String def) {
|
||||
return _sharedPrefs.getString(pref, def);
|
||||
}
|
||||
|
||||
/** @return success */
|
||||
/**
|
||||
* @return success
|
||||
*/
|
||||
public boolean setPref(String pref, boolean val) {
|
||||
SharedPreferences.Editor edit = _sharedPrefs.edit();
|
||||
edit.putBoolean(pref, val);
|
||||
return edit.commit();
|
||||
}
|
||||
|
||||
/** @return success */
|
||||
/**
|
||||
* @return success
|
||||
*/
|
||||
public boolean setPref(String pref, String val) {
|
||||
SharedPreferences.Editor edit = _sharedPrefs.edit();
|
||||
edit.putString(pref, val);
|
||||
@ -251,37 +263,32 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
||||
public void onResume() {
|
||||
Util.d(this + " onResume called");
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause()
|
||||
{
|
||||
public void onPause() {
|
||||
Util.d(this + " onPause called");
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState)
|
||||
{
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
Util.d(this + " onSaveInstanceState called");
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
public void onStop() {
|
||||
Util.d(this + " onStop called");
|
||||
unbindRouter();
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy()
|
||||
{
|
||||
public void onDestroy() {
|
||||
Util.d(this + " onDestroy called");
|
||||
super.onDestroy();
|
||||
}
|
||||
@ -301,6 +308,7 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
/**
|
||||
* Override in subclass with e.g.
|
||||
* menu.findItem(R.id.action_add_to_addressbook).setVisible(!drawerOpen);
|
||||
*
|
||||
* @param drawerOpen true if the drawer is open
|
||||
*/
|
||||
protected void onDrawerChange(boolean drawerOpen) {
|
||||
@ -310,7 +318,7 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// The action bar home/up action should open or close the drawer.
|
||||
// ActionBarDrawerToggle will take care of this.
|
||||
if(mDrawerToggle.onOptionsItemSelected(item)) {
|
||||
if (mDrawerToggle.onOptionsItemSelected(item)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -361,7 +369,7 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
////// Service stuff
|
||||
|
||||
/**
|
||||
* Start the service and bind to it
|
||||
* Start the service and bind to it
|
||||
*/
|
||||
protected boolean startRouter() {
|
||||
Intent intent = new Intent();
|
||||
@ -378,7 +386,7 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind only
|
||||
* Bind only
|
||||
*/
|
||||
protected boolean bindRouter(boolean autoCreate) {
|
||||
Intent intent = new Intent(RouterBinder.class.getName());
|
||||
@ -393,7 +401,7 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
protected void unbindRouter() {
|
||||
Util.d(this + " unbindRouter called with _isBound:" + _isBound + " _connection:" + _connection + " _triedBind:" + _triedBind);
|
||||
if (_triedBind && _connection != null)
|
||||
unbindService(_connection);
|
||||
unbindService(_connection);
|
||||
|
||||
_triedBind = false;
|
||||
_connection = null;
|
||||
@ -424,7 +432,9 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
/** callback from ServiceConnection, override as necessary */
|
||||
/**
|
||||
* callback from ServiceConnection, override as necessary
|
||||
*/
|
||||
protected void onRouterBind(RouterService svc) {
|
||||
Fragment f = getSupportFragmentManager().findFragmentById(R.id.main_fragment);
|
||||
if (f instanceof I2PFragmentBase)
|
||||
@ -441,8 +451,11 @@ public abstract class I2PActivityBase extends ActionBarActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
/** callback from ServiceConnection, override as necessary */
|
||||
protected void onRouterUnbind() {}
|
||||
/**
|
||||
* callback from ServiceConnection, override as necessary
|
||||
*/
|
||||
protected void onRouterUnbind() {
|
||||
}
|
||||
|
||||
// I2PFragmentBase.RouterContextProvider
|
||||
|
||||
|
@ -233,7 +233,7 @@ class InitActivities {
|
||||
* @param overrides local overrides or null
|
||||
*/
|
||||
private void mergeResourceToFile(int resID, String f, Properties overrides) {
|
||||
Util.mergeResourceToFile(ctx, f, myDir, resID, overrides);
|
||||
Util.mergeResourceToFile(ctx, myDir, f, resID, overrides);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,9 +1,5 @@
|
||||
package net.i2p.android.router.addressbook;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.web.WebActivity;
|
||||
import net.i2p.android.router.web.WebFragment;
|
||||
import android.app.Activity;
|
||||
import android.app.SearchManager;
|
||||
import android.content.Context;
|
||||
@ -12,11 +8,18 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBar.Tab;
|
||||
import android.support.v7.widget.SearchView;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.web.WebActivity;
|
||||
import net.i2p.android.router.web.WebFragment;
|
||||
|
||||
public class AddressbookActivity extends I2PActivityBase
|
||||
implements AddressbookFragment.OnAddressSelectedListener,
|
||||
@ -27,7 +30,10 @@ public class AddressbookActivity extends I2PActivityBase
|
||||
*/
|
||||
private boolean mTwoPane;
|
||||
|
||||
private static final String SELECTED_TAB = "selected_tab";
|
||||
private static final String SELECTED_PAGE = "selected_page";
|
||||
private static final int PAGE_ROUTER = 0;
|
||||
|
||||
private Spinner mSpinner;
|
||||
|
||||
@Override
|
||||
protected boolean canUseTwoPanes() {
|
||||
@ -38,36 +44,22 @@ public class AddressbookActivity extends I2PActivityBase
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Set up action bar for tabs
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||
mSpinner = (Spinner) findViewById(R.id.main_spinner);
|
||||
mSpinner.setVisibility(View.VISIBLE);
|
||||
|
||||
// Router book tab
|
||||
AddressbookFragment rf = new AddressbookFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(AddressbookFragment.BOOK_NAME,
|
||||
AddressbookFragment.ROUTER_BOOK);
|
||||
rf.setArguments(args);
|
||||
Tab tab = actionBar.newTab()
|
||||
.setText("Router")
|
||||
.setTabListener(new TabListener(rf));
|
||||
actionBar.addTab(tab);
|
||||
mSpinner.setAdapter(ArrayAdapter.createFromResource(this,
|
||||
R.array.addressbook_pages, android.R.layout.simple_spinner_dropdown_item));
|
||||
|
||||
// Private book tab
|
||||
AddressbookFragment pf = new AddressbookFragment();
|
||||
args = new Bundle();
|
||||
args.putString(AddressbookFragment.BOOK_NAME,
|
||||
AddressbookFragment.PRIVATE_BOOK);
|
||||
pf.setArguments(args);
|
||||
tab = actionBar.newTab()
|
||||
.setText("Private")
|
||||
.setTabListener(new TabListener(pf));
|
||||
actionBar.addTab(tab);
|
||||
mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
selectPage(i);
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_TAB);
|
||||
actionBar.setSelectedNavigationItem(selected);
|
||||
}
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
}
|
||||
});
|
||||
|
||||
if (findViewById(R.id.detail_fragment) != null) {
|
||||
// The detail container view will be present only in the
|
||||
@ -76,13 +68,30 @@ public class AddressbookActivity extends I2PActivityBase
|
||||
// activity should be in two-pane mode.
|
||||
mTwoPane = true;
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_PAGE);
|
||||
mSpinner.setSelection(selected);
|
||||
} else
|
||||
selectPage(PAGE_ROUTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(SELECTED_TAB,
|
||||
getSupportActionBar().getSelectedNavigationIndex());
|
||||
outState.putInt(SELECTED_PAGE, mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
||||
private void selectPage(int page) {
|
||||
AddressbookFragment f = new AddressbookFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(AddressbookFragment.BOOK_NAME,
|
||||
page == PAGE_ROUTER ?
|
||||
AddressbookFragment.ROUTER_BOOK :
|
||||
AddressbookFragment.PRIVATE_BOOK);
|
||||
f.setArguments(args);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f).commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,17 +1,19 @@
|
||||
package net.i2p.android.router.log;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.SettingsActivity;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.SpinnerAdapter;
|
||||
|
||||
public class LogActivity extends I2PActivityBase implements
|
||||
LogFragment.OnEntrySelectedListener {
|
||||
@ -23,6 +25,9 @@ public class LogActivity extends I2PActivityBase implements
|
||||
|
||||
private static final String SELECTED_LEVEL = "selected_level";
|
||||
|
||||
private String[] mLevels;
|
||||
private Spinner mSpinner;
|
||||
|
||||
@Override
|
||||
protected boolean canUseTwoPanes() {
|
||||
return true;
|
||||
@ -32,9 +37,10 @@ public class LogActivity extends I2PActivityBase implements
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Set up action bar for drop-down list
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
||||
mLevels = getResources().getStringArray(R.array.log_level_list);
|
||||
|
||||
mSpinner = (Spinner) findViewById(R.id.main_spinner);
|
||||
mSpinner.setVisibility(View.VISIBLE);
|
||||
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(false);
|
||||
|
||||
@ -46,31 +52,36 @@ public class LogActivity extends I2PActivityBase implements
|
||||
mTwoPane = true;
|
||||
}
|
||||
|
||||
SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this,
|
||||
R.array.log_level_list, android.R.layout.simple_spinner_dropdown_item);
|
||||
mSpinner.setAdapter(ArrayAdapter.createFromResource(this,
|
||||
R.array.log_level_list, android.R.layout.simple_spinner_dropdown_item));
|
||||
|
||||
ActionBar.OnNavigationListener mNavigationListener = new ActionBar.OnNavigationListener() {
|
||||
String[] levels = getResources().getStringArray(R.array.log_level_list);
|
||||
|
||||
public boolean onNavigationItemSelected(int position, long itemId) {
|
||||
String level = levels[position];
|
||||
LogFragment f = LogFragment.newInstance(level);
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
if (mTwoPane)
|
||||
f.setActivateOnItemClick(true);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f, levels[position]).commit();
|
||||
return true;
|
||||
mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
selectLevel(i);
|
||||
}
|
||||
};
|
||||
|
||||
actionBar.setListNavigationCallbacks(mSpinnerAdapter, mNavigationListener);
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
}
|
||||
});
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_LEVEL);
|
||||
actionBar.setSelectedNavigationItem(selected);
|
||||
}
|
||||
mSpinner.setSelection(selected);
|
||||
} else
|
||||
selectLevel(0);
|
||||
}
|
||||
|
||||
private void selectLevel(int i) {
|
||||
String level = mLevels[i];
|
||||
LogFragment f = LogFragment.newInstance(level);
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
if (mTwoPane)
|
||||
f.setActivateOnItemClick(true);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f, level).commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -106,8 +117,7 @@ public class LogActivity extends I2PActivityBase implements
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(SELECTED_LEVEL,
|
||||
getSupportActionBar().getSelectedNavigationIndex());
|
||||
outState.putInt(SELECTED_LEVEL, mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
||||
// LogFragment.OnEntrySelectedListener
|
||||
|
@ -1,14 +1,16 @@
|
||||
package net.i2p.android.router.netdb;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.data.Hash;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBar.Tab;
|
||||
|
||||
public class NetDbActivity extends I2PActivityBase implements
|
||||
NetDbListFragment.OnEntrySelectedListener {
|
||||
@ -18,7 +20,11 @@ public class NetDbActivity extends I2PActivityBase implements
|
||||
*/
|
||||
private boolean mTwoPane;
|
||||
|
||||
private static final String SELECTED_TAB = "selected_tab";
|
||||
private static final String SELECTED_PAGE = "selected_page";
|
||||
private static final int PAGE_STATS = 0;
|
||||
private static final int PAGE_ROUTERS = 1;
|
||||
|
||||
private Spinner mSpinner;
|
||||
|
||||
@Override
|
||||
protected boolean canUseTwoPanes() {
|
||||
@ -29,41 +35,22 @@ public class NetDbActivity extends I2PActivityBase implements
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Set up action bar for tabs
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||
mSpinner = (Spinner) findViewById(R.id.main_spinner);
|
||||
mSpinner.setVisibility(View.VISIBLE);
|
||||
|
||||
// Statistics tab
|
||||
NetDbSummaryPagerFragment sf = new NetDbSummaryPagerFragment();
|
||||
actionBar.addTab(
|
||||
actionBar.newTab()
|
||||
.setText("Statistics")
|
||||
.setTabListener(new NetDbSummaryPagerTabListener(sf)));
|
||||
mSpinner.setAdapter(ArrayAdapter.createFromResource(this,
|
||||
R.array.netdb_pages, android.R.layout.simple_spinner_dropdown_item));
|
||||
|
||||
// Routers tab
|
||||
NetDbListFragment rf = new NetDbListFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(NetDbListFragment.SHOW_ROUTERS, true);
|
||||
rf.setArguments(args);
|
||||
actionBar.addTab(
|
||||
actionBar.newTab()
|
||||
.setText("Routers")
|
||||
.setTabListener(new TabListener(rf)));
|
||||
mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
selectPage(i);
|
||||
}
|
||||
|
||||
// LeaseSets tab
|
||||
NetDbListFragment lf = new NetDbListFragment();
|
||||
args = new Bundle();
|
||||
args.putBoolean(NetDbListFragment.SHOW_ROUTERS, false);
|
||||
lf.setArguments(args);
|
||||
actionBar.addTab(
|
||||
actionBar.newTab()
|
||||
.setText("LeaseSets")
|
||||
.setTabListener(new TabListener(lf)));
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_TAB);
|
||||
actionBar.setSelectedNavigationItem(selected);
|
||||
}
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
}
|
||||
});
|
||||
|
||||
if (findViewById(R.id.detail_fragment) != null) {
|
||||
// The detail container view will be present only in the
|
||||
@ -71,38 +58,37 @@ public class NetDbActivity extends I2PActivityBase implements
|
||||
// res/values-sw600dp). If this view is present, then the
|
||||
// activity should be in two-pane mode.
|
||||
mTwoPane = true;
|
||||
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
rf.setActivateOnItemClick(true);
|
||||
lf.setActivateOnItemClick(true);
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_PAGE);
|
||||
mSpinner.setSelection(selected);
|
||||
} else
|
||||
selectPage(PAGE_STATS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(SELECTED_TAB,
|
||||
getSupportActionBar().getSelectedNavigationIndex());
|
||||
outState.putInt(SELECTED_PAGE, mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
||||
public static class NetDbSummaryPagerTabListener extends TabListener {
|
||||
public NetDbSummaryPagerTabListener(Fragment fragment) {
|
||||
super(fragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabSelected(Tab tab, FragmentTransaction ft) {
|
||||
/**
|
||||
* This is a work-around for Issue 42601
|
||||
* https://code.google.com/p/android/issues/detail?id=42601
|
||||
*
|
||||
* The method getChildFragmentManager() does not clear up
|
||||
* when the Fragment is detached.
|
||||
*/
|
||||
mFragment = new NetDbSummaryPagerFragment();
|
||||
super.onTabSelected(tab, ft);
|
||||
private void selectPage(int page) {
|
||||
Fragment f;
|
||||
if (page == PAGE_STATS)
|
||||
f = new NetDbSummaryPagerFragment();
|
||||
else {
|
||||
f = new NetDbListFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(NetDbListFragment.SHOW_ROUTERS, page == PAGE_ROUTERS);
|
||||
f.setArguments(args);
|
||||
// In two-pane mode, list items should be given the
|
||||
// 'activated' state when touched.
|
||||
if (mTwoPane)
|
||||
((NetDbListFragment) f).setActivateOnItemClick(true);
|
||||
}
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f).commit();
|
||||
}
|
||||
|
||||
// NetDbListFragment.OnEntrySelectedListener
|
||||
@ -115,12 +101,12 @@ public class NetDbActivity extends I2PActivityBase implements
|
||||
NetDbDetailFragment detailFrag = NetDbDetailFragment.newInstance(
|
||||
isRouterInfo, entryHash);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
.replace(R.id.detail_fragment, detailFrag).commit();
|
||||
|
||||
// If we are coming from a LS to a RI, change the tab
|
||||
int currentTab = getSupportActionBar().getSelectedNavigationIndex();
|
||||
if (isRouterInfo && currentTab !=1)
|
||||
getSupportActionBar().setSelectedNavigationItem(1);
|
||||
int currentTab = mSpinner.getSelectedItemPosition();
|
||||
if (isRouterInfo && currentTab != PAGE_ROUTERS)
|
||||
selectPage(PAGE_ROUTERS);
|
||||
} else {
|
||||
// In single-pane mode, simply start the detail activity
|
||||
// for the selected item ID.
|
||||
|
@ -21,8 +21,8 @@ import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.Lease;
|
||||
import net.i2p.data.LeaseSet;
|
||||
import net.i2p.data.RouterAddress;
|
||||
import net.i2p.data.RouterInfo;
|
||||
import net.i2p.data.router.RouterAddress;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import net.i2p.data.DatabaseEntry;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.LeaseSet;
|
||||
import net.i2p.data.RouterInfo;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.router.TunnelPoolSettings;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.util.TreeSet;
|
||||
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.LeaseSet;
|
||||
import net.i2p.data.RouterInfo;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
import net.i2p.router.RouterContext;
|
||||
import android.content.Context;
|
||||
import android.support.v4.content.AsyncTaskLoader;
|
||||
|
@ -7,8 +7,8 @@ import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.RouterAddress;
|
||||
import net.i2p.data.RouterInfo;
|
||||
import net.i2p.data.router.RouterAddress;
|
||||
import net.i2p.data.router.RouterInfo;
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.util.ObjectCounter;
|
||||
import android.content.Context;
|
||||
|
@ -1,15 +1,5 @@
|
||||
package net.i2p.android.router.stats;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.SettingsActivity;
|
||||
import net.i2p.android.router.service.StatSummarizer;
|
||||
import net.i2p.android.router.service.SummaryListener;
|
||||
import net.i2p.stat.Rate;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
@ -17,13 +7,28 @@ import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.SpinnerAdapter;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import net.i2p.android.router.I2PActivityBase;
|
||||
import net.i2p.android.router.R;
|
||||
import net.i2p.android.router.SettingsActivity;
|
||||
import net.i2p.android.router.service.StatSummarizer;
|
||||
import net.i2p.android.router.service.SummaryListener;
|
||||
import net.i2p.stat.Rate;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class RateGraphActivity extends I2PActivityBase {
|
||||
private static final String SELECTED_RATE = "selected_rate";
|
||||
|
||||
private String[] mRates;
|
||||
private long[] mPeriods;
|
||||
private Spinner mSpinner;
|
||||
private boolean mFinishOnResume;
|
||||
|
||||
@Override
|
||||
@ -40,8 +45,8 @@ public class RateGraphActivity extends I2PActivityBase {
|
||||
|
||||
if (ordered.size() > 0) {
|
||||
// Extract the rates and periods
|
||||
final String[] mRates = new String[ordered.size()];
|
||||
final long[] mPeriods = new long[ordered.size()];
|
||||
mRates = new String[ordered.size()];
|
||||
mPeriods = new long[ordered.size()];
|
||||
int i = 0;
|
||||
for (SummaryListener listener : ordered) {
|
||||
Rate r = listener.getRate();
|
||||
@ -50,33 +55,28 @@ public class RateGraphActivity extends I2PActivityBase {
|
||||
i++;
|
||||
}
|
||||
|
||||
// Set up action bar for drop-down list
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
||||
mSpinner = (Spinner) findViewById(R.id.main_spinner);
|
||||
mSpinner.setVisibility(View.VISIBLE);
|
||||
|
||||
SpinnerAdapter mSpinnerAdapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_spinner_dropdown_item, mRates);
|
||||
mSpinner.setAdapter(new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_spinner_dropdown_item, mRates));
|
||||
|
||||
ActionBar.OnNavigationListener mNavigationListener = new ActionBar.OnNavigationListener() {
|
||||
String[] rates = mRates;
|
||||
long[] periods = mPeriods;
|
||||
|
||||
public boolean onNavigationItemSelected(int position, long itemId) {
|
||||
String rateName = rates[position];
|
||||
long period = periods[position];
|
||||
RateGraphFragment f = RateGraphFragment.newInstance(rateName, period);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f, rates[position]).commit();
|
||||
return true;
|
||||
mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
selectRate(i);
|
||||
}
|
||||
};
|
||||
|
||||
actionBar.setListNavigationCallbacks(mSpinnerAdapter, mNavigationListener);
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
}
|
||||
});
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
int selected = savedInstanceState.getInt(SELECTED_RATE);
|
||||
actionBar.setSelectedNavigationItem(selected);
|
||||
}
|
||||
mSpinner.setSelection(selected);
|
||||
} else
|
||||
selectRate(0);
|
||||
} else {
|
||||
DialogFragment df = new DialogFragment() {
|
||||
@Override
|
||||
@ -130,6 +130,14 @@ public class RateGraphActivity extends I2PActivityBase {
|
||||
}
|
||||
}
|
||||
|
||||
private void selectRate(int position) {
|
||||
String rateName = mRates[position];
|
||||
long period = mPeriods[position];
|
||||
RateGraphFragment f = RateGraphFragment.newInstance(rateName, period);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.main_fragment, f, rateName).commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@ -142,8 +150,8 @@ public class RateGraphActivity extends I2PActivityBase {
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putInt(SELECTED_RATE,
|
||||
getSupportActionBar().getSelectedNavigationIndex());
|
||||
if (mSpinner != null)
|
||||
outState.putInt(SELECTED_RATE, mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
||||
private static class AlphaComparator implements Comparator<SummaryListener> {
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_add_white_24dp.png
Normal file
After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_content_copy_white_24dp.png
Normal file
After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_create_white_24dp.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png
Normal file
After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_menu_white_24dp.png
Normal file
After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_play_arrow_white_24dp.png
Normal file
After Width: | Height: | Size: 282 B |
BIN
app/src/main/res/drawable-hdpi/ic_refresh_white_24dp.png
Normal file
After Width: | Height: | Size: 531 B |
BIN
app/src/main/res/drawable-hdpi/ic_search_white_24dp.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
app/src/main/res/drawable-hdpi/ic_stop_white_24dp.png
Normal file
After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_add_white_24dp.png
Normal file
After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_content_copy_white_24dp.png
Normal file
After Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_create_white_24dp.png
Normal file
After Width: | Height: | Size: 272 B |
BIN
app/src/main/res/drawable-mdpi/ic_delete_white_24dp.png
Normal file
After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_menu_white_24dp.png
Normal file
After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_play_arrow_white_24dp.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-mdpi/ic_refresh_white_24dp.png
Normal file
After Width: | Height: | Size: 346 B |
BIN
app/src/main/res/drawable-mdpi/ic_search_white_24dp.png
Normal file
After Width: | Height: | Size: 346 B |
BIN
app/src/main/res/drawable-mdpi/ic_stop_white_24dp.png
Normal file
After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
Normal file
After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_content_copy_white_24dp.png
Normal file
After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_create_white_24dp.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png
Normal file
After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_menu_white_24dp.png
Normal file
After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_play_arrow_white_24dp.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
app/src/main/res/drawable-xhdpi/ic_refresh_white_24dp.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
app/src/main/res/drawable-xhdpi/ic_stop_white_24dp.png
Normal file
After Width: | Height: | Size: 190 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_content_copy_white_24dp.png
Normal file
After Width: | Height: | Size: 436 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_create_white_24dp.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_menu_white_24dp.png
Normal file
After Width: | Height: | Size: 226 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_play_arrow_white_24dp.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_refresh_white_24dp.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_stop_white_24dp.png
Normal file
After Width: | Height: | Size: 211 B |
@ -1,27 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- The main content view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
<Spinner
|
||||
android:id="@+id/main_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
android:background="#111"/>
|
||||
tools:context=".MainActivity">
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
<!-- The main content view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="#111"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</LinearLayout>
|
@ -1,51 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/main_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!--
|
||||
This layout is a two-pane layout for the master/detail
|
||||
flow within a DrawerLayout. See res/values-large/refs.xml
|
||||
and res/values-sw600dp/refs.xml for layout aliases
|
||||
that replace the single-pane version of the layout with
|
||||
this two-pane version.
|
||||
-->
|
||||
|
||||
<!-- The main fragment view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="0dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- The detail fragment view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/detail_fragment"
|
||||
android:layout_width="0dp"
|
||||
<!--
|
||||
This layout is a two-pane layout for the master/detail
|
||||
flow within a DrawerLayout. See res/values-large/refs.xml
|
||||
and res/values-sw600dp/refs.xml for layout aliases
|
||||
that replace the single-pane version of the layout with
|
||||
this two-pane version.
|
||||
-->
|
||||
|
||||
<!-- The main fragment view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- The detail fragment view -->
|
||||
<FrameLayout
|
||||
android:id="@+id/detail_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2" />
|
||||
android:layout_gravity="start"
|
||||
android:background="#111"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
android:background="#111"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</LinearLayout>
|
@ -1,33 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity" >
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
<android.support.v4.view.PagerTitleStrip
|
||||
android:id="@+id/pager_title_strip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top" />
|
||||
</android.support.v4.view.ViewPager>
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.ActionBar" />
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
android:background="#111"/>
|
||||
tools:context=".MainActivity">
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.view.PagerTitleStrip
|
||||
android:id="@+id/pager_title_strip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top" />
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="#111"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</LinearLayout>
|
11
app/src/main/res/layout/listitem_navdrawer.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_entry_height"
|
||||
android:paddingLeft="@dimen/nav_horizontal_margin"
|
||||
android:paddingStart="@dimen/nav_horizontal_margin"
|
||||
android:paddingRight="@dimen/nav_horizontal_margin"
|
||||
android:paddingEnd="@dimen/nav_horizontal_margin"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:gravity="center_vertical"/>
|
@ -4,7 +4,7 @@
|
||||
<!-- Search, should appear as action buttons -->
|
||||
<item android:id="@+id/action_search_addressbook"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom|collapseActionView"
|
||||
i2pandroid:actionViewClass="android.support.v7.widget.SearchView" />
|
||||
</menu>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<!-- Add, should appear as action buttons -->
|
||||
<item android:id="@+id/action_add_to_addressbook"
|
||||
android:title="@string/action_add"
|
||||
android:icon="@drawable/ic_content_new"
|
||||
android:icon="@drawable/ic_add_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
<!-- Settings, Help, should always be in the overflow -->
|
||||
<item android:id="@+id/action_reload_subscriptions"
|
||||
|
@ -3,19 +3,19 @@
|
||||
xmlns:i2pandroid="http://schemas.android.com/apk/res-auto" >
|
||||
<item android:id="@+id/action_start_tunnel"
|
||||
android:title="@string/action_i2ptunnel_start"
|
||||
android:icon="@drawable/ic_av_play"
|
||||
android:icon="@drawable/ic_play_arrow_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/action_stop_tunnel"
|
||||
android:title="@string/action_i2ptunnel_stop"
|
||||
android:icon="@drawable/ic_av_stop"
|
||||
android:icon="@drawable/ic_stop_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/action_edit_tunnel"
|
||||
android:title="@string/action_edit"
|
||||
android:icon="@drawable/ic_content_edit"
|
||||
android:icon="@drawable/ic_create_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/action_delete_tunnel"
|
||||
android:title="@string/action_delete"
|
||||
android:icon="@drawable/ic_content_discard"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:i2pandroid="http://schemas.android.com/apk/res-auto" >
|
||||
<item android:id="@+id/action_add_tunnel"
|
||||
android:title="@string/action_add"
|
||||
android:icon="@drawable/ic_content_new"
|
||||
android:icon="@drawable/ic_add_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/action_start_all_tunnels"
|
||||
android:title="@string/action_i2ptunnel_start_all"
|
||||
|
@ -3,6 +3,6 @@
|
||||
xmlns:i2pandroid="http://schemas.android.com/apk/res-auto" >
|
||||
<item android:id="@+id/action_copy_logs"
|
||||
android:title="@string/copy_logs"
|
||||
android:icon="@drawable/ic_content_copy"
|
||||
android:icon="@drawable/ic_content_copy_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
</menu>
|
@ -3,7 +3,7 @@
|
||||
xmlns:i2pandroid="http://schemas.android.com/apk/res-auto" >
|
||||
<item android:id="@+id/action_refresh"
|
||||
android:title="@string/action_refresh"
|
||||
android:icon="@drawable/ic_navigation_refresh"
|
||||
android:icon="@drawable/ic_refresh_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:i2pandroid="http://schemas.android.com/apk/res-auto" >
|
||||
<item android:title="@string/action_reload"
|
||||
android:id="@+id/menu_reload"
|
||||
android:icon="@drawable/ic_navigation_refresh"
|
||||
android:icon="@drawable/ic_refresh_white_24dp"
|
||||
i2pandroid:showAsAction="ifRoom" >
|
||||
</item>
|
||||
</menu>
|
||||
|
@ -1,3 +1,3 @@
|
||||
http://www.i2p2.i2p/hosts.txt
|
||||
http://i2p-projekt.i2p/hosts.txt
|
||||
http://i2host.i2p/cgi-bin/i2hostetag
|
||||
http://stats.i2p/cgi-bin/newhosts.txt
|
||||
|
@ -30,6 +30,7 @@
|
||||
<string name="char_server_tunnel">S</string>
|
||||
<string name="no_client_tunnels_running">Keine Kliententunnel laufen noch.</string>
|
||||
<string name="configure_browser_title">Browser konfigurieren?</string>
|
||||
<string name="configure_browser_for_i2p">Möchten Sie einen Browser zum Betrachten von I2P Seiten einrichten ? (Sie können dieses auch später noch im Hilfe Menu erledigen).</string>
|
||||
<string name="first_start_title">Herzlichen Glückwunsch, du hast I2P installiert!</string>
|
||||
<string name="first_start_welcome"><b>Willkommen im I2P</b> Bitte <b>hab Geduld</b>, während I2P startet und Teilnehmer findet.</string>
|
||||
<string name="first_start_read">Während du wartest, lies bitte die Veröffentlichungshinweise und die Startseite.</string>
|
||||
|
@ -26,6 +26,9 @@
|
||||
<string name="button_router_on">I2P est en marche (presser longtemps pour arrêter)</string>
|
||||
<!--Character to indicate a client tunnel. Usually first letter of the word "client".-->
|
||||
<!--Character to indicate a server tunnel. Usually first letter of the word "server".-->
|
||||
<string name="no_client_tunnels_running">Aucun tunnel de client n\'est encore en marche.</string>
|
||||
<string name="configure_browser_title">Configurer le navigateur ?</string>
|
||||
<string name="configure_browser_for_i2p">Voudriez-vous configurer un navigateur pour voir les sites d\'I2P ? (vous pouvez aussi faire cela plus tard depuis le menu d\'aide).</string>
|
||||
<string name="first_start_title">Félicitations pour avoir installé I2P !</string>
|
||||
<string name="first_start_welcome"><b>Bienvenue sur I2P !</b> Veuillez <b>patienter</b> pendant qu\'I2P démarre et trouve des pairs.</string>
|
||||
<string name="first_start_read">Pendant que vous patientez, vous pouvez lire les informations de mise à jour et la page d\'accueil.</string>
|
||||
@ -104,6 +107,7 @@
|
||||
<string name="settings_label_expl_backupQuantity">Quantité secours</string>
|
||||
<string name="settings_summ_expl_backupQuantity">%s tunnels</string>
|
||||
<string name="settings_desc_expl_backupQuantity">Combien de tunnels de secours</string>
|
||||
<string name="settings_router_restart_required">Veuillez redémarrer I2P afin d\'appliquer les changements</string>
|
||||
<string name="menu_about">À propos</string>
|
||||
<string name="about_version">Version :</string>
|
||||
<string name="about_project">Page d\'accueil du projet :</string>
|
||||
@ -176,4 +180,10 @@
|
||||
<string name="i2ptunnel_view_target">Cible :</string>
|
||||
<string name="i2ptunnel_view_access_point">Point d\'accès :</string>
|
||||
<string name="i2ptunnel_view_autostart">Démarrage automatique</string>
|
||||
<string name="copy_logs">Copier les historiques (logs)</string>
|
||||
<string name="i2p_android_error_logs">Historiques des erreurs d\'I2P Android</string>
|
||||
<string name="i2p_android_logs">Historiques d\'I2P Android</string>
|
||||
<string name="error_logs_copied_to_clipboard">Les historiques des erreurs ont été copiés dans le presse-papier</string>
|
||||
<string name="logs_copied_to_clipboard">Les historiques ont été copiés dans le presse-papier</string>
|
||||
<string name="label_browser_configuration">Configuration du navigateur</string>
|
||||
</resources>
|
||||
|
@ -25,7 +25,12 @@
|
||||
<string name="button_router_off">길게 눌러 I2P 시작</string>
|
||||
<string name="button_router_on">I2P가 실행중입니다 (길게 눌러 정지)</string>
|
||||
<!--Character to indicate a client tunnel. Usually first letter of the word "client".-->
|
||||
<string name="char_client_tunnel">클</string>
|
||||
<!--Character to indicate a server tunnel. Usually first letter of the word "server".-->
|
||||
<string name="char_server_tunnel">서</string>
|
||||
<string name="no_client_tunnels_running">동작중인 클라이언트 터널이 아직 없습니다.</string>
|
||||
<string name="configure_browser_title">브라우저를 설정할까요?</string>
|
||||
<string name="configure_browser_for_i2p">브라우저가 I2P 사이트들을 볼 수 있게 설정할까요? (추후 도움말 메뉴에서 할 수도 있습니다.)</string>
|
||||
<string name="first_start_title">I2P가 설치 된것을 환영합니다!</string>
|
||||
<string name="first_start_welcome"><b>I2P에 환영합니다!</b> I2P가 시작되고 피어들을 찾을때까지 <b>기다려주세요</b>.</string>
|
||||
<string name="first_start_read">기다리는 동안, 릴리즈 노트와 환영 페이지를 읽어보세요.</string>
|
||||
@ -104,6 +109,7 @@
|
||||
<string name="settings_label_expl_backupQuantity">백업된 수량</string>
|
||||
<string name="settings_summ_expl_backupQuantity">%s 터널들</string>
|
||||
<string name="settings_desc_expl_backupQuantity">터널 백업의 수</string>
|
||||
<string name="settings_router_restart_required">변경사항을 적용하기 위해서 I2P를 다시 시작해주세요</string>
|
||||
<string name="menu_about">알아보기</string>
|
||||
<string name="about_version">버전:</string>
|
||||
<string name="about_project">프로젝트 홈:</string>
|
||||
@ -173,4 +179,10 @@
|
||||
<string name="i2ptunnel_view_target">목표:</string>
|
||||
<string name="i2ptunnel_view_access_point">엑세스 포인트:</string>
|
||||
<string name="i2ptunnel_view_autostart">자동 시작</string>
|
||||
<string name="copy_logs">로그 복사</string>
|
||||
<string name="i2p_android_error_logs">I2P 안드로이드 오류 로그</string>
|
||||
<string name="i2p_android_logs">I2P 안드로이드 로그</string>
|
||||
<string name="error_logs_copied_to_clipboard">클립보드에 오류 로그 복사됨</string>
|
||||
<string name="logs_copied_to_clipboard">클립보드에 로그 복사됨</string>
|
||||
<string name="label_browser_configuration">브라우저 설정</string>
|
||||
</resources>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<string name="welcome_new_version">Nova versão instalada. Por favor leia as notas de revisão. Versão:</string>
|
||||
<string name="label_home">Controle e status</string>
|
||||
<string name="label_tunnels">Tuneis</string>
|
||||
<string name="label_status">Estado</string>
|
||||
<string name="label_addressbook">Livro de endereços</string>
|
||||
<string name="label_i2ptunnel">TunelI2P</string>
|
||||
<string name="label_i2ptunnel_client">Túneis clientes</string>
|
||||
@ -22,7 +23,12 @@
|
||||
<string name="label_browse">Navegador</string>
|
||||
<string name="label_graphs">Gráficos</string>
|
||||
<!--Character to indicate a client tunnel. Usually first letter of the word "client".-->
|
||||
<string name="char_client_tunnel">C</string>
|
||||
<!--Character to indicate a server tunnel. Usually first letter of the word "server".-->
|
||||
<string name="char_server_tunnel">S</string>
|
||||
<string name="no_client_tunnels_running">Por enquanto, nenhum túnel de cliente em execução.</string>
|
||||
<string name="configure_browser_title">Configurar o navegador?</string>
|
||||
<string name="configure_browser_for_i2p">Gostaria de configurar um navegador para visualizar sites da I2P? (Você pode também fazer isso depois a partir do menu ajuda.)</string>
|
||||
<string name="first_start_title">Parabéns em instalar o I2P!</string>
|
||||
<string name="first_start_welcome"><b>Bem-Vindo ao I2P!</b> Por favor <b> tenha paciência </b> enquanto o I2P inicia e procura por peers.</string>
|
||||
<string name="first_start_read">Enquanto você está esperando, por favor leia as notas de lançamento e a página de boas vindas.</string>
|
||||
@ -82,11 +88,15 @@
|
||||
<string name="settings_label_expl_inbound">Túneis entrantes</string>
|
||||
<string name="settings_label_expl_outbound">Tuneis de saída</string>
|
||||
<string name="settings_label_expl_length">Comprimento</string>
|
||||
<string name="settings_summ_expl_length">%s saltos</string>
|
||||
<string name="settings_desc_expl_length">Quantos saltos usar</string>
|
||||
<string name="settings_summ_expl_lengthVariance">%s</string>
|
||||
<string name="settings_label_expl_quantity">Quantidade</string>
|
||||
<string name="settings_summ_expl_quantity">%s tunéis</string>
|
||||
<string name="settings_desc_expl_quantity">Quantos túneis</string>
|
||||
<string name="settings_summ_expl_backupQuantity">%s tuneis</string>
|
||||
<string name="settings_desc_expl_backupQuantity">Quantos backups de túneis</string>
|
||||
<string name="settings_router_restart_required">Por favor, reinicialize o software I2P para aplicar as alterações</string>
|
||||
<string name="menu_about">Sobre</string>
|
||||
<string name="about_version">Versão:</string>
|
||||
<string name="about_project">Lar do projeto:</string>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<string name="desc_i2p_logo">Логотип I2P</string>
|
||||
<string name="welcome_new_install">Добро пожаловать в I2P! Это приложение является альфа-версией и оно не обеспечивает сильной анонимности. Пожалуйста, прочтите примечания к выпуску и информацию о лицензии.</string>
|
||||
<string name="welcome_new_version">Новая версия установлена. Пожалуйста, прочтите примечания к выпуску. Версия:</string>
|
||||
<string name="label_home">Управление и Статус</string>
|
||||
<string name="label_home">Управление и cтатус</string>
|
||||
<string name="label_tunnels">Туннели</string>
|
||||
<string name="label_status">Статус</string>
|
||||
<string name="label_addressbook">Адресная книга</string>
|
||||
@ -25,7 +25,12 @@
|
||||
<string name="button_router_off">Долгое нажатие для запуска I2P</string>
|
||||
<string name="button_router_on">I2P работает (долгое нажатие для остановки)</string>
|
||||
<!--Character to indicate a client tunnel. Usually first letter of the word "client".-->
|
||||
<string name="char_client_tunnel">K</string>
|
||||
<!--Character to indicate a server tunnel. Usually first letter of the word "server".-->
|
||||
<string name="char_server_tunnel">С</string>
|
||||
<string name="no_client_tunnels_running">Ещё нет работающих клиентских туннелей.</string>
|
||||
<string name="configure_browser_title">Настроить браузер?</string>
|
||||
<string name="configure_browser_for_i2p">Настроить браузер для просмотра I2P сайтов? (Вы сможете сделать это позже из меню \"Справка\")</string>
|
||||
<string name="first_start_title">Поздравляем с установкой I2P!</string>
|
||||
<string name="first_start_welcome"><b>Добро пожаловать в I2P!</b> Пожалуйста, <b>дождитесь</b> пока I2P загрузится и найдет узлы.</string>
|
||||
<string name="first_start_read">Пока вы ждете, пожалуйста, прочтите информацию о релизе и страницу приветствия.</string>
|
||||
@ -104,6 +109,7 @@
|
||||
<string name="settings_label_expl_backupQuantity">Резервное количество</string>
|
||||
<string name="settings_summ_expl_backupQuantity">%s туннелей</string>
|
||||
<string name="settings_desc_expl_backupQuantity"> Сколько туннелей резервировать</string>
|
||||
<string name="settings_router_restart_required">Пожалуйста, перезапустите I2P, чтобы изменения вступили в силу</string>
|
||||
<string name="menu_about">О приложении</string>
|
||||
<string name="about_version">Версия:</string>
|
||||
<string name="about_project">Сайт проекта:</string>
|
||||
@ -176,4 +182,10 @@
|
||||
<string name="i2ptunnel_view_target">Назначение:</string>
|
||||
<string name="i2ptunnel_view_access_point">Точка доступа:</string>
|
||||
<string name="i2ptunnel_view_autostart">Авто-запуск</string>
|
||||
<string name="copy_logs">Копировать журналы</string>
|
||||
<string name="i2p_android_error_logs">Журнал ошибок I2P Android</string>
|
||||
<string name="i2p_android_logs">Журналы I2P Android</string>
|
||||
<string name="error_logs_copied_to_clipboard">Журнал ошибок скопирован в буфер</string>
|
||||
<string name="logs_copied_to_clipboard">Журналы скопированы в буфер</string>
|
||||
<string name="label_browser_configuration">Настройки браузера</string>
|
||||
</resources>
|
||||
|
@ -13,6 +13,14 @@
|
||||
<item>@string/label_peers_status</item>
|
||||
<item>NetDB</item>
|
||||
</string-array>
|
||||
<string-array name="addressbook_pages">
|
||||
<item>Router</item>
|
||||
<item>Private</item>
|
||||
</string-array>
|
||||
<string-array name="i2ptunnel_pages">
|
||||
<item>@string/label_i2ptunnel_client</item>
|
||||
<item>@string/label_i2ptunnel_server</item>
|
||||
</string-array>
|
||||
<string-array name="log_level_list">
|
||||
<item>ERROR</item>
|
||||
<item>All</item>
|
||||
@ -24,6 +32,11 @@
|
||||
<item>INFO</item>
|
||||
<item>DEBUG</item>
|
||||
</string-array>
|
||||
<string-array name="netdb_pages">
|
||||
<item>Statistics</item>
|
||||
<item>Routers</item>
|
||||
<item>LeaseSets</item>
|
||||
</string-array>
|
||||
<string-array name="setting0to3">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
|
@ -1,4 +1,8 @@
|
||||
<resources>
|
||||
<color name="primary">#673ab7</color>
|
||||
<color name="primary_dark">#512da8</color>
|
||||
<color name="accent">#ff6e40</color>
|
||||
|
||||
<color name="indicator_red">#ffff0000</color>
|
||||
<color name="indicator_yellow">#ffffff00</color>
|
||||
<color name="indicator_green">#ff00ff00</color>
|
||||
|
@ -3,6 +3,9 @@
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
<dimen name="nav_horizontal_margin">16dp</dimen>
|
||||
<dimen name="nav_entry_height">48dp</dimen>
|
||||
|
||||
<dimen name="tunnel_indicator">20dp</dimen>
|
||||
|
||||
<dimen name="step_pager_tab_width">32dp</dimen>
|
||||
|
@ -1,5 +1,23 @@
|
||||
<resources>
|
||||
<style name="I2PAndroid" parent="Theme.AppCompat" />
|
||||
<style name="Theme.I2P" parent="Theme.AppCompat.NoActionBar">
|
||||
<!-- Here we setting appcompat’s actionBarStyle -->
|
||||
<!--<item name="actionBarStyle">@style/MyActionBarStyle</item>-->
|
||||
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
||||
<!-- You can also set colorControlNormal, colorControlActivated
|
||||
colorControlHighlight & colorSwitchThumbNormal. -->
|
||||
|
||||
<!-- The rest of your attributes -->
|
||||
</style>
|
||||
|
||||
<style name="WizardPageContainer">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|