<commit_before>Views.gesture = function(win) {
	
	var touch_x_start = null;
	var touch_y_start = null;
	var touch_x_stop = null;
	var touch_y_stop = null;
	
	var arrows = Titanium.UI.createView({
		height:"265dp",
		width:"265dp",
		top:"35dp"
	});
	
	var up_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_up.png",
		width:"30dp",
		height:"135dp",
		top:"0dp"
	});
	
	var up_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_up_down.png",
		width:"30dp",
		height:"135dp",
		top:"0dp"
	});
	
	var down_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_down.png",
		width:"30dp",
		height:"135dp",
		bottom:"0dp"		
	});
	
	var down_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_down_down.png",
		width:"30dp",
		height:"135dp",
		bottom:"0dp"		
	});
	
	var left_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_left.png",
		height:"30dp",
		width:"135dp",
		left:"0dp"		
	});
	
	var left_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_left_down.png",
		height:"30dp",
		width:"135dp",
		left:"0dp"		
	});
	
	var right_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_right.png",
		height:"30dp",
		width:"135dp",
		right:"0dp"
	});
	
	var right_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_right_down.png",
		height:"30dp",
		width:"135dp",
		right:"0dp"
	});
	
	var return_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_back_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp",
		left:"10dp"
	});
	
	return_button.addEventListener('click', Controllers.remote.button("back"));
	
	
	var home_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_home_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp"
	});
	
	home_button.addEventListener('click', Controllers.remote.button("menu"));
	
	
	var keyboard_field = Helpers.ui.keyboard();
	
	var keyboard_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_keyboard_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp",
		right:"10dp"
	});
	
	keyboard_button.addEventListener('click', function(){
		Feedback.buttonPress();
		keyboard_field.focus();
	});

	if(Helpers.Application.isAndroid()) {
		keyboard_field.addEventListener('return', function() {
			keyboard_field2.focus();
		});
	};
	
	var keyboard_field2 = Titanium.UI.createTextField({  
	  width:0,
	  height:0,
		top:0,
		autocorrect:false,
	  keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
	  returnKeyType:Titanium.UI.RETURNKEY_DONE
	});
	
	arrows.add(up_arrow);
	arrows.add(down_arrow);
	arrows.add(left_arrow);
	arrows.add(right_arrow);
	
	win.add(return_button);
	win.add(home_button);
	win.add(keyboard_field2);
	win.add(keyboard_field);
	win.add(keyboard_button);
	
	win.add(arrows);
	
	function underThreshold(diff) {
		var difference_threshold = 20;
		return Math.abs(diff) < difference_threshold;
	}
	
	function shortSwipe(diff) {
		if(Helpers.Application.isAndroid() && Titanium.Platform.displayCaps.density == "high") {
			var swipe_length = 160;
		} else {
			var swipe_length = 110;
		}
		return Math.abs(diff) < swipe_length;
	}<commit_msg>swipe update<commit_after>Views.gesture = function(win) {
	
	var touch_x_start = null;
	var touch_y_start = null;
	var touch_x_stop = null;
	var touch_y_stop = null;
	
	var arrows = Titanium.UI.createView({
		height:"265dp",
		width:"265dp",
		top:"35dp"
	});
	
	var up_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_up.png",
		width:"30dp",
		height:"135dp",
		top:"0dp"
	});
	
	var up_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_up_down.png",
		width:"30dp",
		height:"135dp",
		top:"0dp"
	});
	
	var down_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_down.png",
		width:"30dp",
		height:"135dp",
		bottom:"0dp"		
	});
	
	var down_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_down_down.png",
		width:"30dp",
		height:"135dp",
		bottom:"0dp"		
	});
	
	var left_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_left.png",
		height:"30dp",
		width:"135dp",
		left:"0dp"		
	});
	
	var left_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_left_down.png",
		height:"30dp",
		width:"135dp",
		left:"0dp"		
	});
	
	var right_arrow = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_right.png",
		height:"30dp",
		width:"135dp",
		right:"0dp"
	});
	
	var right_arrow_mask = Titanium.UI.createView({
		backgroundImage:"images/gestures/gesture_arrow_right_down.png",
		height:"30dp",
		width:"135dp",
		right:"0dp"
	});
	
	var return_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_back_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp",
		left:"10dp"
	});
	
	return_button.addEventListener('click', Controllers.remote.button("back"));
	
	
	var home_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_home_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp"
	});
	
	home_button.addEventListener('click', Controllers.remote.button("menu"));
	
	
	var keyboard_field = Helpers.ui.keyboard();
	
	var keyboard_button = Titanium.UI.createButton({
		backgroundImage:'images/gestures/gesture_keyboard_button.png',
		height:"41dp",
		width:"81dp",
		top:"330dp",
		right:"10dp"
	});
	
	keyboard_button.addEventListener('click', function(){
		Feedback.buttonPress();
		keyboard_field.focus();
	});

	if(Helpers.Application.isAndroid()) {
		keyboard_field.addEventListener('return', function() {
			keyboard_field2.focus();
		});
	};
	
	var keyboard_field2 = Titanium.UI.createTextField({  
	  width:0,
	  height:0,
		top:0,
		autocorrect:false,
	  keyboardType:Titanium.UI.KEYBOARD_DEFAULT,
	  returnKeyType:Titanium.UI.RETURNKEY_DONE
	});
	
	arrows.add(up_arrow);
	arrows.add(down_arrow);
	arrows.add(left_arrow);
	arrows.add(right_arrow);
	
	win.add(return_button);
	win.add(home_button);
	win.add(keyboard_field2);
	win.add(keyboard_field);
	win.add(keyboard_button);
	
	win.add(arrows);
	
	function underThreshold(diff) {
		var difference_threshold = 20;
		return Math.abs(diff) < difference_threshold;
	}
	
	function shortSwipe(diff) {
		if(Helpers.Application.isAndroid() && Titanium.Platform.displayCaps.density == "high") {
			var swipe_length = 210;
		} else {
			var swipe_length = 150;
		}
		return Math.abs(diff) < swipe_length;
	}
{'fraction_non_alphanumeric': 0.15203458041436876, 'fraction_numerical': 0.028320166939931436, 'mean_word_length': 4.991071428571429, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '783286', 'n_tokens_mistral': 2799, 'n_tokens_neox': 2417, 'n_words': 313}