mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-24 17:23:03 +02:00
Remove trailing whitespace
This commit is contained in:
@@ -142,7 +142,7 @@ public class BluetoothCustomOpenScale extends BluetoothCommunication {
|
|||||||
btConnectThread = null;
|
btConnectThread = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearEEPROM()
|
public void clearEEPROM()
|
||||||
{
|
{
|
||||||
sendBtData("9");
|
sendBtData("9");
|
||||||
|
@@ -32,10 +32,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class ScaleDatabase extends SQLiteOpenHelper {
|
public class ScaleDatabase extends SQLiteOpenHelper {
|
||||||
private static final int DATABASE_VERSION = 6;
|
private static final int DATABASE_VERSION = 6;
|
||||||
private static final String DATABASE_NAME = "openScaleDatabase.db";
|
private static final String DATABASE_NAME = "openScaleDatabase.db";
|
||||||
|
|
||||||
private static final String TABLE_NAME = "scaledata";
|
private static final String TABLE_NAME = "scaledata";
|
||||||
private static final String COLUMN_NAME_ID = "id";
|
private static final String COLUMN_NAME_ID = "id";
|
||||||
private static final String COLUMN_NAME_USER_ID = "user_id";
|
private static final String COLUMN_NAME_USER_ID = "user_id";
|
||||||
@@ -50,15 +50,15 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
private static final String COLUMN_NAME_HIP = "hip";
|
private static final String COLUMN_NAME_HIP = "hip";
|
||||||
private static final String COLUMN_NAME_COMMENT = "comment";
|
private static final String COLUMN_NAME_COMMENT = "comment";
|
||||||
private static final String COLUMN_NAME_ENABLE = "enable";
|
private static final String COLUMN_NAME_ENABLE = "enable";
|
||||||
|
|
||||||
private static final String SQL_CREATE_ENTRIES =
|
private static final String SQL_CREATE_ENTRIES =
|
||||||
"CREATE TABLE " + TABLE_NAME + " (" +
|
"CREATE TABLE " + TABLE_NAME + " (" +
|
||||||
COLUMN_NAME_ID + " INTEGER PRIMARY KEY," +
|
COLUMN_NAME_ID + " INTEGER PRIMARY KEY," +
|
||||||
COLUMN_NAME_USER_ID + " INTEGER," +
|
COLUMN_NAME_USER_ID + " INTEGER," +
|
||||||
COLUMN_NAME_DATE_TIME + " TEXT," +
|
COLUMN_NAME_DATE_TIME + " TEXT," +
|
||||||
COLUMN_NAME_WEIGHT + " REAL," +
|
COLUMN_NAME_WEIGHT + " REAL," +
|
||||||
COLUMN_NAME_FAT + " REAL," +
|
COLUMN_NAME_FAT + " REAL," +
|
||||||
COLUMN_NAME_WATER + " REAL," +
|
COLUMN_NAME_WATER + " REAL," +
|
||||||
COLUMN_NAME_MUSCLE + " REAL," +
|
COLUMN_NAME_MUSCLE + " REAL," +
|
||||||
COLUMN_NAME_LBW + " REAL," +
|
COLUMN_NAME_LBW + " REAL," +
|
||||||
COLUMN_NAME_BONE + " REAL," +
|
COLUMN_NAME_BONE + " REAL," +
|
||||||
@@ -125,7 +125,7 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_LBW + " REAL DEFAULT 0");
|
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_LBW + " REAL DEFAULT 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearScaleData(int userId) {
|
public void clearScaleData(int userId) {
|
||||||
dbWrite.delete(TABLE_NAME, COLUMN_NAME_USER_ID + "=" + Integer.toString(userId), null);
|
dbWrite.delete(TABLE_NAME, COLUMN_NAME_USER_ID + "=" + Integer.toString(userId), null);
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,7 @@ public class ScaleDatabase extends SQLiteOpenHelper {
|
|||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
Log.e("ScaleDatabase", "SQL exception occured while getting scale data list: " + ex.getMessage());
|
Log.e("ScaleDatabase", "SQL exception occured while getting scale data list: " + ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return scaleDataList;
|
return scaleDataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -97,10 +97,10 @@ public class ScaleUserDatabase extends SQLiteOpenHelper {
|
|||||||
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_INITIAL_WEIGHT + " REAL DEFAULT 0");
|
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_NAME_INITIAL_WEIGHT + " REAL DEFAULT 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearDatabase() {
|
public void clearDatabase() {
|
||||||
SQLiteDatabase db = getWritableDatabase();
|
SQLiteDatabase db = getWritableDatabase();
|
||||||
|
|
||||||
db.delete(TABLE_NAME, null, null);
|
db.delete(TABLE_NAME, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,12 +196,12 @@ public class ScaleUserDatabase extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
while (!cursorScaleDB.isAfterLast()) {
|
while (!cursorScaleDB.isAfterLast()) {
|
||||||
scaleUserDBEntries.add(readAtCursor(cursorScaleDB));
|
scaleUserDBEntries.add(readAtCursor(cursorScaleDB));
|
||||||
|
|
||||||
cursorScaleDB.moveToNext();
|
cursorScaleDB.moveToNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
cursorScaleDB.close();
|
cursorScaleDB.close();
|
||||||
|
|
||||||
return scaleUserDBEntries;
|
return scaleUserDBEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class MainActivity extends ActionBarActivity implements
|
public class MainActivity extends ActionBarActivity implements
|
||||||
ActionBar.TabListener {
|
ActionBar.TabListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link android.support.v4.view.PagerAdapter} that will provide
|
* The {@link android.support.v4.view.PagerAdapter} that will provide
|
||||||
* fragments for each of the sections. We use a {@link FragmentPagerAdapter}
|
* fragments for each of the sections. We use a {@link FragmentPagerAdapter}
|
||||||
@@ -81,7 +81,7 @@ public class MainActivity extends ActionBarActivity implements
|
|||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
// Set up the action bar.
|
// Set up the action bar.
|
||||||
final ActionBar actionBar = getSupportActionBar();
|
final ActionBar actionBar = getSupportActionBar();
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
@@ -285,15 +285,15 @@ public class MainActivity extends ActionBarActivity implements
|
|||||||
* one of the sections/tabs/pages.
|
* one of the sections/tabs/pages.
|
||||||
*/
|
*/
|
||||||
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
private OverviewFragment overviewFrag;
|
private OverviewFragment overviewFrag;
|
||||||
private GraphFragment graphFrag;
|
private GraphFragment graphFrag;
|
||||||
private TableFragment tableFrag;
|
private TableFragment tableFrag;
|
||||||
private StatisticsFragment statisticsFrag;
|
private StatisticsFragment statisticsFrag;
|
||||||
|
|
||||||
public SectionsPagerAdapter(FragmentManager fm) {
|
public SectionsPagerAdapter(FragmentManager fm) {
|
||||||
super(fm);
|
super(fm);
|
||||||
|
|
||||||
overviewFrag = new OverviewFragment();
|
overviewFrag = new OverviewFragment();
|
||||||
graphFrag = new GraphFragment();
|
graphFrag = new GraphFragment();
|
||||||
tableFrag = new TableFragment();
|
tableFrag = new TableFragment();
|
||||||
@@ -305,7 +305,7 @@ public class MainActivity extends ActionBarActivity implements
|
|||||||
// getItem is called to instantiate the fragment for the given page.
|
// getItem is called to instantiate the fragment for the given page.
|
||||||
// Return a PlaceholderFragment (defined as a static inner class
|
// Return a PlaceholderFragment (defined as a static inner class
|
||||||
// below).
|
// below).
|
||||||
|
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
return overviewFrag;
|
return overviewFrag;
|
||||||
|
@@ -93,7 +93,7 @@ public class DataEntryActivity extends Activity {
|
|||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@@ -64,7 +64,7 @@ public class UserSettingsActivity extends Activity {
|
|||||||
private DateFormat dateFormat = DateFormat.getDateInstance();
|
private DateFormat dateFormat = DateFormat.getDateInstance();
|
||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@@ -63,7 +63,7 @@ import lecho.lib.hellocharts.util.ChartUtils;
|
|||||||
import lecho.lib.hellocharts.view.ColumnChartView;
|
import lecho.lib.hellocharts.view.ColumnChartView;
|
||||||
import lecho.lib.hellocharts.view.LineChartView;
|
import lecho.lib.hellocharts.view.LineChartView;
|
||||||
|
|
||||||
public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
||||||
private View graphView;
|
private View graphView;
|
||||||
private LineChartView chartBottom;
|
private LineChartView chartBottom;
|
||||||
private ColumnChartView chartTop;
|
private ColumnChartView chartTop;
|
||||||
@@ -94,10 +94,10 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
graphView = inflater.inflate(R.layout.fragment_graph, container, false);
|
graphView = inflater.inflate(R.layout.fragment_graph, container, false);
|
||||||
|
|
||||||
chartBottom = (LineChartView) graphView.findViewById(R.id.chart_bottom);
|
chartBottom = (LineChartView) graphView.findViewById(R.id.chart_bottom);
|
||||||
chartTop = (ColumnChartView) graphView.findViewById(R.id.chart_top);
|
chartTop = (ColumnChartView) graphView.findViewById(R.id.chart_top);
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
|
|
||||||
return graphView;
|
return graphView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateOnView(ArrayList<ScaleData> scaleDataList)
|
public void updateOnView(ArrayList<ScaleData> scaleDataList)
|
||||||
{
|
{
|
||||||
|
@@ -85,9 +85,9 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
private int selectedSubpageNr;
|
private int selectedSubpageNr;
|
||||||
|
|
||||||
public TableFragment() {
|
public TableFragment() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
@@ -131,7 +131,7 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
|
|||||||
|
|
||||||
return tableView;
|
return tableView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateOnView(ArrayList<ScaleData> scaleDataList)
|
public void updateOnView(ArrayList<ScaleData> scaleDataList)
|
||||||
{
|
{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/rect_pressed" />
|
<item android:drawable="@drawable/rect_pressed" />
|
||||||
|
|
||||||
<item android:bottom="@dimen/layer_padding">
|
<item android:bottom="@dimen/layer_padding">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="@dimen/corner_radius" />
|
<corners android:radius="@dimen/corner_radius" />
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
<string name="label_whr">Stosunek obwodu talii do obwodu bioder</string>
|
<string name="label_whr">Stosunek obwodu talii do obwodu bioder</string>
|
||||||
<string name="label_bone">Masa kostna</string>
|
<string name="label_bone">Masa kostna</string>
|
||||||
<string name="label_smartUserAssign">Inteligente przypisywanie użytkowników</string>
|
<string name="label_smartUserAssign">Inteligente przypisywanie użytkowników</string>
|
||||||
|
|
||||||
<string name="label_days">dni</string>
|
<string name="label_days">dni</string>
|
||||||
<string name="label_measures">pomiarów</string>
|
<string name="label_measures">pomiarów</string>
|
||||||
<string name="label_last_week">Ostatnie 7 dni</string>
|
<string name="label_last_week">Ostatnie 7 dni</string>
|
||||||
|
Reference in New Issue
Block a user