Merge branch 'audiorecorder-1.5.16'
This commit is contained in:
commit
d7535da24a
3 changed files with 35 additions and 19 deletions
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
versionCode 144
|
||||
versionName "1.5.15"
|
||||
versionCode 145
|
||||
versionName "1.5.16"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
@ -43,5 +43,5 @@ android {
|
|||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
compile 'com.github.axet:android-audio-library:0.0.46' // compile project(':android-audio-library')
|
||||
compile 'com.github.axet:android-audio-library:0.0.47' // compile project(':android-audio-library')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public class MainActivity extends AppCompatActivity {
|
|||
ListView list;
|
||||
Recordings recordings;
|
||||
Storage storage;
|
||||
View progressEmpty;
|
||||
View progressText;
|
||||
|
||||
int themeId;
|
||||
|
||||
|
|
@ -63,6 +65,9 @@ public class MainActivity extends AppCompatActivity {
|
|||
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
progressEmpty = findViewById(R.id.progress_empty);
|
||||
progressText = findViewById(R.id.progress_text);
|
||||
|
||||
storage = new Storage(this);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
|
|
@ -148,19 +153,12 @@ public class MainActivity extends AppCompatActivity {
|
|||
return;
|
||||
}
|
||||
|
||||
if (Storage.permitted(this, PERMISSIONS))
|
||||
recordings.load();
|
||||
else
|
||||
recordings.load();
|
||||
|
||||
checkPending();
|
||||
|
||||
updateHeader();
|
||||
|
||||
final int selected = getLastRecording();
|
||||
handler.post(new Runnable() {
|
||||
Runnable done = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressEmpty.setVisibility(View.GONE);
|
||||
progressText.setVisibility(View.VISIBLE);
|
||||
if (selected != -1) {
|
||||
recordings.select(selected);
|
||||
list.smoothScrollToPosition(selected);
|
||||
|
|
@ -172,7 +170,17 @@ public class MainActivity extends AppCompatActivity {
|
|||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
progressEmpty.setVisibility(View.VISIBLE);
|
||||
progressText.setVisibility(View.GONE);
|
||||
if (Storage.permitted(this, PERMISSIONS))
|
||||
recordings.load(done);
|
||||
else
|
||||
recordings.load(done);
|
||||
|
||||
checkPending();
|
||||
|
||||
updateHeader();
|
||||
}
|
||||
|
||||
int getLastRecording() {
|
||||
|
|
@ -200,7 +208,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
case 1:
|
||||
if (Storage.permitted(MainActivity.this, permissions)) {
|
||||
storage.migrateLocalStorage();
|
||||
recordings.load();
|
||||
recordings.load(null);
|
||||
checkPending();
|
||||
} else {
|
||||
Toast.makeText(this, R.string.not_permitted, Toast.LENGTH_SHORT).show();
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@
|
|||
android:padding="5dp"
|
||||
android:text="32G free ~ 3 hours left" />
|
||||
|
||||
<LinearLayout
|
||||
<FrameLayout
|
||||
android:id="@+id/empty_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
|
|
@ -31,14 +31,22 @@
|
|||
android:layout_height="1dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_empty"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="10dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:text="@string/recording_list_is_empty"
|
||||
android:textAlignment="center"></TextView>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue