Version 1.14.0

Switching to AppCompatActivity, better Navigation drawer, DFU bug fixed.
This commit is contained in:
Aleksander Nowakowski
2015-06-04 17:17:25 +02:00
parent fe23ee9657
commit 93e2bb2d3b
93 changed files with 4711 additions and 3980 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="nRFToolbox" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="nRFToolbox" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
@@ -12,8 +12,9 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
@@ -85,13 +86,13 @@
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-22.1.1" level="project" />
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
<orderEntry type="library" exported="" name="design-22.2.0" level="project" />
<orderEntry type="library" exported="" name="nrf-logger-v2.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
<orderEntry type="library" exported="" name="achartengine-1.1.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.1.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
<orderEntry type="module" module-name="dfu" exported="" />
</component>
</module>
</module>

View File

@@ -7,8 +7,8 @@ android {
applicationId "no.nordicsemi.android.nrftoolbox"
minSdkVersion 18
targetSdkVersion 22
versionCode 32
versionName "1.13.1"
versionCode 33
versionName "1.14.0"
}
buildTypes {
release {
@@ -20,7 +20,8 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile project(':..:DFULibrary:dfu')
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/nrf-logger-v2.0.jar')

View File

@@ -23,8 +23,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="no.nordicsemi.android.nrftoolbox"
android:installLocation="auto"
android:versionCode="32"
android:versionName="1.13.1" >
android:versionCode="33"
android:versionName="1.14.1" >
<uses-sdk
android:minSdkVersion="18"
@@ -57,6 +57,7 @@
<activity
android:name="no.nordicsemi.android.nrftoolbox.FeaturesActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.TranslucentStatusBar"
android:launchMode="singleTask" >
</activity>

View File

@@ -21,11 +21,12 @@
*/
package no.nordicsemi.android.nrftoolbox;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
public class AppHelpFragment extends DialogFragment {
private static final String ARG_TEXT = "ARG_TEXT";
@@ -54,6 +55,7 @@ public class AppHelpFragment extends DialogFragment {
}
@Override
@NonNull
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final Bundle args = getArguments();
final StringBuilder text = new StringBuilder(getString(args.getInt(ARG_TEXT)));

View File

@@ -34,8 +34,9 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -50,7 +51,7 @@ import java.util.List;
import no.nordicsemi.android.nrftoolbox.adapter.AppAdapter;
public class FeaturesActivity extends ActionBarActivity {
public class FeaturesActivity extends AppCompatActivity {
private static final String MCP_CATEGORY = "no.nordicsemi.android.nrftoolbox.LAUNCHER";
private static final String UTILS_CATEGORY = "no.nordicsemi.android.nrftoolbox.UTILS";
private static final String MCP_PACKAGE = "no.nordicsemi.android.mcp";
@@ -65,6 +66,9 @@ public class FeaturesActivity extends ActionBarActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_features);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
// ensure that Bluetooth exists
if (!ensureBLEExists())
finish();
@@ -73,7 +77,13 @@ public class FeaturesActivity extends ActionBarActivity {
drawer.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
// Set the drawer toggle as the DrawerListener
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close);
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close) {
@Override
public void onDrawerSlide(final View drawerView, final float slideOffset) {
// Disable the Hamburger icon animation
super.onDrawerSlide(drawerView, 0);
}
};
drawer.setDrawerListener(mDrawerToggle);
// setup plug-ins in the drawer
@@ -117,7 +127,7 @@ public class FeaturesActivity extends ActionBarActivity {
switch (item.getItemId()) {
case R.id.action_about:
final AppHelpFragment fragment = AppHelpFragment.getInstance(R.string.about_text, true);
fragment.show(getFragmentManager(), null);
fragment.show(getSupportFragmentManager(), null);
break;
}
return true;

View File

@@ -19,7 +19,8 @@ package no.nordicsemi.android.nrftoolbox.app;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.View;
@@ -132,7 +133,7 @@ import no.nordicsemi.android.nrftoolbox.R;
* @see #setListAdapter
* @see android.widget.ExpandableListView
*/
public class ExpandableListActivity extends ActionBarActivity implements
public class ExpandableListActivity extends AppCompatActivity implements
OnCreateContextMenuListener,
ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener,
ExpandableListView.OnGroupExpandListener {
@@ -182,7 +183,7 @@ public class ExpandableListActivity extends ActionBarActivity implements
* @see Activity#onRestoreInstanceState(Bundle)
*/
@Override
protected void onRestoreInstanceState(Bundle state) {
protected void onRestoreInstanceState(@NonNull Bundle state) {
ensureList();
super.onRestoreInstanceState(state);
}
@@ -190,10 +191,10 @@ public class ExpandableListActivity extends ActionBarActivity implements
/**
* Updates the screen state (current list and other views) when the content changes.
*
* @see ActionBarActivity#onSupportContentChanged()
* @see android.support.v7.app.AppCompatActivity#onContentChanged()
*/
@Override
public void onSupportContentChanged() {
public void onContentChanged() {
super.onContentChanged();
View emptyView = findViewById(R.id.empty);
mList = (ExpandableListView) findViewById(R.id.list);

View File

@@ -46,7 +46,7 @@ public class BPMActivity extends BleProfileActivity implements BPMManagerCallbac
private TextView mTimestampView;
@Override
protected void onCreateView(Bundle savedInstanceState) {
protected void onCreateView(final Bundle savedInstanceState) {
setContentView(R.layout.activity_feature_bpm);
setGUI();
}

View File

@@ -23,19 +23,25 @@
package no.nordicsemi.android.nrftoolbox.csc.settings;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
public class SettingsActivity extends ActionBarActivity {
import no.nordicsemi.android.nrftoolbox.R;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
getFragmentManager().beginTransaction().replace(R.id.content, new SettingsFragment()).commit();
}
@Override

View File

@@ -23,8 +23,6 @@ package no.nordicsemi.android.nrftoolbox.dfu;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.app.AlertDialog;
import android.app.FragmentManager;
import android.app.LoaderManager.LoaderCallbacks;
import android.app.NotificationManager;
import android.bluetooth.BluetoothAdapter;
@@ -47,8 +45,9 @@ import android.os.Handler;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
@@ -81,7 +80,7 @@ import no.nordicsemi.android.nrftoolbox.utility.DebugLogger;
* DeviceScannerFragment.OnDeviceSelectedListener callback to receive callback when device is selected from scanning dialog The activity supports portrait and
* landscape orientations
*/
public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cursor>, ScannerFragment.OnDeviceSelectedListener,
public class DfuActivity extends AppCompatActivity implements LoaderCallbacks<Cursor>, ScannerFragment.OnDeviceSelectedListener,
UploadCancelFragment.CancelFragmentListener {
private static final String TAG = "DfuActivity";
@@ -197,8 +196,9 @@ public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cu
}
private void setGUI() {
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mDeviceNameView = (TextView) findViewById(R.id.device_name);
mFileNameView = (TextView) findViewById(R.id.file_name);
@@ -270,9 +270,8 @@ public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cu
}
private void showDeviceScanningDialog() {
final FragmentManager fm = getFragmentManager();
final ScannerFragment dialog = ScannerFragment.getInstance(DfuActivity.this, null, false); // Device that is advertising directly does not have the GENERAL_DISCOVERABLE nor LIMITED_DISCOVERABLE flag set.
dialog.show(fm, "scan_fragment");
dialog.show(getSupportFragmentManager(), "scan_fragment");
}
private void ensureSamplesExist() {
@@ -436,7 +435,7 @@ public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cu
break;
case R.id.action_about:
final AppHelpFragment fragment = AppHelpFragment.getInstance(R.string.dfu_about_text);
fragment.show(getFragmentManager(), "help_fragment");
fragment.show(getSupportFragmentManager(), "help_fragment");
break;
case R.id.action_settings:
final Intent intent = new Intent(this, SettingsActivity.class);
@@ -676,7 +675,7 @@ public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cu
@Override
public void onClick(final DialogInterface dialog, final int which) {
final ZipInfoFragment fragment = new ZipInfoFragment();
fragment.show(getFragmentManager(), "help_fragment");
fragment.show(getSupportFragmentManager(), "help_fragment");
}
}).setNegativeButton(R.string.cancel, null).show();
}
@@ -763,7 +762,7 @@ public class DfuActivity extends ActionBarActivity implements LoaderCallbacks<Cu
manager.sendBroadcast(pauseAction);
final UploadCancelFragment fragment = UploadCancelFragment.getInstance();
fragment.show(getFragmentManager(), TAG);
fragment.show(getSupportFragmentManager(), TAG);
}
/**

View File

@@ -22,10 +22,10 @@
package no.nordicsemi.android.nrftoolbox.dfu;
import android.app.Activity;
import android.bluetooth.BluetoothDevice;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import no.nordicsemi.android.nrftoolbox.scanner.ScannerFragment;
@@ -33,7 +33,7 @@ import no.nordicsemi.android.nrftoolbox.scanner.ScannerFragment;
* The activity is started only by a remote connected computer using ADB. It shows a list of DFU-supported devices in range and allows user to select target device. The HEX file will be uploaded to
* selected device using {@link DfuService}.
*/
public class DfuInitiatorActivity extends Activity implements ScannerFragment.OnDeviceSelectedListener {
public class DfuInitiatorActivity extends AppCompatActivity implements ScannerFragment.OnDeviceSelectedListener {
@Override
protected void onCreate(final Bundle savedInstanceState) {
@@ -46,7 +46,7 @@ public class DfuInitiatorActivity extends Activity implements ScannerFragment.On
if (savedInstanceState == null) {
final ScannerFragment fragment = ScannerFragment.getInstance(this, null, false); // Device that is advertising directly does not have the GENERAL_DISCOVERABLE nor LIMITED_DISCOVERABLE flag set.
fragment.show(getFragmentManager(), null);
fragment.show(getSupportFragmentManager(), null);
}
}

View File

@@ -22,13 +22,14 @@
package no.nordicsemi.android.nrftoolbox.dfu.fragment;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import no.nordicsemi.android.nrftoolbox.R;
@@ -61,7 +62,8 @@ public class UploadCancelFragment extends DialogFragment {
}
}
@Override
@NonNull
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity()).setTitle(R.string.dfu_confirmation_dialog_title).setMessage(R.string.dfu_upload_dialog_cancel_message).setCancelable(false)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {

View File

@@ -21,10 +21,11 @@
*/
package no.nordicsemi.android.nrftoolbox.dfu.fragment;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
@@ -33,6 +34,7 @@ import no.nordicsemi.android.nrftoolbox.R;
public class ZipInfoFragment extends DialogFragment {
@Override
@NonNull
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_zip_info, null);
return new AlertDialog.Builder(getActivity()).setView(view).setTitle(R.string.dfu_file_info).setPositiveButton(R.string.ok, null).create();

View File

@@ -23,19 +23,25 @@
package no.nordicsemi.android.nrftoolbox.dfu.settings;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
public class SettingsActivity extends ActionBarActivity {
import no.nordicsemi.android.nrftoolbox.R;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
getFragmentManager().beginTransaction().replace(R.id.content, new SettingsFragment()).commit();
}
@Override

View File

@@ -21,11 +21,12 @@
*/
package no.nordicsemi.android.nrftoolbox.dfu.settings;
import android.app.AlertDialog;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import no.nordicsemi.android.dfu.DfuSettingsConstants;
import no.nordicsemi.android.nrftoolbox.R;
@@ -81,8 +82,13 @@ public class SettingsFragment extends PreferenceFragment implements DfuSettingsC
final PreferenceScreen screen = getPreferenceScreen();
final SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
final String value = preferences.getString(SETTINGS_NUMBER_OF_PACKETS, String.valueOf(SETTINGS_NUMBER_OF_PACKETS_DEFAULT));
screen.findPreference(SETTINGS_NUMBER_OF_PACKETS).setSummary(value);
String value = preferences.getString(SETTINGS_NUMBER_OF_PACKETS, String.valueOf(SETTINGS_NUMBER_OF_PACKETS_DEFAULT));
// Security check
if (TextUtils.isEmpty(value)) {
value = String.valueOf(SETTINGS_NUMBER_OF_PACKETS_DEFAULT);
preferences.edit().putString(SETTINGS_NUMBER_OF_PACKETS, value).apply();
}
screen.findPreference(SETTINGS_NUMBER_OF_PACKETS).setSummary(value);
final int valueInt = Integer.parseInt(value);
if (valueInt > 200) {

View File

@@ -512,7 +512,7 @@ public class GlucoseManager extends BleManager<GlucoseManagerCallbacks> {
/**
* Sends the request to delete all data from the device. A Record Access Control Point indication with status code ({@link #RESPONSE_SUCCESS} (or other in case of error) will be send.
*
* @FIXME This method is not supported by Nordic Semiconductor Glucose Service in SDK 4.4.2.
* FIXME This method is not supported by Nordic Semiconductor Glucose Service in SDK 4.4.2.
*/
public void deleteAllRecords() {
if (mRecordAccessControlPointCharacteristic == null)

View File

@@ -24,6 +24,7 @@ package no.nordicsemi.android.nrftoolbox.hrs;
import android.graphics.Point;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -83,7 +84,7 @@ public class HRSActivity extends BleProfileActivity implements HRSManagerCallbac
}
@Override
protected void onRestoreInstanceState(final Bundle savedInstanceState) {
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
if (savedInstanceState != null) {

View File

@@ -23,19 +23,25 @@
package no.nordicsemi.android.nrftoolbox.hts.settings;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
public class SettingsActivity extends ActionBarActivity {
import no.nordicsemi.android.nrftoolbox.R;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
getFragmentManager().beginTransaction().replace(R.id.content, new SettingsFragment()).commit();
}
@Override

View File

@@ -23,9 +23,6 @@ package no.nordicsemi.android.nrftoolbox.parser;
import android.bluetooth.BluetoothGattCharacteristic;
import java.util.ArrayList;
import java.util.List;
// TODO this method may be used for developing purposes to log the data from your device using the nRF Logger application.
public class TemplateParser {
// TODO add some flags, if needed

View File

@@ -29,7 +29,9 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -47,7 +49,7 @@ import no.nordicsemi.android.nrftoolbox.R;
import no.nordicsemi.android.nrftoolbox.scanner.ScannerFragment;
import no.nordicsemi.android.nrftoolbox.utility.DebugLogger;
public abstract class BleProfileActivity extends ActionBarActivity implements BleManagerCallbacks, ScannerFragment.OnDeviceSelectedListener {
public abstract class BleProfileActivity extends AppCompatActivity implements BleManagerCallbacks, ScannerFragment.OnDeviceSelectedListener {
private static final String TAG = "BaseProfileActivity";
private static final String CONNECTION_STATUS = "connection_status";
@@ -82,6 +84,10 @@ public abstract class BleProfileActivity extends ActionBarActivity implements Bl
mBleManager = initializeManager();
onInitialize(savedInstanceState);
onCreateView(savedInstanceState);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
onViewCreated(savedInstanceState);
}
@@ -128,7 +134,7 @@ public abstract class BleProfileActivity extends ActionBarActivity implements Bl
}
@Override
protected void onRestoreInstanceState(final Bundle savedInstanceState) {
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mDeviceConnected = savedInstanceState.getBoolean(CONNECTION_STATUS);
mDeviceName = savedInstanceState.getString(DEVICE_NAME);
@@ -167,7 +173,7 @@ public abstract class BleProfileActivity extends ActionBarActivity implements Bl
break;
case R.id.action_about:
final AppHelpFragment fragment = AppHelpFragment.getInstance(getAboutTextId());
fragment.show(getFragmentManager(), "help_fragment");
fragment.show(getSupportFragmentManager(), "help_fragment");
break;
default:
return onOptionsItemSelected(id);
@@ -407,7 +413,7 @@ public abstract class BleProfileActivity extends ActionBarActivity implements Bl
@Override
public void run() {
final ScannerFragment dialog = ScannerFragment.getInstance(BleProfileActivity.this, filter, discoverableRequired);
dialog.show(getFragmentManager(), "scan_fragment");
dialog.show(getSupportFragmentManager(), "scan_fragment");
}
});
}

View File

@@ -29,6 +29,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -82,6 +83,10 @@ public abstract class BleProfileExpandableListActivity extends ExpandableListAct
mBleManager = initializeManager();
onInitialize(savedInstanceState);
onCreateView(savedInstanceState);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
onViewCreated(savedInstanceState);
}
@@ -165,7 +170,7 @@ public abstract class BleProfileExpandableListActivity extends ExpandableListAct
break;
case R.id.action_about:
final AppHelpFragment fragment = AppHelpFragment.getInstance(getAboutTextId());
fragment.show(getFragmentManager(), "help_fragment");
fragment.show(getSupportFragmentManager(), "help_fragment");
break;
default:
return onOptionsItemSelected(id);
@@ -413,7 +418,7 @@ public abstract class BleProfileExpandableListActivity extends ExpandableListAct
@Override
public void run() {
final ScannerFragment dialog = ScannerFragment.getInstance(BleProfileExpandableListActivity.this, filter, discoverableRequired);
dialog.show(getFragmentManager(), "scan_fragment");
dialog.show(getSupportFragmentManager(), "scan_fragment");
}
});
}

View File

@@ -36,8 +36,10 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
import android.support.annotation.NonNull;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -67,7 +69,7 @@ import no.nordicsemi.android.nrftoolbox.utility.DebugLogger;
* listens for it. When entering back to the activity, activity will to bind to the service and refresh UI.
* </p>
*/
public abstract class BleProfileServiceReadyActivity<E extends BleProfileService.LocalBinder> extends ActionBarActivity implements
public abstract class BleProfileServiceReadyActivity<E extends BleProfileService.LocalBinder> extends AppCompatActivity implements
ScannerFragment.OnDeviceSelectedListener, BleManagerCallbacks {
private static final String TAG = "BleProfileServiceReadyActivity";
@@ -213,6 +215,10 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
*/
onInitialize(savedInstanceState);
onCreateView(savedInstanceState);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
onViewCreated(savedInstanceState);
LocalBroadcastManager.getInstance(this).registerReceiver(mCommonBroadcastReceiver, makeIntentFilter());
@@ -343,7 +349,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
}
@Override
protected void onRestoreInstanceState(final Bundle savedInstanceState) {
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mDeviceName = savedInstanceState.getString(DEVICE_NAME);
}
@@ -374,7 +380,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
break;
case R.id.action_about:
final AppHelpFragment fragment = AppHelpFragment.getInstance(getAboutTextId());
fragment.show(getFragmentManager(), "help_fragment");
fragment.show(getSupportFragmentManager(), "help_fragment");
break;
default:
return onOptionsItemSelected(id);
@@ -643,7 +649,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
*/
private void showDeviceScanningDialog(final UUID filter, final boolean discoverableRequired) {
final ScannerFragment dialog = ScannerFragment.getInstance(BleProfileServiceReadyActivity.this, filter, discoverableRequired);
dialog.show(getFragmentManager(), "scan_fragment");
dialog.show(getSupportFragmentManager(), "scan_fragment");
}
/**

View File

@@ -21,10 +21,11 @@
*/
package no.nordicsemi.android.nrftoolbox.proximity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import no.nordicsemi.android.nrftoolbox.R;
@@ -50,7 +51,8 @@ public class LinklossFragment extends DialogFragment {
mName = getArguments().getString(ARG_NAME);
}
@Override
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity()).setTitle(getString(R.string.app_name)).setMessage(getString(R.string.proximity_notification_linkloss_alert, mName))
.setPositiveButton(R.string.ok, null).create();

View File

@@ -21,7 +21,6 @@
*/
package no.nordicsemi.android.nrftoolbox.proximity;
import android.app.FragmentManager;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
@@ -201,9 +200,8 @@ public class ProximityActivity extends BleProfileServiceReadyActivity<ProximityS
private void showLinklossDialog(final String name) {
try {
FragmentManager fm = getFragmentManager();
LinklossFragment dialog = LinklossFragment.getInstance(name);
dialog.show(fm, "scan_fragment");
final LinklossFragment dialog = LinklossFragment.getInstance(name);
dialog.show(getSupportFragmentManager(), "scan_fragment");
} catch (final Exception e) {
// the activity must have been destroyed
}

View File

@@ -105,19 +105,19 @@ public class RSCActivity extends BleProfileServiceReadyActivity<RSCService.RSCBi
switch (unit) {
case SettingsFragment.SETTINGS_UNIT_M_S: // [m/s]
mSpeedUnitView.setText(R.string.csc_speed_unit_m_s);
mDistanceUnitView.setText(R.string.csc_distance_unit_m);
mTotalDistanceUnitView.setText(R.string.csc_total_distance_unit_km);
mSpeedUnitView.setText(R.string.rsc_speed_unit_m_s);
mDistanceUnitView.setText(R.string.rsc_distance_unit_m);
mTotalDistanceUnitView.setText(R.string.rsc_total_distance_unit_km);
break;
case SettingsFragment.SETTINGS_UNIT_KM_H: // [km/h]
mSpeedUnitView.setText(R.string.csc_speed_unit_km_h);
mDistanceUnitView.setText(R.string.csc_distance_unit_m);
mTotalDistanceUnitView.setText(R.string.csc_total_distance_unit_km);
mSpeedUnitView.setText(R.string.rsc_speed_unit_km_h);
mDistanceUnitView.setText(R.string.rsc_distance_unit_m);
mTotalDistanceUnitView.setText(R.string.rsc_total_distance_unit_km);
break;
case SettingsFragment.SETTINGS_UNIT_MPH: // [mph]
mSpeedUnitView.setText(R.string.csc_speed_unit_mph);
mDistanceUnitView.setText(R.string.csc_distance_unit_yd);
mTotalDistanceUnitView.setText(R.string.csc_total_distance_unit_mile);
mSpeedUnitView.setText(R.string.rsc_speed_unit_mph);
mDistanceUnitView.setText(R.string.rsc_distance_unit_yd);
mTotalDistanceUnitView.setText(R.string.rsc_total_distance_unit_mile);
break;
}
}

View File

@@ -23,19 +23,25 @@
package no.nordicsemi.android.nrftoolbox.rsc.settings;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
public class SettingsActivity extends ActionBarActivity {
import no.nordicsemi.android.nrftoolbox.R;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
getFragmentManager().beginTransaction().replace(R.id.content, new SettingsFragment()).commit();
}
@Override

View File

@@ -22,9 +22,7 @@
package no.nordicsemi.android.nrftoolbox.scanner;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothManager;
@@ -33,6 +31,9 @@ import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.os.ParcelUuid;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
@@ -144,7 +145,8 @@ public class ScannerFragment extends DialogFragment {
/**
* When dialog is created then set AlertDialog with list and button views.
*/
@Override
@NonNull
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final View dialogView = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_device_selection, null);

View File

@@ -23,19 +23,25 @@
package no.nordicsemi.android.nrftoolbox.template.settings;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
public class SettingsActivity extends ActionBarActivity {
import no.nordicsemi.android.nrftoolbox.R;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Display the fragment as the main content.
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
getFragmentManager().beginTransaction().replace(R.id.content, new SettingsFragment()).commit();
}
@Override

View File

@@ -32,6 +32,7 @@ import android.graphics.drawable.TransitionDrawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.widget.SlidingPaneLayout;
import android.view.View;
@@ -76,7 +77,7 @@ public class UARTActivity extends BleProfileServiceReadyActivity<UARTService.UAR
@Override
public void onPanelClosed(final View panel) {
// Close the keyboard
final UARTLogFragment logFragment = (UARTLogFragment) getFragmentManager().findFragmentById(R.id.fragment_log);
final UARTLogFragment logFragment = (UARTLogFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_log);
logFragment.onFragmentHidden();
}
});
@@ -84,7 +85,7 @@ public class UARTActivity extends BleProfileServiceReadyActivity<UARTService.UAR
}
@Override
protected void onRestoreInstanceState(final Bundle savedInstanceState) {
protected void onRestoreInstanceState(final @NonNull Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mEditMode = savedInstanceState.getBoolean(SIS_EDIT_MODE);
@@ -134,7 +135,7 @@ public class UARTActivity extends BleProfileServiceReadyActivity<UARTService.UAR
super.onDeviceSelected(device, name);
// Notify the log fragment about it
final UARTLogFragment logFragment = (UARTLogFragment) getFragmentManager().findFragmentById(R.id.fragment_log);
final UARTLogFragment logFragment = (UARTLogFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_log);
logFragment.onServiceStarted();
}
@@ -176,7 +177,7 @@ public class UARTActivity extends BleProfileServiceReadyActivity<UARTService.UAR
return;
}
if (mEditMode) {
final UARTControlFragment fragment = (UARTControlFragment) getFragmentManager().findFragmentById(R.id.fragment_control);
final UARTControlFragment fragment = (UARTControlFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_control);
fragment.setEditMode(false);
return;
}

View File

@@ -23,10 +23,10 @@
package no.nordicsemi.android.nrftoolbox.uart;
import android.app.Activity;
import android.app.Fragment;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;

View File

@@ -22,12 +22,13 @@
package no.nordicsemi.android.nrftoolbox.uart;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -62,7 +63,8 @@ public class UARTEditDialog extends DialogFragment implements View.OnClickListen
return fragment;
}
@Override
@NonNull
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
final LayoutInflater inflater = LayoutInflater.from(getActivity());

View File

@@ -22,19 +22,19 @@
package no.nordicsemi.android.nrftoolbox.uart;
import android.app.ListFragment;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.Loader;
import android.content.ServiceConnection;
import android.database.Cursor;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.content.LocalBroadcastManager;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -53,7 +53,7 @@ import no.nordicsemi.android.log.LogContract;
import no.nordicsemi.android.nrftoolbox.R;
import no.nordicsemi.android.nrftoolbox.profile.BleProfileService;
public class UARTLogFragment extends ListFragment implements LoaderCallbacks<Cursor> {
public class UARTLogFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> {
private static final String SIS_LOG_SCROLL_POSITION = "sis_scroll_position";
private static final int LOG_SCROLL_NULL = -1;
private static final int LOG_SCROLLED_TO_BOTTOM = -2;

View File

@@ -93,6 +93,12 @@ public class UARTManager extends BleManager<UARTManagerCallbacks> {
}
};
@Override
protected boolean shouldAutoConnect() {
// We want the connection to be kept
return true;
}
/**
* Sends the given text to TH characteristic.
* @param text the text to be sent

View File

@@ -192,14 +192,32 @@ public class UARTService extends BleProfileService implements UARTManagerCallbac
};
/**
* Broadcast receiver that listens for {@link #ACTION_SEND} from other apps. Sends the String content of the {@link Intent#EXTRA_TEXT} extra to the remote device.
* Broadcast receiver that listens for {@link #ACTION_SEND} from other apps. Sends the String or int content of the {@link Intent#EXTRA_TEXT} extra to the remote device.
* The integer content will be sent as String (65 -> "65", not 65 -> "A").
*/
private BroadcastReceiver mIntentBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(final Context context, final Intent intent) {
Logger.i(getLogSession(), "[Broadcast] Disconnect action pressed");
final String message = intent.getStringExtra(Intent.EXTRA_TEXT);
mManager.send(message);
final boolean hasMessage = intent.hasExtra(Intent.EXTRA_TEXT);
if (hasMessage) {
String message = intent.getStringExtra(Intent.EXTRA_TEXT);
if (message == null) {
final int intValue = intent.getIntExtra(Intent.EXTRA_TEXT, Integer.MIN_VALUE); // how big is the chance of such data?
if (intValue != Integer.MIN_VALUE)
message = String.valueOf(intValue);
}
if (message != null) {
Logger.i(getLogSession(), "[Broadcast] " + ACTION_SEND + " broadcast received with data: \"" + message + "\"");
mManager.send(message);
return;
}
}
// No data od incompatible type of EXTRA_TEXT
if (!hasMessage)
Logger.i(getLogSession(), "[Broadcast] " + ACTION_SEND + " broadcast received no data.");
else
Logger.i(getLogSession(), "[Broadcast] " + ACTION_SEND + " broadcast received incompatible data type. Only String and int are supported.");
}
};

View File

@@ -0,0 +1,148 @@
/*************************************************************************************************************************************************
* Copyright (c) 2015, Nordic Semiconductor
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
************************************************************************************************************************************************/
package no.nordicsemi.android.nrftoolbox.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import no.nordicsemi.android.nrftoolbox.R;
public class ForegroundLinearLayout extends LinearLayout {
private Drawable mForegroundSelector;
private Rect mRectPadding;
private boolean mUseBackgroundPadding = false;
public ForegroundLinearLayout(Context context) {
super(context);
}
public ForegroundLinearLayout(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ForegroundLinearLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ForegroundRelativeLayout,
defStyle, 0);
final Drawable d = a.getDrawable(R.styleable.ForegroundRelativeLayout_foreground);
if (d != null) {
setForeground(d);
}
a.recycle();
if (this.getBackground() instanceof NinePatchDrawable) {
final NinePatchDrawable npd = (NinePatchDrawable) this.getBackground();
mRectPadding = new Rect();
if (npd.getPadding(mRectPadding)) {
mUseBackgroundPadding = true;
}
}
}
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (mForegroundSelector != null && mForegroundSelector.isStateful()) {
mForegroundSelector.setState(getDrawableState());
}
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (mForegroundSelector != null) {
if (mUseBackgroundPadding) {
mForegroundSelector.setBounds(mRectPadding.left, mRectPadding.top, w - mRectPadding.right, h - mRectPadding.bottom);
} else {
mForegroundSelector.setBounds(0, 0, w, h);
}
}
}
@Override
protected void dispatchDraw(@NonNull Canvas canvas) {
super.dispatchDraw(canvas);
if (mForegroundSelector != null) {
mForegroundSelector.draw(canvas);
}
}
@Override
protected boolean verifyDrawable(Drawable who) {
return super.verifyDrawable(who) || (who == mForegroundSelector);
}
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (mForegroundSelector != null) mForegroundSelector.jumpToCurrentState();
}
public void setForeground(Drawable drawable) {
if (mForegroundSelector != drawable) {
if (mForegroundSelector != null) {
mForegroundSelector.setCallback(null);
unscheduleDrawable(mForegroundSelector);
}
mForegroundSelector = drawable;
if (drawable != null) {
setWillNotDraw(false);
drawable.setCallback(this);
if (drawable.isStateful()) {
drawable.setState(getDrawableState());
}
} else {
setWillNotDraw(true);
}
requestLayout();
invalidate();
}
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mForegroundSelector != null) {
mForegroundSelector.setHotspot(x, y);
}
}
}

View File

@@ -0,0 +1,148 @@
/*************************************************************************************************************************************************
* Copyright (c) 2015, Nordic Semiconductor
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
************************************************************************************************************************************************/
package no.nordicsemi.android.nrftoolbox.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import no.nordicsemi.android.nrftoolbox.R;
public class ForegroundRelativeLayout extends RelativeLayout {
private Drawable mForegroundSelector;
private Rect mRectPadding;
private boolean mUseBackgroundPadding = false;
public ForegroundRelativeLayout(Context context) {
super(context);
}
public ForegroundRelativeLayout(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ForegroundRelativeLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ForegroundRelativeLayout,
defStyle, 0);
final Drawable d = a.getDrawable(R.styleable.ForegroundRelativeLayout_foreground);
if (d != null) {
setForeground(d);
}
a.recycle();
if (this.getBackground() instanceof NinePatchDrawable) {
final NinePatchDrawable npd = (NinePatchDrawable) this.getBackground();
mRectPadding = new Rect();
if (npd.getPadding(mRectPadding)) {
mUseBackgroundPadding = true;
}
}
}
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (mForegroundSelector != null && mForegroundSelector.isStateful()) {
mForegroundSelector.setState(getDrawableState());
}
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (mForegroundSelector != null) {
if (mUseBackgroundPadding) {
mForegroundSelector.setBounds(mRectPadding.left, mRectPadding.top, w - mRectPadding.right, h - mRectPadding.bottom);
} else {
mForegroundSelector.setBounds(0, 0, w, h);
}
}
}
@Override
protected void dispatchDraw(@NonNull Canvas canvas) {
super.dispatchDraw(canvas);
if (mForegroundSelector != null) {
mForegroundSelector.draw(canvas);
}
}
@Override
protected boolean verifyDrawable(Drawable who) {
return super.verifyDrawable(who) || (who == mForegroundSelector);
}
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (mForegroundSelector != null) mForegroundSelector.jumpToCurrentState();
}
public void setForeground(Drawable drawable) {
if (mForegroundSelector != drawable) {
if (mForegroundSelector != null) {
mForegroundSelector.setCallback(null);
unscheduleDrawable(mForegroundSelector);
}
mForegroundSelector = drawable;
if (drawable != null) {
setWillNotDraw(false);
drawable.setCallback(this);
if (drawable.isStateful()) {
drawable.setState(getDrawableState());
}
} else {
setWillNotDraw(true);
}
requestLayout();
invalidate();
}
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mForegroundSelector != null) {
mForegroundSelector.setHotspot(x, y);
}
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright (c) 2015, Nordic Semiconductor
~ All rights reserved.
~
@@ -19,10 +19,8 @@
~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/item_background_light_p" android:state_pressed="true"/>
<item android:drawable="@drawable/item_background_light_n"/>
<item android:state_selected="true" android:color="@color/actionBarColorDark" />
<item android:color="#FF212121"/>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

View File

@@ -19,269 +19,279 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".BPMActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<LinearLayout
android:layout_width="0dp"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="4dp"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_bp_header" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical" >
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<!-- DFU section -->
<LinearLayout
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<!-- Application section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:layout_weight="1"
android:layout_marginLeft="4dp"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
android:text="@string/bpm_section_bp_header" />
<LinearLayout
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
</LinearLayout>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="15dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
<!-- DFU section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="32sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
</LinearLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="15dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,201 +19,94 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".RSCActivity" >
android:orientation="vertical"
tools:context=".CSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<LinearLayout
android:layout_width="0dp"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="4dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
</TableLayout>
</LinearLayout>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical" >
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="4dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
@@ -224,10 +117,10 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
@@ -236,12 +129,12 @@
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
@@ -253,32 +146,149 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -20,233 +20,245 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DfuActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="160dp"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:ellipsize="middle"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<!-- Application section -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
android:layout_width="0dp"
android:layout_height="160dp"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:ellipsize="middle"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
<Button
android:id="@+id/action_select_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="0dp"
android:layout_height="160dp"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="14dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_select_file"
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<ImageView
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="0dp"
android:layout_height="160dp"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="14dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,190 +19,200 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HTSActivity" >
android:orientation="vertical"
tools:context=".BPMActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/gls_feature_title_long_margin"
android:rotation="270"
android:text="@string/gls_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/gls_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/action_connect"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/gls_feature_title_long_margin"
android:rotation="270"
android:text="@string/gls_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/gls_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="0dp"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_above="@+id/action_connect"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<RelativeLayout
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<!-- Application section -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<RelativeLayout
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_data" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/unit"
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="4dp" />
</RelativeLayout>
<ExpandableListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
tools:listitem="@layout/activity_feature_gls_item" />
<TextView
android:id="@+id/empty"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/gls_no_data" />
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:layout_width="120dp"
android:layout_height="160dp"
android:layout_marginLeft="14dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_data" />
android:text="@string/gls_section_actions" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/unit"
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="4dp" />
</RelativeLayout>
<ExpandableListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
tools:listitem="@layout/activity_feature_gls_item" />
<TextView
android:id="@+id/empty"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/gls_no_data" />
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:layout_width="120dp"
android:layout_height="160dp"
android:layout_marginLeft="14dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_actions" />
<LinearLayout
android:id="@+id/gls_control_std"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical" >
<Button
android:id="@+id/action_all"
style="?android:attr/buttonBarButtonStyle"
<LinearLayout
android:id="@+id/gls_control_std"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_all" />
android:gravity="center_horizontal"
android:orientation="vertical" >
<Button
android:id="@+id/action_last"
style="?android:attr/buttonBarButtonStyle"
<Button
android:id="@+id/action_all"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_all" />
<Button
android:id="@+id/action_last"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_last" />
<Button
android:id="@+id/action_more"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_more" />
</LinearLayout>
<LinearLayout
android:id="@+id/gls_control_abort"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_last" />
android:orientation="horizontal"
android:visibility="gone" >
<Button
android:id="@+id/action_more"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/gls_action_more" />
</LinearLayout>
<LinearLayout
android:id="@+id/gls_control_abort"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<Button
android:id="@+id/action_abort"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_abort" />
<Button
android:id="@+id/action_abort"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_abort" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,124 +19,134 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HRSActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
android:orientation="vertical"
tools:context=".BPMActivity" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/action_connect"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<!-- Application section -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="180dp"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical" >
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/action_connect"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:orientation="horizontal" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<!-- Application section -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="180dp"
android:layout_height="wrap_content"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
android:gravity="right"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
</LinearLayout>
<!-- GRAPH section -->
<FrameLayout
android:id="@+id/graph_hrs"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:layout_weight="1" />
</LinearLayout>
<!-- GRAPH section -->
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<FrameLayout
android:id="@+id/graph_hrs"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="40dp"
android:layout_weight="1" />
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,85 +19,94 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".HTSActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hts_feature_title_long_margin"
android:rotation="270"
android:text="@string/hts_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hts_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hts_feature_title_long_margin"
android:rotation="270"
android:text="@string/hts_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="80sp" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/text_hts_value"
android:text="@string/hts_unit_celsius"
android:textSize="30sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hts_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="80sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/text_hts_value"
android:text="@string/hts_unit_celsius"
android:textSize="30sp" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,97 +19,107 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ProximityActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/proximity_feature_title_long_margin"
android:rotation="270"
android:text="@string/proximity_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/proximity_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/option"
android:layout_below="@+id/device_name"
android:layout_centerHorizontal="true"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageLock"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/proximity_lock_image_description"
android:src="@drawable/proximity_lock_closed" />
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/proximity_feature_title_long_margin"
android:rotation="270"
android:text="@string/proximity_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/proximity_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/option"
android:layout_below="@+id/device_name"
android:layout_centerHorizontal="true"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageLock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/proximity_lock_image_description"
android:src="@drawable/proximity_lock_closed" />
<Button
android:id="@+id/action_findme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:enabled="false"
android:onClick="onFindMeClicked"
android:text="@string/proximity_action_findme" />
</LinearLayout>
<CheckBox
android:id="@+id/option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/action_connect"
android:layout_centerHorizontal="true"
android:checked="true"
android:text="@string/proximity_enable_server" />
<Button
android:id="@+id/action_findme"
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:enabled="false"
android:onClick="onFindMeClicked"
android:text="@string/proximity_action_findme" />
</LinearLayout>
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<CheckBox
android:id="@+id/option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/action_connect"
android:layout_centerHorizontal="true"
android:checked="true"
android:text="@string/proximity_enable_server" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,296 +19,306 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".RSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_strides_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Activity section -->
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
<!-- Application section -->
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_activity_header" />
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_strides_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Activity section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding"
android:text="@string/not_available"
android:textSize="22sp" />
android:layout_marginTop="8dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_activity_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:paddingLeft="@dimen/feature_section_padding"
android:paddingRight="@dimen/feature_section_padding"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -23,35 +23,43 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:orientation="vertical"
tools:context=".UARTActivity" >
<fragment
android:id="@+id/fragment_control"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTControlFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="8"
tools:layout="@layout/fragment_feature_uart_control" />
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6" >
<no.nordicsemi.android.nrftoolbox.widget.ForegroundLinearLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/fragment_log"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTLogFragment"
android:layout_width="match_parent"
android:id="@+id/fragment_control"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTControlFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_log" />
android:layout_weight="8"
tools:layout="@layout/fragment_feature_uart_control" />
<ImageView
android:layout_width="wrap_content"
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/shadow_l" />
</FrameLayout>
android:layout_weight="6" >
<fragment
android:id="@+id/fragment_log"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTLogFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_log" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/shadow_l" />
</FrameLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundLinearLayout>
</LinearLayout>

View File

@@ -19,270 +19,280 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".BPMActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32sp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="600dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- Application section -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="0dp"
android:layout_width="600dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_bp_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:orientation="vertical" >
<!-- DFU section -->
<!-- Application section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:layout_weight="1"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
android:text="@string/bpm_section_bp_header" />
<LinearLayout
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
</LinearLayout>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
<!-- DFU section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
</LinearLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,228 +19,238 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".RSCActivity" >
android:orientation="vertical"
tools:context=".CSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<!-- Application section -->
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -20,226 +20,238 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DfuActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<!-- Application section -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
<Button
android:id="@+id/action_select_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_select_file"
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<ImageView
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,125 +19,135 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HRSActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
android:orientation="vertical"
tools:context=".BPMActivity" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32sp"
android:textStyle="bold" />
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:baselineAligned="false"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:gravity="center_horizontal"
android:orientation="horizontal" >
android:layout_height="match_parent">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<!-- Application section -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32sp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="180dp"
android:baselineAligned="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical" >
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<!-- Application section -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="180dp"
android:layout_height="wrap_content"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
android:gravity="right"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
</LinearLayout>
<!-- GRAPH section -->
<FrameLayout
android:id="@+id/graph_hrs"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginLeft="40dp"
android:layout_weight="1" />
</LinearLayout>
<!-- GRAPH section -->
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<FrameLayout
android:id="@+id/graph_hrs"
android:layout_width="0dp"
android:layout_height="300dp"
android:layout_marginLeft="40dp"
android:layout_weight="1" />
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,263 +19,273 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".RSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<TableLayout
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Activity section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
android:text="@string/rsc_section_activity_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<!-- Activity section -->
<LinearLayout
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_activity_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,257 +19,267 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".BPMActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/bpm_feature_title_long_margin"
android:rotation="270"
android:text="@string/bpm_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/bpm_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_bp_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_bp_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_systolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/systolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/systolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_diastolic" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/diastolic"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/diastolic_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_mean_ap" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/mean_ap"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/mean_ap_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/bpm_pulse_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_pulse_header" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/bpm_pulse" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/pulse"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
</LinearLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:gravity="bottom"
android:text="@string/bpm_unit_bpm" />
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:id="@+id/bpm_timestamp_pane"
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/bpm_section_timestamp_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,228 +19,238 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".RSCActivity" >
android:orientation="vertical"
tools:context=".CSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<!-- Application section -->
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/csc_feature_title_long_margin"
android:rotation="270"
android:text="@string/csc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/csc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/csc_section_csc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance_total"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_total_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/csc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/csc_gear_ratio" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/ratio"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="45dp"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -20,227 +20,239 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DfuActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dfu_feature_title_long_margin"
android:rotation="270"
android:text="@string/dfu_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/dfu_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:ellipsize="middle"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<!-- Application section -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_application_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_name_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_name"
android:layout_width="0dp"
android:layout_weight="1"
android:singleLine="true"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:ellipsize="middle"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_type_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_size_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dfu_file_status_label" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/file_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:freezesText="true"
android:text="@string/dfu_file_status_no_file" />
</TableRow>
</TableLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feature_section_padding"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="42dp" >
<Button
android:id="@+id/action_select_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_select_file"
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<ImageView
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:onClick="onSelectFileHelpClicked"
android:src="@drawable/ic_help" />
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<!-- DFU section -->
<LinearLayout
android:id="@+id/dfu_pane"
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dfu_section_dfu_header" />
<Button
android:id="@+id/action_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:enabled="false"
android:onClick="onUploadClicked"
android:text="@string/dfu_action_upload" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewUploading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_status_uploading"
android:freezesText="true"
android:visibility="invisible" />
<ProgressBar
android:id="@+id/progressbar_file"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:visibility="invisible" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/textviewProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/feature_section_padding"
android:text="@string/dfu_uploading_percentage_label"
android:freezesText="true"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_select" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,189 +19,198 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HTSActivity" >
android:orientation="vertical">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/gls_feature_title_long_margin"
android:rotation="270"
android:text="@string/gls_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/gls_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/action_connect"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/gls_feature_title_long_margin"
android:rotation="270"
android:text="@string/gls_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/gls_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_height="match_parent"
android:layout_above="@+id/action_connect"
android:gravity="center_horizontal"
android:orientation="vertical" >
<RelativeLayout
style="@style/Widget.ListTitle"
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<RelativeLayout
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_data" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/unit"
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="4dp" />
</RelativeLayout>
<ExpandableListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
tools:listitem="@layout/activity_feature_gls_item" />
<TextView
android:id="@+id/empty"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/gls_no_data" />
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_data" />
android:text="@string/gls_section_actions" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/unit"
style="@style/Widget.ListTitle"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/gls_control_std"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="4dp" />
</RelativeLayout>
android:orientation="horizontal" >
<ExpandableListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
tools:listitem="@layout/activity_feature_gls_item" />
<Button
android:id="@+id/action_all"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_all" />
<TextView
android:id="@+id/empty"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/gls_no_data" />
<Button
android:id="@+id/action_last"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_last" />
<Button
android:id="@+id/action_more"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_more" />
</LinearLayout>
<LinearLayout
android:id="@+id/gls_control_abort"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<Button
android:id="@+id/action_abort"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_abort" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- Timestamp section -->
<LinearLayout
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gls_section_actions" />
<LinearLayout
android:id="@+id/gls_control_std"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/action_all"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_all" />
<Button
android:id="@+id/action_last"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_last" />
<Button
android:id="@+id/action_more"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_more" />
</LinearLayout>
<LinearLayout
android:id="@+id/gls_control_abort"
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone" >
<Button
android:id="@+id/action_abort"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:minWidth="0dp"
android:text="@string/gls_action_abort" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,118 +19,128 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".HRSActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="80dp"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/text_hrs_value"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="-10dp"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="80dp"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/text_hrs_value"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="-10dp"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
<FrameLayout
android:id="@+id/graph_hrs"
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="220dp"
android:layout_below="@id/text_hrs_position_label"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="10dp" />
android:layout_height="match_parent">
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hrs_feature_title_long_margin"
android:rotation="270"
android:text="@string/hrs_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hrs_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="80dp"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="45sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/text_hrs_value"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="-10dp"
android:text="@string/hrs_value_unit"
android:textSize="16sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="80dp"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available"
android:textSize="35sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hrs_position_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/text_hrs_value"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="-10dp"
android:text="@string/hrs_position_label"
android:textSize="16sp" />
<FrameLayout
android:id="@+id/graph_hrs"
android:layout_width="match_parent"
android:layout_height="220dp"
android:layout_below="@id/text_hrs_position_label"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="10dp" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,85 +19,94 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".HTSActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hts_feature_title_long_margin"
android:rotation="270"
android:text="@string/hts_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hts_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/hts_feature_title_long_margin"
android:rotation="270"
android:text="@string/hts_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="80sp" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/text_hts_value"
android:text="@string/hts_unit_celsius"
android:textSize="30sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/hts_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/not_available_value"
android:textSize="80sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/text_hts_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/text_hts_value"
android:text="@string/hts_unit_celsius"
android:textSize="30sp" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,92 +19,102 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ProximityActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/proximity_feature_title_long_margin"
android:rotation="270"
android:text="@string/proximity_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/proximity_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/proximity_feature_title_long_margin"
android:rotation="270"
android:text="@string/proximity_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageLock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/device_name"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:contentDescription="@string/proximity_lock_image_description"
android:src="@drawable/proximity_lock_closed" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<Button
android:id="@+id/action_findme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageLock"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:enabled="false"
android:onClick="onFindMeClicked"
android:text="@string/proximity_action_findme" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/proximity_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<CheckBox
android:id="@+id/option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/action_connect"
android:layout_centerHorizontal="true"
android:checked="true"
android:text="@string/proximity_enable_server" />
<ImageView
android:id="@+id/imageLock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/device_name"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:contentDescription="@string/proximity_lock_image_description"
android:src="@drawable/proximity_lock_closed" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<Button
android:id="@+id/action_findme"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageLock"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:enabled="false"
android:onClick="onFindMeClicked"
android:text="@string/proximity_action_findme" />
</RelativeLayout>
<CheckBox
android:id="@+id/option"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/action_connect"
android:layout_centerHorizontal="true"
android:checked="true"
android:text="@string/proximity_enable_server" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,263 +19,273 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".RSCActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
android:layout_height="match_parent">
<!-- Application section -->
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/rsc_feature_title_long_margin"
android:rotation="270"
android:text="@string/rsc_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:layout_toRightOf="@+id/battery"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/rsc_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
<!-- Application section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<TableLayout
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_rsc_header" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
</LinearLayout>
<!-- Activity section -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_speed" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/speed"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/speed_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_speed_unit_km_h" />
</TableRow>
<TableRow
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
android:text="@string/rsc_section_activity_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_cadence" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/cadence"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_cadence_unit" />
</TableRow>
<TableRow
android:layout_width="match_parent"
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_distance_unit_m" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_total_distance" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/total_distance"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/total_distance_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/rsc_total_distance_unit_km" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/rsc_strides" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/strides"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:layout_marginRight="45dp"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
</TableRow>
</TableLayout>
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<!-- Activity section -->
<LinearLayout
android:layout_width="match_parent"
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
style="@style/Widget.List"
android:orientation="vertical" >
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/rsc_section_activity_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:freezesText="true"
android:padding="8dp"
android:text="@string/not_available"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</RelativeLayout>
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,118 +19,128 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HTSActivity" >
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".TemplateActivity" >
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/template_feature_title_long_margin"
android:rotation="270"
android:text="@string/template_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<!-- The size of text below must be fixed, therefore dp are used instead of sp -->
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/template_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/template_feature_title_long_margin"
android:rotation="270"
android:text="@string/template_feature_title_long"
android:textColor="@color/darkGray"
android:textSize="32dp"
android:textStyle="bold" />
<!-- Application section -->
<TextView
android:id="@+id/battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:background="@drawable/battery"
android:freezesText="true"
android:gravity="center"
android:text="@string/not_available"
android:textColor="#FFFFFF"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/battery"
android:layout_marginTop="@dimen/feature_device_name_margin_top"
android:ellipsize="end"
android:freezesText="true"
android:maxLines="1"
android:text="@string/template_default_name"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/template_section_header" />
<!-- Application section -->
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:layout_marginLeft="@dimen/feature_horizontal_margin"
android:layout_marginRight="@dimen/feature_horizontal_margin"
android:layout_marginTop="@dimen/feature_vertical_margin_top"
style="@style/Widget.List"
android:orientation="vertical" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
style="@style/Widget.ListTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/template_section_header" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/template_value_title" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/feature_section_padding" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/value"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/value_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/template_unit_bpm" />
</TableRow>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/template_value_title" />
</TableLayout>
</LinearLayout>
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@+id/value"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="right"
android:text="@string/not_available_value"
android:textSize="36sp" />
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetTextView
android:id="@+id/value_unit"
android:layout_width="45dp"
android:layout_height="match_parent"
android:freezesText="true"
android:gravity="bottom"
android:text="@string/template_unit_bpm" />
</TableRow>
</RelativeLayout>
</TableLayout>
</LinearLayout>
<Button
android:id="@+id/action_connect"
style="@style/Widget.Connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
android:onClick="onConnectClicked"
android:text="@string/action_connect" />
</no.nordicsemi.android.nrftoolbox.widget.ForegroundRelativeLayout>
</LinearLayout>

View File

@@ -19,25 +19,40 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".UARTActivity" >
<fragment
android:id="@+id/fragment_log"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTLogFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_log" />
<fragment
android:id="@+id/fragment_control"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTControlFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_control" />
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
</android.support.v4.widget.SlidingPaneLayout>
<FrameLayout
style="@style/HeaderShadow"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SlidingPaneLayout
android:id="@+id/sliding_pane"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment
android:id="@+id/fragment_log"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTLogFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_log" />
<fragment
android:id="@+id/fragment_control"
android:name="no.nordicsemi.android.nrftoolbox.uart.UARTControlFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_feature_uart_control" />
</android.support.v4.widget.SlidingPaneLayout>
</FrameLayout>
</LinearLayout>

View File

@@ -22,45 +22,66 @@
-->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FeaturesActivity" >
android:fitsSystemWindows="true"
tools:context=".FeaturesActivity">
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical">
<GridView
android:id="@+id/grid"
<include layout="@layout/toolbar"
android:id="@+id/toolbar_actionbar"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="@null"
android:gravity="center_horizontal"
android:columnWidth="100dp"
android:scrollbarStyle="outsideOverlay"
android:horizontalSpacing="10dp"
android:listSelector="@null"
android:numColumns="auto_fit"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/feature_grid_margin_top"
android:stretchMode="columnWidth" />
android:layout_height="0dp"
android:layout_weight="1"
style="@style/HeaderShadow">
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/no_apps" />
</FrameLayout>
<GridView
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="@null"
android:gravity="center_horizontal"
android:columnWidth="100dp"
android:scrollbarStyle="outsideOverlay"
android:horizontalSpacing="10dp"
android:listSelector="@null"
android:numColumns="auto_fit"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/feature_grid_margin_top"
android:stretchMode="columnWidth" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/no_apps" />
</FrameLayout>
</LinearLayout>
<!-- The navigation drawer -->
<include
android:layout_width="290dp"
<android.support.design.widget.NavigationView
android:layout_width="@dimen/navdrawer_width"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:layout_gravity="start"
layout="@layout/drawer" />
android:background="#FFFFFFFF"
app:insetForeground="#2000">
<include
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
layout="@layout/drawer" />
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright (c) 2015, Nordic Semiconductor
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
~
~ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
~
~ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~
~ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this
~ software without specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
~ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
~ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<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"
android:id="@+id/toolbar_actionbar"/>
<FrameLayout
style="@style/HeaderShadow"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>

View File

@@ -20,53 +20,52 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="290dp"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:clickable="true"
android:orientation="vertical"
android:paddingTop="8dp" >
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:src="@drawable/nordic_logo_horiz" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="@color/actionBarColorDark"
android:paddingBottom="30dp"
android:paddingTop="@dimen/navdrawer_padding_top"
android:src="@drawable/nordic_logo_horiz_dark"/>
<LinearLayout
android:id="@+id/plugin_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/plugin_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/drawer_plugins"
android:textAppearance="@style/TextAppearanceTitle" />
<no.nordicsemi.android.nrftoolbox.widget.TrebuchetBoldTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:text="@string/drawer_plugins"
android:textAppearance="@style/TextAppearanceTitle"/>
<TextView
android:id="@+id/link_mcp"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:background="?android:selectableItemBackground"
android:text="@string/drawer_plugin_mcp"
android:drawablePadding="12dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:drawableLeft="@drawable/ic_mcp_feature_small"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceInverse" />
</LinearLayout>
</ScrollView>
<TextView
android:id="@+id/link_mcp"
style="@style/DrawerItem"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?android:selectableItemBackground"
android:drawableLeft="@drawable/ic_mcp_feature_small"
android:drawablePadding="24dp"
android:paddingEnd="@dimen/navdrawer_padding_horiz"
android:paddingStart="@dimen/navdrawer_padding_horiz"
android:text="@string/drawer_plugin_mcp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -22,11 +22,11 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightSmall"
android:layout_height="48dp"
android:background="?android:selectableItemBackground"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingStart="@dimen/navdrawer_padding_horiz"
android:paddingEnd="@dimen/navdrawer_padding_horiz"
android:orientation="horizontal" >
<ImageView
@@ -37,9 +37,9 @@
<TextView
android:id="@android:id/text1"
style="@style/DrawerItem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:textAppearance="?android:attr/textAppearanceInverse" />
android:layout_marginLeft="24dp" />
</LinearLayout>

View File

@@ -25,7 +25,6 @@
android:layout_height="wrap_content" >
<TextView
style="@style/TextAppearanceDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableBottom="@drawable/zip"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright (c) 2015, Nordic Semiconductor
~ All rights reserved.
~
@@ -19,9 +19,14 @@
~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:color="#FF000000"/>
<item android:state_enabled="false" android:color="#FF888888"/>
</selector>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/HeaderBar"
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:theme="@style/ActionBarThemeOverlay"
app:popupTheme="@style/ActionBarPopupThemeOverlay"
app:titleTextAppearance="@style/ActionBar.TitleText"/>

View File

@@ -24,9 +24,8 @@
<item
android:id="@+id/action_about"
android:icon="@drawable/ic_menu_about"
android:orderInCategory="100"
app:showAsAction="always"
app:showAsAction="never"
android:title="@string/action_about"/>
</menu>

View File

@@ -24,14 +24,14 @@
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_menu_settings"
app:showAsAction="always"
android:orderInCategory="99"
app:showAsAction="never"
android:title="@string/action_settings"/>
<item
android:id="@+id/action_about"
android:icon="@drawable/ic_menu_about"
app:showAsAction="always"
android:orderInCategory="100"
app:showAsAction="never"
android:title="@string/action_about"/>
</menu>

View File

@@ -26,8 +26,9 @@
screen margins) for sw600dp devices (e.g. 7" tablets) here.
-->
<dimen name="activity_horizontal_margin">24dp</dimen>
<dimen name="activity_vertical_margin_top">24dp</dimen>
<dimen name="activity_vertical_margin_bottom">40dp</dimen>
<dimen name="navdrawer_width">300dp</dimen>
<dimen name="navdrawer_padding_horiz">24dp</dimen>
<dimen name="feature_vertical_margin_top">80dp</dimen>
<dimen name="feature_horizontal_margin">80dp</dimen>

View File

@@ -26,7 +26,6 @@
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-->
<dimen name="activity_horizontal_margin">128dp</dimen>
<dimen name="activity_vertical_margin_top">32dp</dimen>
<dimen name="activity_vertical_margin_bottom">60dp</dimen>
<dimen name="feature_vertical_margin_top">100dp</dimen>

View File

@@ -25,9 +25,8 @@
<!-- On Android 5 the background is drawn behind the navigation bar. In order to put the 'Wireless by Nordic' text in the middle on phones in landscape mode we must set the margin. -->
<dimen name="navigation_bar_height">56dp</dimen>
<dimen name="navigation_bar_fix">-48dp</dimen>
<dimen name="alert_dialog_padding">26dp</dimen>
<dimen name="alert_dialog_padding_top">18dp</dimen>
<dimen name="alert_dialog_padding_bottom">0dp</dimen>
<dimen name="headerbar_elevation">6dp</dimen>
<dimen name="navdrawer_padding_top">54dp</dimen><!--30dp + status bar 24dp-->
</resources>

View File

@@ -22,7 +22,15 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="HeaderBar">
<item name="android:background">?colorPrimary</item>
<item name="android:elevation">@dimen/headerbar_elevation</item>
</style>
<style name="HeaderShadow">
</style>
<style name="Widget.List">
<item name="android:background">@color/backgroundColor</item>
<item name="android:gravity">center_horizontal</item>
@@ -36,10 +44,6 @@
<item name="android:elevation">2dp</item>
</style>
<style name="Widget.Button" parent="@android:style/Widget.Material.Light.Button">
<item name="android:minWidth">160dip</item>
</style>
<style name="Widget.Connect" parent="@android:style/Widget.Material.Light.Button">
<item name="android:background">@drawable/button</item>
<item name="android:textColor">#FFFFFF</item>
@@ -48,13 +52,14 @@
<item name="android:elevation">2dp</item>
<item name="android:stateListAnimator">@animator/click_animator</item>
</style>
<style name="TextAppearanceButton" parent="@android:style/TextAppearance.Material.Widget.Button">
<item name="android:textColor">@color/text_color_primary</item>
</style>
<style name="AppTheme" parent="@style/AppThemeBase">
<!-- Empty -->
</style>
<style name="AppTheme.TranslucentStatusBar">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015, Nordic Semiconductor
~ All rights reserved.
@@ -20,7 +20,9 @@
~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
~ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp" />
<resources>
<declare-styleable name="ForegroundRelativeLayout">
<attr name="foreground" format="reference|color" />
</declare-styleable>
</resources>

View File

@@ -23,9 +23,7 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin_top">16dp</dimen>
<dimen name="activity_vertical_margin_bottom">32dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="feature_horizontal_margin">50dp</dimen>
<dimen name="feature_vertical_margin_top">50dp</dimen>
<dimen name="feature_section_padding">8dp</dimen>
@@ -34,14 +32,18 @@
<dimen name="feature_uart_buttons_pane_width">256dp</dimen>
<dimen name="feature_uart_buttons_pane_height">256dp</dimen>
<dimen name="navdrawer_width">260dp</dimen>
<dimen name="navdrawer_padding_top">30dp</dimen>
<dimen name="navdrawer_padding_horiz">16dp</dimen>
<!-- On Android 5 the background is drawn behind the navigation bar. In order to put the 'Wireless by Nordic' text in the middle on phones in landscape mode we must set the margin. -->
<dimen name="navigation_bar_height">10dp</dimen>
<dimen name="navigation_bar_width">0dp</dimen>
<dimen name="navigation_bar_fix">0dp</dimen>
<dimen name="navigation_toolbar_fix">-81dp</dimen>
<dimen name="alert_dialog_padding">16dp</dimen>
<dimen name="alert_dialog_padding_top">8dp</dimen>
<dimen name="alert_dialog_padding_bottom">8dp</dimen>
<dimen name="alert_dialog_padding">24dp</dimen>
<dimen name="alert_dialog_padding_top">18dp</dimen>
<dimen name="alert_dialog_padding_bottom">0dp</dimen>
</resources>

View File

@@ -26,9 +26,6 @@
<string name="font_path">fonts/trebucbd.ttf</string>
<string name="normal_font_path">fonts/trebuc.ttf</string>
<string name="permission_log_label">read and write log</string>
<string name="permission_log_description">Allows the app to write and read from Nordic Semiconductor Event log</string>
<string name="ok">OK</string>
<string name="yes">Yes</string>
<string name="no">No</string>

View File

@@ -21,6 +21,51 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Style ot the Toolbar -->
<style name="HeaderBar">
<item name="android:background">?colorPrimary</item>
</style>
<style name="HeaderShadow">
<item name="android:foreground">@drawable/action_bar_shadow</item>
<item name="foreground">@drawable/action_bar_shadow</item>
</style>
<!-- Style used by the Toolbar -->
<style name="ActionBarThemeOverlay" parent="@style/ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">#000</item>
<item name="android:textColorSecondary">#8fff</item>
<item name="colorControlNormal">#fff</item>
<item name="colorControlHighlight">#3fff</item>
</style>
<!-- Style used by the Toolbar's overflow menu -->
<style name="ActionBarPopupThemeOverlay" parent="ThemeOverlay.AppCompat.Light">
<item name="colorControlNormal">@color/actionBarColorDark</item>
</style>
<!-- Style used by the Toolbar -->
<style name="ActionBar.TitleText" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">#fff</item>
<item name="android:textSize">18sp</item>
</style>
<style name="DrawerItem">
<item name="android:textColor">@color/menu_text</item>
<item name="android:textSize">14sp</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textAllCaps">false</item>
</style>
<style name="DrawerDivider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">#E5E5E5</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
</style>
<style name="Widget" />
<style name="Widget.List">
@@ -39,7 +84,7 @@
<item name="android:textStyle">bold</item>
</style>
<style name="Widget.Button" parent="@android:style/Widget.Holo.Light.Button">
<style name="Widget.Button" parent="@style/Widget.AppCompat.Button">
<item name="android:minWidth">160dip</item>
</style>
@@ -50,55 +95,34 @@
<item name="android:paddingRight">40dp</item>
</style>
<style name="TextAppearanceDialog" parent="@style/TextAppearance.AppCompat.Subhead">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="TextAppearanceListItem" parent="@style/TextAppearance.AppCompat.Subhead">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="TextAppearanceButton" parent="@android:style/TextAppearance.Holo.Widget.Button">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="TextAppearanceTitle" parent="@style/TextAppearance.AppCompat.Caption">
<item name="android:textColor">?attr/colorAccent</item>
<item name="android:textStyle">bold</item>
</style>
<style name="TextAppearanceLarge" parent="@style/TextAppearance.AppCompat.Large">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
<item name="android:textStyle">bold</item>
</style>
<style name="PopupMenuTextAppearanceSmall" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="PopupMenuTextAppearanceLarge" parent="@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large">
<item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
<!-- Application theme. -->
<style name="AppThemeBase" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowBackground">@drawable/background</item>
<item name="actionBarPopupTheme">@style/Theme.AppCompat.Light.DarkActionBar</item>
<item name="android:buttonStyle">@style/Widget.Button</item>
<item name="android:textAppearanceListItem">@style/TextAppearanceListItem</item>
<item name="android:textAppearanceLarge">@style/TextAppearanceLarge</item>
<item name="android:textAppearanceButton">@style/TextAppearanceButton</item>
<style name="AppTheme.DialogTheme" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
<item name="colorPrimary">@color/actionBarColor</item>
<item name="colorPrimaryDark">@color/actionBarColorDark</item>
<item name="colorAccent">@color/actionBarColorDark</item>
<item name="editTextColor">?android:attr/textColorSecondary</item>
<item name="android:textColorPrimary">#FFFFFFFF</item>
<item name="android:textColorPrimaryInverse">@color/text_color_primary</item>
<item name="android:textAppearanceLargePopupMenu">@style/PopupMenuTextAppearanceLarge</item>
<item name="android:textAppearanceSmallPopupMenu">@style/PopupMenuTextAppearanceSmall</item>
</style>
<style name="AppThemeBase" parent="@style/Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/background</item>
<item name="actionMenuTextColor">@color/actionBarMenuTextColor</item>
<item name="alertDialogTheme">@style/AppTheme.DialogTheme</item>
<item name="colorPrimary">@color/actionBarColor</item>
<item name="colorPrimaryDark">@color/actionBarColorDark</item>
<item name="colorAccent">@color/actionBarColorDark</item>
<item name="buttonStyle">@style/Widget.Button</item>
</style>
<style name="AppTheme" parent="@style/AppThemeBase">
<!-- Empty -->
<item name="android:selectableItemBackground">@drawable/abc_item_background_holo_light</item>
</style>
<style name="AppTheme.TranslucentStatusBar">
<!-- Empty -->
</style>
<style name="AppTheme.Translucent">

View File

@@ -24,8 +24,8 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<ListPreference
android:title="@string/csc_settings_units_title"
android:summary="@string/csc_settings_units_summary"
android:title="@string/rsc_settings_units_title"
android:summary="@string/rsc_settings_units_summary"
android:defaultValue="1"
android:entries="@array/rsc_settings_units"
android:entryValues="@array/rsc_settings_units_values"

View File

@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id="nRFToolbox" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
@@ -15,5 +16,4 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
</module>