Commit 6f8809a4 authored by Elodie Gauthier's avatar Elodie Gauthier

In CheckTranscription and CheckWordsVariant:

  tsizepx (variable name) value matches for tablets but is too large for phones (applyDimension to 10 is better).
  Find a way to fix it for phones AND for tablets
parent 82ef68bc
......@@ -147,7 +147,11 @@ public class CheckTranscription extends AikumaActivity {
Log.i(TAG,"Scale: "+scale);
int padding_in_px = (int) (10 * scale + 0.5f);
Log.i(TAG,"Padding in px: "+padding_in_px);
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 10, getResources().getDisplayMetrics());
/** TODO
* tsizepx matches for tablets but is too large for phones (applyDimension to 10 is better)
* find a way to fix it for phones AND for tablets
*/
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 25, getResources().getDisplayMetrics());
Log.i(TAG,"Text size in px: "+tsizepx);
//transcription + checkbox
transcriptOK = new CheckBox(this);
......@@ -252,7 +256,11 @@ public class CheckTranscription extends AikumaActivity {
final float scale = getResources().getDisplayMetrics().density;
int padding_in_px = (int) (10 * scale + 0.5f);
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 10, getResources().getDisplayMetrics());
/** TODO
* tsizepx matches for tablets but is too large for phones (applyDimension to 10 is better)
* find a way to fix it for phones AND for tablets
*/
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 25, getResources().getDisplayMetrics());
//transcription + checkbox
transcriptOK = new CheckBox(this);
transcriptOK.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
......
......@@ -130,7 +130,11 @@ public class CheckWordVariant extends AikumaActivity {
checkboxCount=0;
final float scale = getResources().getDisplayMetrics().density;
int padding_in_px = (int) (10 * scale + 0.5f);
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 10, getResources().getDisplayMetrics());
/** TODO
* tsizepx matches for tablets but is too large for phones (applyDimension to 10 is better)
* find a way to fix it for phones AND for tablets
*/
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 25, getResources().getDisplayMetrics());
for (String element : variantlist){
//variant + checkbox
variant = new CheckBox(this);
......@@ -211,7 +215,11 @@ public class CheckWordVariant extends AikumaActivity {
checkboxCount=0;
final float scale = getResources().getDisplayMetrics().density;
int padding_in_px = (int) (10 * scale + 0.5f);
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 10, getResources().getDisplayMetrics());
/** TODO
* tsizepx matches for tablets but is too large for phones (applyDimension to 10 is better)
* find a way to fix it for phones AND for tablets
*/
int tsizepx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 25, getResources().getDisplayMetrics());
for (String element : variantlist){
//variant + checkbox
variant = new CheckBox(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment