This repository was archived by the owner on Jun 27, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +75
-11
lines changed
java/com/blogspot/e_kanivets/moneytracker Expand file tree Collapse file tree 12 files changed +75
-11
lines changed Original file line number Diff line number Diff line change 5959 android : screenOrientation =" portrait"
6060 android : theme =" @style/Theme.Default" />
6161 <activity
62- android : name =" .activity.ExportActivity"
62+ android : name =" .activity.external. ExportActivity"
6363 android : label =" @string/title_export"
6464 android : screenOrientation =" portrait"
6565 android : theme =" @style/Theme.Default" />
7474 android : screenOrientation =" portrait"
7575 android : theme =" @style/Theme.Default" />
7676 <activity
77- android : name =" .activity.ImportActivity"
77+ android : name =" .activity.external. ImportActivity"
7878 android : label =" @string/title_import"
7979 android : screenOrientation =" portrait"
8080 android : theme =" @style/Theme.Default" />
Original file line number Diff line number Diff line change 1010
1111import com .blogspot .e_kanivets .moneytracker .R ;
1212import com .blogspot .e_kanivets .moneytracker .activity .ChartsActivity ;
13- import com .blogspot .e_kanivets .moneytracker .activity .ExportActivity ;
14- import com .blogspot .e_kanivets .moneytracker .activity .ImportActivity ;
13+ import com .blogspot .e_kanivets .moneytracker .activity .external . ExportActivity ;
14+ import com .blogspot .e_kanivets .moneytracker .activity .external . ImportActivity ;
1515import com .blogspot .e_kanivets .moneytracker .activity .SettingsActivity ;
1616import com .blogspot .e_kanivets .moneytracker .activity .account .AccountsActivity ;
1717import com .blogspot .e_kanivets .moneytracker .activity .exchange_rate .ExchangeRatesActivity ;
Original file line number Diff line number Diff line change 1- package com .blogspot .e_kanivets .moneytracker .activity ;
1+ package com .blogspot .e_kanivets .moneytracker .activity . external ;
22
33import android .content .Intent ;
44import android .net .Uri ;
Original file line number Diff line number Diff line change 1- package com .blogspot .e_kanivets .moneytracker .activity ;
1+ package com .blogspot .e_kanivets .moneytracker .activity . external ;
22
3+ import android .support .v7 .app .AlertDialog ;
4+ import android .view .Menu ;
5+ import android .view .MenuItem ;
36import android .widget .EditText ;
47
58import com .blogspot .e_kanivets .moneytracker .R ;
@@ -33,6 +36,28 @@ protected boolean initData() {
3336 return result ;
3437 }
3538
39+ @ Override
40+ public boolean onCreateOptionsMenu (Menu menu ) {
41+ getMenuInflater ().inflate (R .menu .menu_import , menu );
42+ return true ;
43+ }
44+
45+ @ Override
46+ public boolean onOptionsItemSelected (MenuItem item ) {
47+ switch (item .getItemId ()) {
48+ case R .id .action_help :
49+ AlertDialog .Builder builder = new AlertDialog .Builder (ImportActivity .this );
50+ builder .setTitle (R .string .help )
51+ .setMessage (R .string .import_help )
52+ .setPositiveButton (android .R .string .ok , null )
53+ .show ();
54+ return true ;
55+
56+ default :
57+ return super .onOptionsItemSelected (item );
58+ }
59+ }
60+
3661 @ OnClick (R .id .btn_import )
3762 public void importRecords () {
3863 String data = etImportData .getText ().toString ().trim ();
Original file line number Diff line number Diff line change 11package com .blogspot .e_kanivets .moneytracker .di ;
22
33import com .blogspot .e_kanivets .moneytracker .activity .ChartsActivity ;
4- import com .blogspot .e_kanivets .moneytracker .activity .ExportActivity ;
5- import com .blogspot .e_kanivets .moneytracker .activity .ImportActivity ;
4+ import com .blogspot .e_kanivets .moneytracker .activity .external . ExportActivity ;
5+ import com .blogspot .e_kanivets .moneytracker .activity .external . ImportActivity ;
66import com .blogspot .e_kanivets .moneytracker .activity .ReportActivity ;
77import com .blogspot .e_kanivets .moneytracker .activity .SettingsActivity ;
88import com .blogspot .e_kanivets .moneytracker .activity .account .AccountsActivity ;
Original file line number Diff line number Diff line change 55 android : layout_width =" match_parent"
66 android : layout_height =" match_parent"
77 android : fitsSystemWindows =" true"
8- tools : context =" .activity.ExportActivity" >
8+ tools : context =" .activity.external. ExportActivity" >
99
1010 <android .support.design.widget.AppBarLayout
1111 android : layout_width =" match_parent"
Original file line number Diff line number Diff line change 55 android : layout_width =" match_parent"
66 android : layout_height =" match_parent"
77 android : fitsSystemWindows =" true"
8- tools : context =" .activity.ImportActivity" >
8+ tools : context =" .activity.external. ImportActivity" >
99
1010 <android .support.design.widget.AppBarLayout
1111 android : layout_width =" match_parent"
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <menu xmlns : android =" http://schemas.android.com/apk/res/android"
3+ xmlns : tools =" http://schemas.android.com/apk/res-auto" >
4+
5+ <item
6+ android : id =" @+id/action_help"
7+ android : icon =" @drawable/ic_help"
8+ android : title =" @string/help"
9+ tools : showAsAction =" ifRoom" />
10+
11+ </menu >
Original file line number Diff line number Diff line change 6767
6868 <string name =" title_import" >Импорт</string >
6969 <string name =" records_imported" >%1$s записей было импортировано</string >
70+ <string name =" help" >Справка</string >
71+ <string name =" import_help" >Для импорта записей в приложение:\n
72+ 1. Создайте CSV файл в формате - \n
73+ <b >время;заголовок;категория;цена;валюта.</b >\n
74+ 2. Скопируйте его контент в текстовое поле.\n
75+ 3. Нажмите кнопку импорта. Через несколько секунд Вы увидите сколько записей было импортировано.\n
76+ \n
77+ <b >Важно:</b > время - метка времени в миллисекундах; валюта - 3-х символьный код валюты.\n
78+ <b >Пример:</b > 1466948795712;метро;транспорт;-20.0;UAH</string >
7079</resources >
You can’t perform that action at this time.
0 commit comments