optimize font-size of time, when date is off
This commit is contained in:
parent
cd91d6a3a5
commit
6bd7bf65a8
2 changed files with 22 additions and 1 deletions
|
@ -6,7 +6,10 @@ import android.os.Vibrator;
|
||||||
import android.support.wearable.watchface.WatchFaceStyle;
|
import android.support.wearable.watchface.WatchFaceStyle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.ustwo.clockwise.common.WatchFaceTime;
|
import com.ustwo.clockwise.common.WatchFaceTime;
|
||||||
|
@ -131,6 +134,25 @@ public class RICTxWF01 extends BaseWatchFace {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* optimize font-size --> when date is off then increase font-size of time */
|
||||||
|
Boolean isShowDate = sharedPrefs.getBoolean("show_date", true);
|
||||||
|
if (!isShowDate) {
|
||||||
|
layoutView.findViewById(R.id.date_time).setVisibility(View.GONE);
|
||||||
|
mHour.setTextSize(62);
|
||||||
|
mMinute.setTextSize(40);
|
||||||
|
mHour.setLetterSpacing((float) -0.066);
|
||||||
|
mMinute.setLetterSpacing((float) -0.066);
|
||||||
|
} else {
|
||||||
|
layoutView.findViewById(R.id.date_time).setVisibility(View.VISIBLE);
|
||||||
|
mHour.setTextSize(40);
|
||||||
|
mMinute.setTextSize(26);
|
||||||
|
mHour.setLetterSpacing((float) 0);
|
||||||
|
mMinute.setLetterSpacing((float) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @ToDo optimize font-size --> when direction and time-ago is off, increase font-size of sgv */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setColorLowRes() {
|
protected void setColorLowRes() {
|
||||||
|
|
|
@ -509,7 +509,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_marginLeft="0dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_horizontal|top" />
|
android:gravity="center_horizontal|top" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
Loading…
Reference in a new issue