Revision 6864568a src/com/rackspacecloud/android/ContainerObjectsActivity.java
b/src/com/rackspacecloud/android/ContainerObjectsActivity.java | ||
---|---|---|
55 | 55 |
private static Container container; |
56 | 56 |
public String LOG = "viewFilesActivity"; |
57 | 57 |
private String cdnEnabledIs; |
58 |
public Object megaBytes; |
|
59 |
public Object kiloBytes; |
|
60 |
public int bConver = 1048576; |
|
61 |
public int kbConver = 1024; |
|
58 | 62 |
|
59 | 63 |
@Override |
60 | 64 |
public void onCreate(Bundle savedInstanceState) { |
... | ... | |
205 | 209 |
TextView label = (TextView) row.findViewById(R.id.label); |
206 | 210 |
label.setText(file.getCName()); |
207 | 211 |
|
208 |
TextView sublabel = (TextView) row.findViewById(R.id.sublabel); |
|
209 |
sublabel.setText(file.getBytes()+ " Bytes"); |
|
212 |
|
|
213 |
if (file.getBytes() >= bConver) { |
|
214 |
megaBytes = Math.abs(container.getBytes()/bConver + 0.2); |
|
215 |
TextView sublabel = (TextView) row.findViewById(R.id.sublabel); |
|
216 |
sublabel.setText(megaBytes + " MB"); |
|
217 |
} else if (file.getBytes() >= kbConver){ |
|
218 |
kiloBytes = Math.abs(container.getBytes()/kbConver + 0.2); |
|
219 |
TextView sublabel = (TextView) row.findViewById(R.id.sublabel); |
|
220 |
sublabel.setText(kiloBytes + " KB"); |
|
221 |
} else { |
|
222 |
TextView sublabel = (TextView) row.findViewById(R.id.sublabel); |
|
223 |
sublabel.setText( container.getBytes() + " B"); |
|
224 |
} |
|
225 |
|
|
210 | 226 |
return(row); |
211 | 227 |
} |
212 | 228 |
} |
Also available in: Unified diff