<commit_before>package edu.uoregon.casls.aris_android;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;


public class GamesListNearby extends ActionBarActivity {

	private static final String TIME_TAB_DAILY = "Daily";
	private static final String TIME_TAB_WEEKLY = "Weekly";
	private static final String TIME_TAB_MONTHLY = "Monthly";
	private String mUser_name;
	private String mPassword;
	private String mUser_Id;
	private String mDisplay_name;
	private String mMedia_id;
	private String mRead_write_key;
	private FrameLayout mFlTimeTabDaily;
	private FrameLayout mFlTimeTabWeekly;
	private FrameLayout mFlTimeTabMonthly;
	private TextView mTvTimeTabDaily;
	private TextView mTvTimeTabWeekly;
	private TextView mTvTimeTabMonthly;
	private String mTimeTabSelected = TIME_TAB_DAILY; // default starting tab

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_games_list_nearby);
		if (mUser_name == null || mPassword == null || mUser_Id == null) {
			Bundle extras = getIntent().getExtras();
			if (extras != null) {
				mUser_name = extras.getString("user_name");
				mPassword = extras.getString("password");
				mUser_Id = extras.getString("user_id");
				mDisplay_name = extras.getString("display_name");
				mMedia_id = extras.getString("media_id");
				mRead_write_key = extras.getString("read_write_key");
			}
			else
				Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": extras) was NULL");
		}

		// get time tab view elements.
		mFlTimeTabDaily = (FrameLayout) findViewById(R.id.fl_time_tab_daily);
		mFlTimeTabWeekly = (FrameLayout) findViewById(R.id.fl_time_tab_weekly);
		mFlTimeTabMonthly = (FrameLayout) findViewById(R.id.fl_time_tab_monthly);
		mTvTimeTabDaily = (TextView) findViewById(R.id.tv_time_tab_txt_daily);
		mTvTimeTabWeekly = (TextView) findViewById(R.id.tv_time_tab_txt_weekly);
		mTvTimeTabMonthly = (TextView) findViewById(R.id.tv_time_tab_txt_monthly);

	}

	// handle profile button click
	public void profileButtonClick(View v) {

	}

	public void onClickNearbyBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickNearbyBtn");

	}

	public void onClickPopularBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickPopularBtn");

	}

	public void onClickRecentBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickRecentBtn");

	}

	public void onClickSearchBtn(View v) {

	}

	public void onClickMineBtn(View v) {

	}

	public void onClickTabDaily(View v) {
		selectTimeRangeTab(TIME_TAB_DAILY);
	}

	public void onClickTabWeekly(View v) {
		selectTimeRangeTab(TIME_TAB_WEEKLY);

	}

	public void onClickTabMonthly(View v) {
		selectTimeRangeTab(TIME_TAB_MONTHLY);

	}

	private void selectTimeRangeTab(String tabSelected) {
		mTimeTabSelected = tabSelected;
		switch (tabSelected) {
			case (TIME_TAB_DAILY):
				mFlTimeTabDaily.setBackgroundResource(R.drawable.btn_selected_radius_rt_corners);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FFFCFCFC"));
				mFlTimeTabWeekly.setBackgroundResource(0);
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabMonthly.setBackgroundResource(0);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FF242424"));
				break;
			case (TIME_TAB_WEEKLY):
				mFlTimeTabDaily.setBackgroundResource(0);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabWeekly.setBackgroundColor(Color.parseColor("#FF0F3C7C"));
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FFFCFCFC"));
				mFlTimeTabMonthly.setBackgroundResource(0);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FF242424"));
				break;
			case (TIME_TAB_MONTHLY):
				mFlTimeTabDaily.setBackgroundResource(0);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabWeekly.setBackgroundResource(0);
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabMonthly.setBackgroundResource(R.drawable.btn_selected_radius_lft_corners);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FFFCFCFC"));
				break;
			default:
				throw new IllegalArgumentException("Invalid Time Range Selected: " + tabSelected);		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.menu_games_list_nearby, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();

		//noinspection SimplifiableIfStatement
		if (id == R.id.action_settings) {
			return true;
		}

		return super.onOptionsItemSelected(item);
	}
}
<commit_msg>Small correction to rt lft corners on time tabs<commit_after>package edu.uoregon.casls.aris_android;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;


public class GamesListNearby extends ActionBarActivity {

	private static final String TIME_TAB_DAILY = "Daily";
	private static final String TIME_TAB_WEEKLY = "Weekly";
	private static final String TIME_TAB_MONTHLY = "Monthly";
	private String mUser_name;
	private String mPassword;
	private String mUser_Id;
	private String mDisplay_name;
	private String mMedia_id;
	private String mRead_write_key;
	private FrameLayout mFlTimeTabDaily;
	private FrameLayout mFlTimeTabWeekly;
	private FrameLayout mFlTimeTabMonthly;
	private TextView mTvTimeTabDaily;
	private TextView mTvTimeTabWeekly;
	private TextView mTvTimeTabMonthly;
	private String mTimeTabSelected = TIME_TAB_DAILY; // default starting tab

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_games_list_nearby);
		if (mUser_name == null || mPassword == null || mUser_Id == null) {
			Bundle extras = getIntent().getExtras();
			if (extras != null) {
				mUser_name = extras.getString("user_name");
				mPassword = extras.getString("password");
				mUser_Id = extras.getString("user_id");
				mDisplay_name = extras.getString("display_name");
				mMedia_id = extras.getString("media_id");
				mRead_write_key = extras.getString("read_write_key");
			}
			else
				Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": extras) was NULL");
		}

		// get time tab view elements.
		mFlTimeTabDaily = (FrameLayout) findViewById(R.id.fl_time_tab_daily);
		mFlTimeTabWeekly = (FrameLayout) findViewById(R.id.fl_time_tab_weekly);
		mFlTimeTabMonthly = (FrameLayout) findViewById(R.id.fl_time_tab_monthly);
		mTvTimeTabDaily = (TextView) findViewById(R.id.tv_time_tab_txt_daily);
		mTvTimeTabWeekly = (TextView) findViewById(R.id.tv_time_tab_txt_weekly);
		mTvTimeTabMonthly = (TextView) findViewById(R.id.tv_time_tab_txt_monthly);

	}

	// handle profile button click
	public void profileButtonClick(View v) {

	}

	public void onClickNearbyBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickNearbyBtn");

	}

	public void onClickPopularBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickPopularBtn");

	}

	public void onClickRecentBtn(View v) {
		Log.i(AppUtils.LOGTAG, getClass().getSimpleName() + ": onClickRecentBtn");

	}

	public void onClickSearchBtn(View v) {

	}

	public void onClickMineBtn(View v) {

	}

	public void onClickTabDaily(View v) {
		selectTimeRangeTab(TIME_TAB_DAILY);
	}

	public void onClickTabWeekly(View v) {
		selectTimeRangeTab(TIME_TAB_WEEKLY);

	}

	public void onClickTabMonthly(View v) {
		selectTimeRangeTab(TIME_TAB_MONTHLY);

	}

	private void selectTimeRangeTab(String tabSelected) {
		mTimeTabSelected = tabSelected;
		switch (tabSelected) {
			case (TIME_TAB_DAILY):
				mFlTimeTabDaily.setBackgroundResource(R.drawable.btn_selected_radius_lft_corners);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FFFCFCFC"));
				mFlTimeTabWeekly.setBackgroundResource(0);
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabMonthly.setBackgroundResource(0);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FF242424"));
				break;
			case (TIME_TAB_WEEKLY):
				mFlTimeTabDaily.setBackgroundResource(0);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabWeekly.setBackgroundColor(Color.parseColor("#FF0F3C7C"));
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FFFCFCFC"));
				mFlTimeTabMonthly.setBackgroundResource(0);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FF242424"));
				break;
			case (TIME_TAB_MONTHLY):
				mFlTimeTabDaily.setBackgroundResource(0);
				mTvTimeTabDaily.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabWeekly.setBackgroundResource(0);
				mTvTimeTabWeekly.setTextColor(Color.parseColor("#FF242424"));
				mFlTimeTabMonthly.setBackgroundResource(R.drawable.btn_selected_radius_rt_corners);
				mTvTimeTabMonthly.setTextColor(Color.parseColor("#FFFCFCFC"));
				break;
			default:
				throw new IllegalArgumentException("Invalid Time Range Selected: " + tabSelected);		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.menu_games_list_nearby, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();

		//noinspection SimplifiableIfStatement
		if (id == R.id.action_settings) {
			return true;
		}

		return super.onOptionsItemSelected(item);
	}
}

{'fraction_non_alphanumeric': 0.10249621785173979, 'fraction_numerical': 0.00869894099848714, 'mean_word_length': 5.557346559206447, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '833568', 'n_tokens_mistral': 3891, 'n_tokens_neox': 3401, 'n_words': 642}