Skip to content

Commit 1d42b2b

Browse files
committed
* corrected the licence (GPL v3) on about window
* added button to share the app on about window * added missing resource (angle.xml) * Release 1.0.20
1 parent 77dae6e commit 1d42b2b

File tree

11 files changed

+72
-32
lines changed

11 files changed

+72
-32
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Change Log
22
==========
33

4-
git HEAD
5-
--------
4+
version 1.0.20
5+
--------------
66

77
* better images in color mode
88
* enhancements on main screen interface
99
* flash state persist between activities changes
1010
* better handling of devices without flash and/or autofocus
11+
* "share app" button on About window
1112

1213
version 1.0.19
1314
--------------

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.todobom.opennotescanner"
88
minSdkVersion 21
99
targetSdkVersion 23
10-
versionCode 19
11-
versionName '1.0.19'
10+
versionCode 20
11+
versionName '1.0.20'
1212
}
1313
buildTypes {
1414
release {
@@ -31,7 +31,7 @@ dependencies {
3131
compile 'com.android.support:design:23.3.0'
3232
compile 'com.google.zxing:core:3.0.1'
3333
compile 'com.android.support:support-v4:23.3.0'
34-
compile 'com.github.ctodobom:OpenCV-3.1.0-Android:-SNAPSHOT'
34+
compile 'com.github.ctodobom:OpenCV-3.1.0-Android:9e00ee4218ca0c9e60a905c9f09bf499f9dc5115'
3535
compile 'us.feras.mdv:markdownview:1.1.0'
3636
compile 'com.github.ctodobom:drag-select-recyclerview:0.3.4.ctodobom.sections'
3737
compile 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5'

app/src/main/assets/about-it.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Questa applicazione offre una rapida soluzione per acquisire e archiviare note s
99
Licenza
1010
-------
1111

12-
Questa applicazione è distribuita secondo i termini della [GNU General Public License versione 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt). Il codice sorgente è [disponibile su GitHub](http://github.com/ctodobom/OpenNoteScanner).
12+
Questa applicazione è distribuita secondo i termini della [GNU General Public License versione 3](http://www.gnu.org/licenses/gpl.txt). Il codice sorgente è [disponibile su GitHub](http://github.com/ctodobom/OpenNoteScanner).
1313

1414
Donazioni
1515
---------

app/src/main/assets/about-pt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Este aplicativo fornece uma maneira rápida para escanear e armazenar anotaçõe
88
Licença
99
-------
1010

11-
Esta aplicação está disponibilizada através da [Licença GNU GPL versão 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt). Source code is [available on GitHub](http://github.com/ctodobom/OpenNoteScanner).
11+
Esta aplicação está disponibilizada através da [Licença GNU GPL versão 3](http://www.gnu.org/licenses/gpl.txt). Source code is [available on GitHub](http://github.com/ctodobom/OpenNoteScanner).
1212

1313
Doações
1414
-------

app/src/main/assets/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This application provides a quick way to scan and store hand written notes and a
99
License
1010
-------
1111

12-
This application is made available through the [GNU General Public License version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt). Source code is [available on GitHub](http://github.com/ctodobom/OpenNoteScanner).
12+
This application is made available through the [GNU General Public License version 3](http://www.gnu.org/licenses/gpl.txt). Source code is [available on GitHub](http://github.com/ctodobom/OpenNoteScanner).
1313

1414
Donations
1515
---------

app/src/main/java/com/todobom/opennotescanner/helpers/AboutFragment.java

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.todobom.opennotescanner.helpers;
22

3+
import android.content.Intent;
34
import android.os.Bundle;
45
import android.support.annotation.Nullable;
56
import android.support.v4.app.DialogFragment;
7+
import android.view.Display;
68
import android.view.LayoutInflater;
79
import android.view.View;
810
import android.view.ViewGroup;
@@ -17,6 +19,7 @@
1719
*/
1820
public class AboutFragment extends DialogFragment {
1921

22+
private static final String APP_LINK = "https://goo.gl/2JwEPq";
2023
private Runnable mRunOnDetach;
2124

2225
public AboutFragment() {
@@ -46,28 +49,28 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
4649

4750
markdownView.loadMarkdownFile("file:///android_asset/" + getString(R.string.about_filename));
4851

49-
/*
50-
51-
StringBuilder aboutBuffer=new StringBuilder();
52-
BufferedReader in;
53-
String aboutString="";
54-
try {
55-
InputStream aboutStream=getContext().getAssets().open(getString(R.string.about_filename));
56-
in = new BufferedReader(new InputStreamReader(aboutStream, "UTF-8"));
57-
while ((aboutString=in.readLine()) != null) {
58-
aboutBuffer.append(aboutString + "\n");
52+
Display display = getActivity().getWindowManager().getDefaultDisplay();
53+
android.graphics.Point size = new android.graphics.Point();
54+
display.getRealSize(size);
55+
56+
View aboutContainer = view.findViewById(R.id.about_container);
57+
ViewGroup.LayoutParams params = aboutContainer.getLayoutParams();
58+
params.height = (int) (size.y * .9);
59+
params.width = (int) (size.x * .9);
60+
aboutContainer.setLayoutParams(params);
61+
62+
View about_shareapp = view.findViewById(R.id.about_shareapp);
63+
about_shareapp.setOnClickListener(new View.OnClickListener() {
64+
@Override
65+
public void onClick(View v) {
66+
String shareBody = getString(R.string.share_app_body) + APP_LINK;
67+
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
68+
sharingIntent.setType("text/plain");
69+
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.share_app_subject));
70+
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
71+
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_app_using)));
5972
}
60-
aboutString = aboutBuffer.toString();
61-
in.close();
62-
63-
markdownView.setStringContent(aboutString);
64-
65-
} catch (IOException e) {
66-
e.printStackTrace();
67-
}
68-
69-
/* */
70-
73+
});
7174
}
7275

7376
@Override
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<vector android:height="24dp" android:viewportHeight="64.0"
2+
android:viewportWidth="64.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
3+
<path android:fillAlpha="1" android:fillColor="#FF60FF60"
4+
android:pathData="M0,0L0,60L0,64L4,64L64,64L64,60L4,60L4,0L0,0z"
5+
android:strokeAlpha="1" android:strokeColor="#FF60FF60"
6+
android:strokeLineJoin="round" android:strokeWidth="0"/>
7+
</vector>

app/src/main/res/layout/about_view.xml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,27 @@
44
android:layout_width="match_parent" android:layout_height="wrap_content"
55
android:layout_gravity="center" android:orientation="vertical">
66

7-
<us.feras.mdv.MarkdownView
8-
android:id="@+id/about_markdown"
7+
<RelativeLayout
8+
android:id="@+id/about_container"
99
android:layout_width="match_parent"
1010
android:layout_height="match_parent"
11-
/>
11+
android:gravity="top">
12+
13+
<us.feras.mdv.MarkdownView
14+
android:id="@+id/about_markdown"
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:layout_alignParentStart="false"
18+
android:layout_above="@+id/about_shareapp" />
19+
20+
<Button
21+
android:id="@+id/about_shareapp"
22+
android:layout_width="match_parent"
23+
android:layout_height="wrap_content"
24+
android:text="@string/share_app"
25+
android:layout_alignParentBottom="true"
26+
style="@style/Widget.AppCompat.Button.Colored"
27+
/>
28+
</RelativeLayout>
1229

1330
</FrameLayout>

app/src/main/res/values-it/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@
2525
<string name="bwMode"><![CDATA[Modalità bianco e nero]]></string>
2626
<string name="autoMode">Modalità automatica</string>
2727
<string name="manualMode">Modalità manuale</string>
28+
<string name="share_app">Share this App</string>
29+
<string name="share_app_using">Share link through</string>
30+
<string name="share_app_body">"Take a look at this great app that scans notes, drawings and documents through your camera: "</string>
31+
<string name="share_app_subject">Great app to scan notes and documents</string>
2832
</resources>

app/src/main/res/values-pt/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@
2424
<string name="bwMode"><![CDATA[Modo preto & branco]]></string>
2525
<string name="autoMode">Modo Automático</string>
2626
<string name="manualMode">Modo manual</string>
27+
<string name="share_app">Compartilhar Aplicativo</string>
28+
<string name="share_app_using">Compartilhar link por</string>
29+
<string name="share_app_body">"Dê uma olhada neste aplicativo para escanear anotações, desenhos e documentos utilizando a câmera: "</string>
30+
<string name="share_app_subject">Ótimo aplicativo para escanear anotações e documentos</string>
2731
</resources>

0 commit comments

Comments
 (0)