add about dialog
This commit is contained in:
parent
31908d1543
commit
a3fe74f49b
5 changed files with 63 additions and 1 deletions
|
|
@ -43,5 +43,5 @@ android {
|
|||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.github.axet:android-audio-library:1.0.4' // compile project(':android-audio-library')
|
||||
compile 'com.github.axet:android-audio-library:1.0.8' // compile project(':android-audio-library')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.github.axet.androidlibrary.widgets.AboutPreferenceCompat;
|
||||
import com.github.axet.audiolibrary.app.Recordings;
|
||||
import com.github.axet.audiolibrary.app.Storage;
|
||||
import com.github.axet.audiorecorder.R;
|
||||
|
|
@ -172,6 +173,11 @@ public class MainActivity extends AppCompatActivity {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (id == R.id.action_about) {
|
||||
AboutPreferenceCompat.showDialog(this, R.raw.about);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (id == R.id.action_show_folder) {
|
||||
Intent intent = showIntent();
|
||||
if (intent.resolveActivityInfo(getPackageManager(), 0) != null) {
|
||||
|
|
@ -179,6 +185,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
} else {
|
||||
Toast.makeText(this, R.string.no_folder_app, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
|
|
|||
|
|
@ -12,4 +12,9 @@
|
|||
android:orderInCategory="100"
|
||||
android:title="@string/open_recording_folder"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/about"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
|
|||
25
app/src/main/res/raw-ru/about.html
Normal file
25
app/src/main/res/raw-ru/about.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="source" href="https://en.wikipedia.org/wiki/Binaural_beats"/>
|
||||
<style>
|
||||
a { white-space: pre-wrap; word-wrap:break-word; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>О программе</h3>
|
||||
<p>
|
||||
Аудио Рекордер с открытым исходным кодом, папкой для записей и редактированием.
|
||||
</p>
|
||||
|
||||
<p>Простой в использовании и мощный Аудио Рекордер с поддержкой выбора папки для записей и редактированием. Без рекламы, открытый исходный код, GPLv3</p>
|
||||
|
||||
<dl>
|
||||
<dt><b>Лицензия:</b></dt>
|
||||
<dd>GPLv3</dd>
|
||||
<dt><b>Исходный код:</b></dt>
|
||||
<dd><a href="https://gitlab.com/axet/android-audio-recorder">https://gitlab.com/axet/android-audio-recorder</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
||||
25
app/src/main/res/raw/about.html
Normal file
25
app/src/main/res/raw/about.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="source" href="https://en.wikipedia.org/wiki/Binaural_beats"/>
|
||||
<style>
|
||||
a { white-space: pre-wrap; word-wrap:break-word; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>About</h3>
|
||||
<p>
|
||||
Android friendly!
|
||||
</p>
|
||||
|
||||
<p>Audio Recorder with custom recording folder, nice recording volume indicator, recording notification, recording lock screen activity.</p>
|
||||
|
||||
<dl>
|
||||
<dt><b>Lincense:</b></dt>
|
||||
<dd>GPLv3</dd>
|
||||
<dt><b>Source Code:</b></dt>
|
||||
<dd><a href="https://gitlab.com/axet/android-audio-recorder">https://gitlab.com/axet/android-audio-recorder</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue