Skip to content

Instantly share code, notes, and snippets.

View sciage's full-sized avatar

Harish Uginval sciage

  • Dhwani RIS Pvt Ltd
  • gurgaon
View GitHub Profile
@sciage
sciage / 0_reuse_code.js
Created October 9, 2016 17:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sciage
sciage / textview.java
Created January 20, 2018 04:32
adding dimensions to textview via java
TextView textView = new TextView(this);
textView.setText(text.getName());
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
textView.setPadding((int) dpToPx(16), (int) dpToPx(8), (int) dpToPx(16), (int) dpToPx(8));
private float dpToPx(float dp) {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics());
}
# Revert Commit
This is sample