mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	lets show the free storage label only if we have the values
This commit is contained in:
		| @@ -9,10 +9,7 @@ import android.os.storage.StorageManager | |||||||
| import android.provider.MediaStore | import android.provider.MediaStore | ||||||
| import android.util.AttributeSet | import android.util.AttributeSet | ||||||
| import androidx.appcompat.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import com.simplemobiletools.commons.extensions.getLongValue | import com.simplemobiletools.commons.extensions.* | ||||||
| import com.simplemobiletools.commons.extensions.getProperSize |  | ||||||
| import com.simplemobiletools.commons.extensions.queryCursor |  | ||||||
| import com.simplemobiletools.commons.extensions.updateTextColors |  | ||||||
| import com.simplemobiletools.commons.helpers.ensureBackgroundThread | import com.simplemobiletools.commons.helpers.ensureBackgroundThread | ||||||
| import com.simplemobiletools.filemanager.pro.R | import com.simplemobiletools.filemanager.pro.R | ||||||
| import com.simplemobiletools.filemanager.pro.activities.SimpleActivity | import com.simplemobiletools.filemanager.pro.activities.SimpleActivity | ||||||
| @@ -75,6 +72,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage | |||||||
|                 activity.runOnUiThread { |                 activity.runOnUiThread { | ||||||
|                     free_space_value.text = freeSpace.formatSizeThousand() |                     free_space_value.text = freeSpace.formatSizeThousand() | ||||||
|                     total_space.text = String.format(context.getString(R.string.total_storage), totalSpace.formatSizeThousand()) |                     total_space.text = String.format(context.getString(R.string.total_storage), totalSpace.formatSizeThousand()) | ||||||
|  |                     free_space_label.beVisible() | ||||||
|                 } |                 } | ||||||
|             } else { |             } else { | ||||||
|                 // sd card |                 // sd card | ||||||
|   | |||||||
| @@ -23,7 +23,8 @@ | |||||||
|         android:layout_marginStart="@dimen/medium_margin" |         android:layout_marginStart="@dimen/medium_margin" | ||||||
|         android:layout_toEndOf="@+id/free_space_value" |         android:layout_toEndOf="@+id/free_space_value" | ||||||
|         android:text="@string/storage_free" |         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 |     <com.simplemobiletools.commons.views.MyTextView | ||||||
|         android:id="@+id/total_space" |         android:id="@+id/total_space" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user