<commit_before>/**
 * Copyright 2013 <NAME> and <NAME>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kanbansalad.scanner.client.android.program;

import static org.kanbansalad.scanner.client.CommonConstants.NONE;
import static org.kanbansalad.scanner.client.Visible.VISIBLE;

import org.kanbansalad.scanner.R;
import org.kanbansalad.scanner.client.Visible;
import org.kanbansalad.scanner.client.android.AsyncTaskExecutor;
import org.kanbansalad.scanner.client.android.IntentListener;
import org.kanbansalad.scanner.client.android.ModelProvider;
import org.kanbansalad.scanner.client.android.SharedPrefsSettings;
import org.kanbansalad.scanner.client.program.BluetoothTaskFinder;
import org.kanbansalad.scanner.client.program.ProgramPresenter;
import org.kanbansalad.scanner.client.program.ProgramView;
import org.kanbansalad.scanner.client.tag.TagType;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;

public class ProgramFragment extends Fragment implements IntentListener,
        ProgramView {

    private ProgramPresenter presenter;

    private View taskDetails;
    private View cellDetails;
    private View lookupButton;
    private Spinner tagTypeSpinner;

    private OnSharedPreferenceChangeListener sharedPrefsListener;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        final View rootView = inflater.inflate(R.layout.fragment_program,
                container,
                false);

        taskDetails = rootView.findViewById(R.id.task_details);
        cellDetails = rootView.findViewById(R.id.cell_details);
        initLookupButton();
        initTagTypeSpinner(rootView);

        giveTaskSummaryTwoLines(rootView);

        presenter.viewInitalized();
        initSharedPrefsListener();

        return rootView;
    }

    private void giveTaskSummaryTwoLines(final View rootView) {
        EditText name = (EditText) rootView.findViewById(R.id.task_name_edit);
        name.setLines(2);
        name.setHorizontallyScrolling(false);<commit_msg>Increased the size of the Name entry box to 3 lines<commit_after>/**
 * Copyright 2013 <NAME> and <NAME>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kanbansalad.scanner.client.android.program;

import static org.kanbansalad.scanner.client.CommonConstants.NONE;
import static org.kanbansalad.scanner.client.Visible.VISIBLE;

import org.kanbansalad.scanner.R;
import org.kanbansalad.scanner.client.Visible;
import org.kanbansalad.scanner.client.android.AsyncTaskExecutor;
import org.kanbansalad.scanner.client.android.IntentListener;
import org.kanbansalad.scanner.client.android.ModelProvider;
import org.kanbansalad.scanner.client.android.SharedPrefsSettings;
import org.kanbansalad.scanner.client.program.BluetoothTaskFinder;
import org.kanbansalad.scanner.client.program.ProgramPresenter;
import org.kanbansalad.scanner.client.program.ProgramView;
import org.kanbansalad.scanner.client.tag.TagType;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;

public class ProgramFragment extends Fragment implements IntentListener,
        ProgramView {

    private ProgramPresenter presenter;

    private View taskDetails;
    private View cellDetails;
    private View lookupButton;
    private Spinner tagTypeSpinner;

    private OnSharedPreferenceChangeListener sharedPrefsListener;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        final View rootView = inflater.inflate(R.layout.fragment_program,
                container,
                false);

        taskDetails = rootView.findViewById(R.id.task_details);
        cellDetails = rootView.findViewById(R.id.cell_details);
        initLookupButton();
        initTagTypeSpinner(rootView);

        giveTaskSummaryTwoLines(rootView);

        presenter.viewInitalized();
        initSharedPrefsListener();

        return rootView;
    }

    private void giveTaskSummaryTwoLines(final View rootView) {
        EditText name = (EditText) rootView.findViewById(R.id.task_name_edit);
        name.setLines(3);
        name.setHorizontallyScrolling(false);
{'fraction_non_alphanumeric': 0.07976841428111933, 'fraction_numerical': 0.003377291733676423, 'mean_word_length': 4.403127715030409, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5049398', 'n_tokens_mistral': 1760, 'n_tokens_neox': 1693, 'n_words': 419}