This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void enterLoadingState(){ | |
// Animation roller = AnimationUtils.loadAnimation(context, R.anim.roller); | |
// roller.setRepeatMode(ValueAnimator.INFINITE); | |
// mProfileImageView.setImageDrawable(progress); | |
// mProfileImageView.setAnimation(roller); | |
Drawable progress = getResources().getDrawable(R.drawable.indeterminate_progress); | |
mProfileExtra.setCompoundDrawablesWithIntrinsicBounds(null, null, progress, null); | |
mProfileExtra.setText(R.string.loading); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { | |
//mStationTextViewGroup.setBackground(progress); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean dispatchTouchEvent(MotionEvent ev) { | |
if ((ev.getEventTime() - mGuardingClicksMarker) < CLICK_GUARD_TIMEOUT) | |
return true; | |
return super.dispatchTouchEvent(ev); | |
} | |
static long mGuardingClicksMarker = 0; | |
public class GuardedOnClickListener implements View.OnClickListener { | |
public void onClick (View view) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3D printed monitor stand for the Acer monitors that I have at work. | |
Monitor has a 7.75" round base. | |
Stand should be able to hold one or more 7" tablets at a comfortable angle for debugging. | |
Tablets should be held firmly enough that they can be tapped and swiped | |
Tablets should be able to be plugged in and the plugs should go to a hub. | |
Swivel base would be nice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//use <MCAD/involute_gears.scad> | |
include <parametric_involute_gear_v5.0.scad> | |
// number_of_teeth=11, | |
// cone_distance=100, | |
// face_width=20, | |
// outside_circular_pitch=1000, | |
// pressure_angle=30, | |
// clearance = 0.2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
AUTO-KNITTER PRINCIPLE PARTS - Historical definitions | |
BED PLATE:: The foundation which all the other parts rest-the stationary needle cylinder, the cam shell (with ribbing attachment when in use), and the yarn stand. It is secured to the bench or table by thumb screws. | |
GEAR RING:: | |
CRANK WHEEL:: | |
CAM SHELL:: The outside shell of the machine containing the needle paths and cams which operate the long needles. It rests on the gear ring which moves it around the needle cylinder | |
NEEDLE CYLINDER:: A hollow cylinder, slotted outside to hold the long needles. This cylinder does not move but is stationary. | |
YARN CARRIER:: An upright attached to the gear ring which supplies yarn to the needles as it travels around the cylinder with the cam shell. | |
RIBBER NEEDLE DIAL:: a flat disc, sloted on its upper side to hold the short needles which make the ribbing or "purling" | |
TAPPET PLATE:: A plate which rests on the ribber dial and contains cams governing the action of the ribber needles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a way to manage A-B testing within an app. | |
* log properties can be set/got through 'adb shell setprop|getprop' commands | |
* Properties that start with log. can be set. other properties can just be read. | |
* Since the properties can be adjusted while the program is running | |
* This is designed to allow logging changes in real-time to be made | |
* But it is also an easy way to communicate runtime options to a program | |
* | |
* Properties that are set are device specific and they will persist until the device is rebooted | |
* Upon reboot, all log properties will be lost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gradient that creates a shader with a very large circular radius | |
// to create slightly rounded launchpad background image | |
// once the Launchpad changes, this can likely be removed | |
/* Usage .. | |
Display display = getActivity().getWindowManager().getDefaultDisplay(); | |
Point size = new Point(); | |
display.getSize(size); | |
View panel = view.findViewById(R.id.panel); | |
panel.setBackground(new LaunchPadDrawable(size.x * 4f)); | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dangvarmit.helper | |
import android.view.ViewGroup; | |
import android.widget.ProgressBar; | |
/** | |
* Configures a standard ProgressBar to act like a horizontal page indexer | |
* can be configured to show dots or rectangles depending on the drawable used | |
* <p/> | |
* usage: |