lets show the free storage label only if we have the values

This commit is contained in:
tibbi 2021-10-11 22:14:49 +02:00
parent 87d3cf6501
commit 17343f5448
2 changed files with 4 additions and 5 deletions

View File

@ -9,10 +9,7 @@ import android.os.storage.StorageManager
import android.provider.MediaStore
import android.util.AttributeSet
import androidx.appcompat.app.AppCompatActivity
import com.simplemobiletools.commons.extensions.getLongValue
import com.simplemobiletools.commons.extensions.getProperSize
import com.simplemobiletools.commons.extensions.queryCursor
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.filemanager.pro.R
import com.simplemobiletools.filemanager.pro.activities.SimpleActivity
@ -75,6 +72,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
activity.runOnUiThread {
free_space_value.text = freeSpace.formatSizeThousand()
total_space.text = String.format(context.getString(R.string.total_storage), totalSpace.formatSizeThousand())
free_space_label.beVisible()
}
} else {
// sd card

View File

@ -23,7 +23,8 @@
android:layout_marginStart="@dimen/medium_margin"
android:layout_toEndOf="@+id/free_space_value"
android:text="@string/storage_free"
android:textSize="@dimen/big_text_size" />
android:textSize="@dimen/big_text_size"
android:visibility="gone" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/total_space"