Revision c6bfca20
Added by Leszek Koltunski almost 5 years ago
src/main/java/org/distorted/examples/rubik/RubikActivity.java | ||
---|---|---|
78 | 78 |
|
79 | 79 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 80 |
|
81 |
void setText(int numCube) |
|
81 |
void setText(final int numCube)
|
|
82 | 82 |
{ |
83 | 83 |
long availMemory = returnAvailableMemory(); |
84 |
int availMemoryInMB = (int)(availMemory/1000000); |
|
85 |
mText.setText(getString(R.string.rubik_placeholder, numCube, availMemoryInMB)); |
|
84 |
final int availMemoryInMB = (int)(availMemory/1000000); |
|
85 |
|
|
86 |
runOnUiThread(new Runnable() |
|
87 |
{ |
|
88 |
public void run() |
|
89 |
{ |
|
90 |
mText.setText(getString(R.string.rubik_placeholder, numCube, availMemoryInMB)); |
|
91 |
} |
|
92 |
}); |
|
86 | 93 |
} |
87 | 94 |
|
88 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Fix the memory test - we need to run one thing on the Graphics thread!