Java 类android.text.method.ScrollingMovementMethod 实例源码

项目:Microsphere    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            new DetectionTask().execute(path);
        }
    });
    add_log(stringFromJNI());
    TextView tv = (TextView) findViewById(R.id.sample_text);
    tv.setMovementMethod(new ScrollingMovementMethod());
    get_permission();
    init_system();
}
项目:LearnHangul    文件:AboutHangulActivity.java   
@Override
public void onCreate(Bundle savedInstanceState){

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about_hangul);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setBackgroundColor(ContextCompat.getColor(getApplicationContext(),R.color.blue));
    toolbar.setLogo(R.mipmap.ic_launcher);
    toolbar.setTitleMarginStart(90);
    toolbar.setTitle(getString(R.string.toolbat_title_about_hangul));
    setSupportActionBar(toolbar);

    TextView textAboutHangul = (TextView) findViewById(R.id.text_about_hangul);
    textAboutHangul.setMovementMethod(new ScrollingMovementMethod());

}
项目:SpaceRace    文件:HintFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View mainView = inflater.inflate(R.layout.fragment_hint, container, false);
    ButterKnife.bind(this, mainView);

    parent = (MapActivity)getActivity();

    explanationContentText.setMovementMethod(new ScrollingMovementMethod());
    nextHintText.setMovementMethod(new ScrollingMovementMethod());
    layouts = new ArrayList<>();
    layouts.add(explanationView);
    layouts.add(question1View);
    layouts.add(question2View);
    layouts.add(question3View);
    layouts.add(quizResultView);
    layouts.add(nextHintView);
    layouts.add(imageHintView);
    showView(explanationView);

    if (totalScoreBuilder == null)
        totalScoreBuilder = new ScoreCounter.Builder();

    return mainView;
}
项目:SpaceRace    文件:FirstHintFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {

    parent = (MapActivity)getActivity();
    View v = inflater.inflate(R.layout.fragment_first_hint, container, false);
    ButterKnife.bind(this, v);

    nextHintText.setMovementMethod(new ScrollingMovementMethod());
    layouts = new ArrayList<>();
    layouts.add(nextHintView);
    layouts.add(imageHintView);

    // Inflate the layout for this fragment
    return v;
}
项目:letv    文件:OAuth2Activity.java   
private void initView() {
    this.m3thLogo = (ImageView) this.mRootView.findViewWithTag("umgr_oauth2_3th_logo");
    this.mCoolCloudLogo = (ImageView) this.mRootView.findViewWithTag("umgr_oauth2_coolcloud_logo");
    this.m3thName = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_3th_name");
    this.mRelation = (ImageView) this.mRootView.findViewWithTag("umgr_oauth2_relation");
    this.mAccountLogo = (ImageView) this.mRootView.findViewWithTag("umgr_oauth2_coolcloud_logo");
    this.mAccountTv = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_coolcloud_name");
    this.mUserLogo = (ImageView) this.mRootView.findViewWithTag("umgr_oauth2_user_logo");
    this.mUserAccount = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_user_account");
    this.mSwitchAccount = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_switch_account");
    this.mOAuth2 = (Button) this.mRootView.findViewWithTag("umgr_oauth2_submit");
    this.mOAuth2Scope = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_scope");
    this.mErrorPrompt = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_error_prompt");
    this.mOAuth2Prompt = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_prompt");
    this.mCoolCloudName = (TextView) this.mRootView.findViewWithTag("umgr_oauth2_coolcloud_name");
    this.mOAuth2Scope.setMovementMethod(ScrollingMovementMethod.getInstance());
}
项目:Aardvark    文件:GUI_fragment_graph.java   
private void calculateLetterFrequency()
{
    frequencyAnalysis = FrequencyAnalysis.frequencyAnalysis(cipherText, sequenceLength);

    frequencyAnalysisTextView = (TextView) findViewById(R.id.frequencyDetailsTextView);

    int dataLen = frequencyAnalysis.dataLength();
    if(dataLen > DATA_LIMIT)
        dataLen = DATA_LIMIT;

    frequencyAnalysisTextView.append("[Common word occurences]\n");

    for(int i = 0; i < dataLen; i++)
        frequencyAnalysisTextView.append(frequencyAnalysis.getFrequencyAt(i) + "\n");

    frequencyAnalysisTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
}
项目:CustomAndroidOneSheeld    文件:TextToSpeechFragment.java   
@Override
public void doOnViewCreated(View v, @Nullable Bundle savedInstanceState) {
    speakerLevel = (ImageView) v
            .findViewById(R.id.speaker_shield_imageview);
    femaleBtn = (Button) v.findViewById(R.id.increaseBtn);
    maleBtn = (Button) v.findViewById(R.id.decreaseBtn);
    ttsText = (OneSheeldTextView) v.findViewById(R.id.ttsText);
    ttsText.setMovementMethod(new ScrollingMovementMethod());
    animation = (AnimationDrawable) speakerLevel.getBackground();
}
项目:API-Example-App    文件:FragmentDemoBasic.java   
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
    Log.i(CLS_NAME, "onCreateView");

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

    spinnerTTS = (Spinner) rootView.findViewById(R.id.spinnerTTS);
    spinnerTTS.setOnItemSelectedListener(this);
    spinnerVR = (Spinner) rootView.findViewById(R.id.spinnerVR);
    spinnerVR.setOnItemSelectedListener(this);
    spinnerNLU = (Spinner) rootView.findViewById(R.id.spinnerNLU);
    spinnerNLU.setOnItemSelectedListener(this);

    etSpeech = (EditText) rootView.findViewById(R.id.etSpeech);

    tvResults = (TextView) rootView.findViewById(R.id.tvResults);
    tvResults.setMovementMethod(ScrollingMovementMethod.getInstance());

    final ImageButton imageButton = (ImageButton) rootView.findViewById(R.id.ibRun);
    imageButton.setOnClickListener(this);

    return rootView;
}
项目:API-Example-App    文件:FragmentDemoCommand.java   
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
    Log.i(CLS_NAME, "onCreateView");

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

    final Button buttonC1 = (Button) rootView.findViewById(R.id.buttonC1);
    buttonC1.setOnClickListener(this);
    final Button buttonC2 = (Button) rootView.findViewById(R.id.buttonC2);
    buttonC2.setOnClickListener(this);
    final Button buttonC3 = (Button) rootView.findViewById(R.id.buttonC3);
    buttonC3.setOnClickListener(this);

    tvResults = (TextView) rootView.findViewById(R.id.tvResults);
    tvResults.setMovementMethod(ScrollingMovementMethod.getInstance());

    return rootView;
}
项目:android-banklink    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  ((SampleApp) getApplication()).appComponent().inject(this);

  setContentView(R.layout.activity_main);
  ButterKnife.bind(this);
  final Toolbar toolbar = findById(this, R.id.toolbar);
  setSupportActionBar(toolbar);
  resultExtraMsg.setMovementMethod(new ScrollingMovementMethod());
  lifecycles = RxActivityLifecycles.create(this);

  if (mainActionSubscription.isUnsubscribed()) {
    wireMainAction();
  }

  setupPackets();
}
项目:samples-cognitive-services-android    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    SpeechConfiguration configuration = new SpeechConfiguration(SUBSCRIPTION_KEY, EndPoint.Conversation, OutputFormat.SIMPLE);
    speechClient = SpeechToText.getSpeechClient(configuration);

    Button connectButton = (Button) findViewById(R.id.buttonConnect);
    connectButton.setOnClickListener(view -> speechClient.connect());

    recordButton = (Button) findViewById(R.id.buttonRecord);
    recordButton.setOnClickListener(view -> recordAudio());

    speechResultTextView = (TextView) findViewById(R.id.textViewSpeechResult);
    speechResultTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
}
项目:CS4160-trustchain-android    文件:TrustChainActivity.java   
private void initVariables() {
    thisActivity = this;
    localIPText = findViewById(R.id.my_local_ip);
    externalIPText = findViewById(R.id.my_external_ip);
    statusText = findViewById(R.id.status);
    statusText.setMovementMethod(new ScrollingMovementMethod());

    sendButton = (Button) findViewById(R.id.send_button);
    messageEditText = (EditText) findViewById(R.id.message_edit_text);
    extraInformationPanel = (LinearLayout) findViewById(R.id.extra_information_panel);
    developerModeText = (TextView) findViewById(R.id.developer_mode_text);
    switchDeveloperMode = (SwitchCompat) findViewById(R.id.switch_developer_mode);
    switchDeveloperMode.setOnCheckedChangeListener(this);

    editTextDestinationIP = findViewById(R.id.destination_IP);
    editTextDestinationPort = findViewById(R.id.destination_port);
}
项目:nightmode    文件:AboutActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    try
    {
        // Set the context of the textview to the app VerionName
        TextView version = (TextView)findViewById(R.id.nameView);
        String app_ver = this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
        version.setText(getString(R.string.app_name) + " Version" + " " + app_ver);
    }
    catch (PackageManager.NameNotFoundException e)
    {
        // This should never happen
        Log.e("NightMode/AboutActivity", e.getMessage());
        finish();
    }
    TextView licenseDetails = (TextView)findViewById(R.id.licenceText);
    licenseDetails.setText(Html.fromHtml(getString(R.string.licence_info)));
    // Make the license scrollable
    licenseDetails.setMovementMethod(new ScrollingMovementMethod());
}
项目:Rx-Android-Samples    文件:DoOperatorFragment.java   
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    mRepoListView = view.findViewById(R.id.repo_list_view);
    mObserverLog = view.findViewById(R.id.observer_log);
    mObserverLog.setMovementMethod(new ScrollingMovementMethod());

    mApi.getObservableRepositories("wrong-user-name-for-test")
            //This will be called before onError is called in the Observer.
            .doOnError(new Consumer<Throwable>() {
                @Override
                public void accept(@NonNull Throwable throwable) throws Exception {

                    mObserverLog.append("Forced error, don't worry ;)\n");
                }
            })
            //Subscribe the Network call in io Thread.
            .subscribeOn(Schedulers.io())
            //Subscribe the Observer in MainThread so it can updates the UI with the result.
            .observeOn(AndroidSchedulers.mainThread())
            //Choose the subscribed Observer for items emitted by this observable.
            .subscribe(mListBaseObserver);
}
项目:Rx-Android-Samples    文件:SkipOperatorFragment.java   
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    mRepoListView = view.findViewById(R.id.repo_list_view);
    mObserverLog = view.findViewById(R.id.observer_log);
    mObserverLog.setMovementMethod(new ScrollingMovementMethod());

    mApi.getObservableRepositories(Utils.USER)
            .flatMap(new Function<List<RepositoryResponse>, ObservableSource<RepositoryResponse>>() {
                @Override
                public ObservableSource<RepositoryResponse> apply(@NonNull List<RepositoryResponse> repositoryResponses) throws Exception {
                    return Observable.fromIterable(repositoryResponses);
                }
            })
            //Skip the first 2 repositories.
            .skip(2)
            //Skip the last 2 repositories.
            .skipLast(2)
            //Subscribe the Network call in io Thread.
            .subscribeOn(Schedulers.io())
            //Subscribe the Observer in MainThread so it can updates the UI with the result.
            .observeOn(AndroidSchedulers.mainThread())
            //Choose the subscribed Observer for items emitted by this observable.
            .subscribe(mBaseObserver);
}
项目:MobiRNN-EMDL17    文件:PhoneActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    controlToggle = (ToggleButton) findViewById(R.id.toggle_control);

    mStatusTextView = (TextView) findViewById(R.id.tv_status);
    mStatusTextView.setMovementMethod(new ScrollingMovementMethod());
    mResultProgress = (ProgressBar) findViewById(R.id.progress);
    mResultProgress.setMax(100);

    NumberPicker picker = (NumberPicker) findViewById(R.id.number_picker);
    picker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
    picker.setOnValueChangedListener(this);
    picker.setDisplayedValues(mSampleSizes);
    picker.setMinValue(0);
    picker.setMaxValue(mSampleSizes.length - 1);
    picker.setWrapSelectorWheel(true);
    picker.setValue(0);
    mSampleSize = 1;
    Logger.i("Sample size initial value: %s", mSampleSize);

    checkPermissions();

}
项目:EsperantoRadio    文件:LocalPlayerActivity.java   
private void loadViews() {
    mVideoView = (VideoView) findViewById(R.id.videoView1);
    mTitleView = (TextView) findViewById(R.id.titleTextView);
    mDescriptionView = (TextView) findViewById(R.id.descriptionTextView);
    mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
    mAuthorView = (TextView) findViewById(R.id.authorTextView);
    mStartText = (TextView) findViewById(R.id.startText);
    mStartText.setText(Utils.formatMillis(0));
    mEndText = (TextView) findViewById(R.id.endText);
    mSeekbar = (SeekBar) findViewById(R.id.seekBar1);
    mPlayPause = (ImageView) findViewById(R.id.playPauseImageView);
    mLoading = (ProgressBar) findViewById(R.id.progressBar1);
    mControllers = findViewById(R.id.controllers);
    mContainer = findViewById(R.id.container);
    mCoverArt = (ImageView) findViewById(R.id.coverArtView);
    ViewCompat.setTransitionName(mCoverArt, getString(R.string.transition_image));
    mPlayCircle = (ImageButton) findViewById(R.id.play_circle);
    mPlayCircle.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            togglePlayback();
        }
    });
}
项目:IDCardNum    文件:MainActivity.java   
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        radioSex = (RadioGroup)findViewById(R.id.radioSex);
        spyear = (Spinner) findViewById(R.id.spyear);
        spmonth = (Spinner) findViewById(R.id.spmonth);
        spday = (Spinner) findViewById(R.id.spday);
        spprovince = (Spinner) findViewById(R.id.spprovince);
        spcity = (Spinner) findViewById(R.id.spcity);
        sparea = (Spinner) findViewById(R.id.sparea);
        snum = (Spinner)  findViewById(R.id.number);
        resText = (TextView) findViewById(R.id.showResult);
        //set textview with scroll function
        resText.setMovementMethod(ScrollingMovementMethod.getInstance());
        btRun = (Button) findViewById(R.id.runCreate);
        btRun.setVisibility(View.INVISIBLE);
//        btLoad = (Button)findViewById(R.id.loadInfo);

        mContext = this;
        new LoadingDB().execute("");
    }
项目:drawee-text-view    文件:MainActivity.java   
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    final TextView textview = view.findViewById(R.id.text1);
    textview.setMovementMethod(ScrollingMovementMethod.getInstance());
    textview.setText(buildText());
    view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (v.getTag() == "") {
                textview.setText(buildText());
                v.setTag(null);
            } else {
                textview.setText(buildText2());
                v.setTag("");
            }
        }
    });
}
项目:Markets    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    dataTextView = (TextView)findViewById(R.id.dataTextView);
    dataTextView.setMovementMethod(new ScrollingMovementMethod());
    currentTextBox = (EditText)findViewById(R.id.currentTextBox);
    currentTextBox.setEnabled(false);
    symbolEditText = (EditText)findViewById(R.id.symbolEditText);
    apiKeys = new APIKeys();
    tk = new TradeKingApiCalls();
    p1 = new PhaseOneControl(this);
    symbolEditText.setText("SPY");

    //keep the screen on
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
项目:CastVideos-android    文件:LocalPlayerActivity.java   
private void loadViews() {
    mVideoView = (VideoView) findViewById(R.id.videoView1);
    mTitleView = (TextView) findViewById(R.id.titleTextView);
    mDescriptionView = (TextView) findViewById(R.id.descriptionTextView);
    mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
    mAuthorView = (TextView) findViewById(R.id.authorTextView);
    mStartText = (TextView) findViewById(R.id.startText);
    mStartText.setText(Utils.formatMillis(0));
    mEndText = (TextView) findViewById(R.id.endText);
    mSeekbar = (SeekBar) findViewById(R.id.seekBar1);
    mPlayPause = (ImageView) findViewById(R.id.playPauseImageView);
    mLoading = (ProgressBar) findViewById(R.id.progressBar1);
    mControllers = findViewById(R.id.controllers);
    mContainer = findViewById(R.id.container);
    mCoverArt = (ImageView) findViewById(R.id.coverArtView);
    ViewCompat.setTransitionName(mCoverArt, getString(R.string.transition_image));
    mPlayCircle = (ImageButton) findViewById(R.id.play_circle);
    mPlayCircle.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            togglePlayback();
        }
    });
}
项目:FangYanShuo    文件:JxhActivity.java   
private  void findViews(){
        Toolbar toolbar= (Toolbar) findViewById(R.id.toolbar_jxh);
        setSupportActionBar(toolbar);
        toolbar.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
        toolbar.setTitleTextColor(getResources().getColor(R.color.white));
        getSupportActionBar().setTitle(item.getString("title"));
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_arrow_back_white);

        tv_title = (TextView) findViewById(R.id.tv_jxh_title);
        tv_lang = (TextView) findViewById(R.id.tv_jxh_lang);
        tv_provider = (TextView) findViewById(R.id.tv_jxh_provider);
        tv_description = (TextView) findViewById(R.id.tv_jxh_description);
        tv_description.setMovementMethod(new ScrollingMovementMethod());
        imageButton = (ImageButton) findViewById(R.id.ib_jxh);

        tv_title.setText(item.getString("title"));
        tv_lang.setText(item.getString("lang"));
        tv_provider.setText(item.getString("provider"));
        tv_description.setText(item.getString("description").replace(" ","\r\n"));

}
项目:StudyBox_Android    文件:QuestionFragment.java   
private void initPromptSwitcher() {
    promptTextSwitcher.setFactory(new ViewSwitcher.ViewFactory() {
        @Override
        public View makeView() {
            TextView textView = new TextView(getActivity());
            int padding = getResources().getDimensionPixelOffset(R.dimen.prompt_padding);
            FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
                    FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.MATCH_PARENT);
            params.gravity = Gravity.CENTER;
            textView.setLayoutParams(params);
            textView.setGravity(Gravity.CENTER);
            textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimension(R.dimen.exam_small_text));
            textView.setPadding(padding, padding, padding, padding);
            textView.setMovementMethod(new ScrollingMovementMethod());
            textView.setVerticalScrollBarEnabled(true);
            return textView;
        }
    });
}
项目:LLApp    文件:FloatView.java   
/**
         * 设置值
         */
        @Override
        public void onBindViewHolder(final ViewHolder viewHolder, final int i) {
//            viewHolder.mImg.setImageResource(mDatas.get(i).pic);
//            Glide.with(getContext()).load(mDatas.get(i).pic).into(viewHolder.mImg);
            viewHolder.mImg.setImageResource(mDatas.get(i));
            viewHolder.mTxt.setText("艾弗森");
            viewHolder.mTxt.setMovementMethod(ScrollingMovementMethod.getInstance());
//            viewHolder.itemView.setOnClickListener(new OnClickListener() {
//                @Override
//                public void onClick(View view) {
//                    int position = viewHolder.getPosition();
//                    onItemClickListener.OnItemClick(view, position);
//                }
//            });
        }
项目:Udacity-Capstone-Project    文件:FrgBaseDoWorkout.java   
private void loadNextExercise() {
    if (workout.isTheLastExercise()) {
        lLFrgDoWorkoutFooter.setVisibility(View.GONE);
        lLFrgDoWorkoutComplete.setVisibility(View.VISIBLE);
    } else {
        lLFrgDoWorkoutFooter.setVisibility(View.VISIBLE);
        tVFrgDoWorkoutNextExerciseDescription.setMovementMethod(new ScrollingMovementMethod());
        if (workout.findNextExercise() != null) {
            tVFrgDoWorkoutNextExerciseName.setText(getString(R.string.frg_do_workout_next_exercise_name,
                    workout.findNextExercise().getName()));
            tVFrgDoWorkoutNextExerciseDescription.setText(
                    Html.fromHtml(getString(R.string.frg_do_workout_next_exercise_description,
                            workout.findNextExercise().getDescription())));
        } else {
            tVFrgDoWorkoutNextExerciseName.setText(getString(R.string.frg_do_workout_next_exercise_name,
                    workout.getExerciseList().get(0).getName()));
            tVFrgDoWorkoutNextExerciseDescription.setText(
                    Html.fromHtml(getString(R.string.frg_do_workout_next_exercise_description,
                            workout.getExerciseList().get(0).getDescription())));
        }

    }
}
项目:settingscompat    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    vFloat = new FloatView(this);
    vResult = (TextView) findViewById(R.id.result);

    findViewById(R.id.result).setOnClickListener(this);
    findViewById(R.id.check).setOnClickListener(this);
    findViewById(R.id.manage).setOnClickListener(this);
    findViewById(R.id.toggle).setOnClickListener(this);
    findViewById(R.id.detail).setOnClickListener(this);

    TextView tv = (TextView) findViewById(R.id.info);
    tv.setMovementMethod(ScrollingMovementMethod.getInstance());

    tv.setText(readString("/system/build.prop"));
    if (SettingsCompat.canDrawOverlays(this)) {
        vFloat.attach();
    } else {
        vFloat.detach();
    }
}
项目:AndroidTcpdumpGui    文件:ViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_view);

    ActionBar actionBar = getSupportActionBar();
    if(actionBar != null)
        actionBar.setDisplayHomeAsUpEnabled(true);


    mEditTextInfo = (EditText)findViewById(R.id.editTextInfo);
    mEditTextComment = (EditText)findViewById(R.id.editTextComment);

    mEditTextInfo.setKeyListener(null);
    mEditTextInfo.setMovementMethod(new ScrollingMovementMethod());
    mEditTextInfo.setHorizontallyScrolling(true);

    Intent intent = getIntent();
    if(IntentAction_OpenCapture.equals(intent.getAction())) {
        mCaptureName = intent.getStringExtra(IntentExtra_CaptureName);
        setTitle("Capture:" + mCaptureName);
        loadCapture();
    }
}
项目:easyapi-apm-demo    文件:UrlReportActivity.java   
/**
 * Initialization
 */
public void init() {
    mFstLogData = true;

    mUrlEt = (EditText) findViewById(R.id.edit_url);
    mMethodEt = (EditText) findViewById(R.id.edit_method);
    mContentTypeEt = (EditText) findViewById(R.id.edit_content_type);
    mLatencyEt = (EditText) findViewById(R.id.edit_latency);
    mBytesRecvEt = (EditText) findViewById(R.id.edit_bytes_recv);
    mBytesSendEt = (EditText) findViewById(R.id.edit_bytes_send);
    mStatusCodeEt = (EditText) findViewById(R.id.edit_status_code);

    mReportBtn = (Button) findViewById(R.id.report_url_btn);
    mReportBtn.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            doReport();
        }
    });

    mLogTextView = (TextView) findViewById(R.id.log_tv);
    mLogTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
}
项目:easyapi-apm-demo    文件:SqliteTestActivity.java   
/**
 * Initialization
 */
public void init() {
    OnClickListener l = new ButtonListener();
    mInsertBtn = (Button) findViewById(R.id.insert_btn);
    mInsertBtn.setOnClickListener(l);

    mQueryBtn = (Button) findViewById(R.id.query_btn);
    mQueryBtn.setOnClickListener(l);

    mUpdateBtn = (Button) findViewById(R.id.update_btn);
    mUpdateBtn.setOnClickListener(l);

    mLogTextView = (Button) findViewById(R.id.delete_btn);
    mLogTextView.setOnClickListener(l);

    mLogTextView = (TextView) findViewById(R.id.log_tv);
    mLogTextView.setMovementMethod(ScrollingMovementMethod.getInstance());

    createDb();
}
项目:cast-videos-android    文件:LocalPlayerActivity.java   
private void loadViews() {
    mVideoView = (VideoView) findViewById(R.id.videoView1);
    mTitleView = (TextView) findViewById(R.id.textView1);
    mDescriptionView = (TextView) findViewById(R.id.textView2);
    mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
    mAuthorView = (TextView) findViewById(R.id.textView3);
    mStartText = (TextView) findViewById(R.id.startText);
    mStartText.setText(Utils.formatMillis(0));
    mEndText = (TextView) findViewById(R.id.endText);
    mSeekbar = (SeekBar) findViewById(R.id.seekBar1);
    mPlayPause = (ImageView) findViewById(R.id.imageView2);
    mLoading = (ProgressBar) findViewById(R.id.progressBar1);
    mControllers = findViewById(R.id.controllers);
    mContainer = findViewById(R.id.container);
    mCoverArt = (ImageView) findViewById(R.id.coverArtView);
    ViewCompat.setTransitionName(mCoverArt, getString(R.string.transition_image));
    mPlayCircle = (ImageButton) findViewById(R.id.play_circle);
    mPlayCircle.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            togglePlayback();
        }
    });
}
项目:cast-videos-android    文件:LocalPlayerActivity.java   
private void loadViews() {
    mVideoView = (VideoView) findViewById(R.id.videoView1);
    mTitleView = (TextView) findViewById(R.id.textView1);
    mDescriptionView = (TextView) findViewById(R.id.textView2);
    mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
    mAuthorView = (TextView) findViewById(R.id.textView3);
    mStartText = (TextView) findViewById(R.id.startText);
    mStartText.setText(Utils.formatMillis(0));
    mEndText = (TextView) findViewById(R.id.endText);
    mSeekbar = (SeekBar) findViewById(R.id.seekBar1);
    mPlayPause = (ImageView) findViewById(R.id.imageView2);
    mLoading = (ProgressBar) findViewById(R.id.progressBar1);
    mControllers = findViewById(R.id.controllers);
    mContainer = findViewById(R.id.container);
    mCoverArt = (ImageView) findViewById(R.id.coverArtView);
    ViewCompat.setTransitionName(mCoverArt, getString(R.string.transition_image));
    mPlayCircle = (ImageButton) findViewById(R.id.play_circle);
    mPlayCircle.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            togglePlayback();
        }
    });
}
项目:android-expr-eval    文件:ExprEval.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_expr_eval);
    setSupportActionBar((Toolbar)findViewById(R.id.my_toolbar));
    LibraryLocalizer.localize(this);
    in = (EditText) findViewById(R.id.inputText);
    out = (TextView) findViewById(R.id.outputText);
    out.setMovementMethod(new ScrollingMovementMethod());
    evalBtn = (Button)findViewById(R.id.evalBtn);
    evalBtn.setOnClickListener(this);
    ctxDialog = new ContextDialogFragment();
    ctx = new TextViewExpressionContext(out);
    ctx.addObserver(ctxDialog);
    ctxDialog.update(ctx, null);
}
项目:walt    文件:DragLatencyFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    logger = SimpleLogger.getInstance(getContext());
    waltDevice = WaltDevice.getInstance(getContext());

    // Inflate the layout for this fragment
    final View view = inflater.inflate(R.layout.fragment_drag_latency, container, false);
    logTextView = (TextView) view.findViewById(R.id.txt_log_drag_latency);
    startButton = view.findViewById(R.id.button_start_drag);
    restartButton = view.findViewById(R.id.button_restart_drag);
    finishButton = view.findViewById(R.id.button_finish_drag);
    touchCatcher = (TouchCatcherView) view.findViewById(R.id.tap_catcher);
    crossCountsView = (TextView) view.findViewById(R.id.txt_cross_counts);
    dragCountsView = (TextView) view.findViewById(R.id.txt_drag_counts);
    latencyChart = (ScatterChart) view.findViewById(R.id.latency_chart);
    latencyChartLayout = view.findViewById(R.id.latency_chart_layout);
    logTextView.setMovementMethod(new ScrollingMovementMethod());
    view.findViewById(R.id.button_close_chart).setOnClickListener(this);
    restartButton.setEnabled(false);
    finishButton.setEnabled(false);
    return view;
}
项目:walt    文件:AccelerometerFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    logger = SimpleLogger.getInstance(getContext());
    waltDevice = WaltDevice.getInstance(getContext());

    // Inflate the layout for this fragment
    final View view = inflater.inflate(R.layout.fragment_accelerometer, container, false);
    logTextView = (TextView) view.findViewById(R.id.txt_log);
    startButton = view.findViewById(R.id.button_start);
    latencyChart = (ScatterChart) view.findViewById(R.id.latency_chart);
    latencyChartLayout = view.findViewById(R.id.latency_chart_layout);
    logTextView.setMovementMethod(new ScrollingMovementMethod());
    view.findViewById(R.id.button_close_chart).setOnClickListener(this);
    sensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);
    accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
    if (accelerometer == null) {
        logger.log("ERROR! Accelerometer sensor not found");
    }
    return view;
}
项目:walt    文件:ScreenResponseFragment.java   
@Override
public void run() {
    waltDevice.stopListener();
    waltDevice.clearTriggerHandler();

    // TODO: Add option to save this data into a separate file rather than the main log.
    logger.log(brightnessCurveData.toString());
    logger.log("=== End of screen brightness data ===");

    blackBox.setText(logger.getLogText());
    blackBox.setMovementMethod(new ScrollingMovementMethod());
    blackBox.setBackgroundColor(color_gray);
    isTestRunning = false;
    startButton.setEnabled(true);
    setFullScreen(false);
    drawBrightnessChart();
    LogUploader.uploadIfAutoEnabled(getContext());
}
项目:walt    文件:TapLatencyFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    shouldShowLatencyChart = getBooleanPreference(getContext(), R.string.preference_show_tap_histogram, true);
    if (getBooleanPreference(getContext(), R.string.preference_systrace, true)) {
        traceLogger = TraceLogger.getInstance();
    }
    waltDevice = WaltDevice.getInstance(getContext());
    logger = SimpleLogger.getInstance(getContext());
    // Inflate the layout for this fragment
    final View view = inflater.inflate(R.layout.fragment_tap_latency, container, false);
    restartButton = (ImageButton) view.findViewById(R.id.button_restart_tap);
    finishButton = (ImageButton) view.findViewById(R.id.button_finish_tap);
    tapCatcherView = (TextView) view.findViewById(R.id.tap_catcher);
    logTextView = (TextView) view.findViewById(R.id.txt_log_tap_latency);
    tapCountsView = (TextView) view.findViewById(R.id.txt_tap_counts);
    moveCountsView = (TextView) view.findViewById(R.id.txt_move_count);
    latencyChart = (HistogramChart) view.findViewById(R.id.latency_chart);
    logTextView.setMovementMethod(new ScrollingMovementMethod());
    finishButton.setEnabled(false);
    return view;
}
项目:Tehreer-Android    文件:BidiInfoActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bidi_info);

    Intent intent = getIntent();
    mBidiText = String.valueOf(intent.getCharSequenceExtra(BIDI_TEXT));
    mDensity = getResources().getDisplayMetrics().scaledDensity;

    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    SpannableStringBuilder builder = new SpannableStringBuilder();
    writeBidiText(builder);

    TextView bidiTextView = (TextView) findViewById(R.id.text_view_bidi);
    bidiTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
    bidiTextView.setText(builder);
}
项目:JCL    文件:FragmentCompatibility.java   
@Override
public void onResume() {
    super.onResume();
    View v = getView();
    TextView tx = (TextView) v.findViewById(R.id.txList);
    JCL_ANDROID_Facade jcl = JCL_ANDROID_Facade.getInstance();
    if (!JCL_HostService.isWorking) {
        tx.setText("Your device doesn't support these sensors:\n\n"
                + incompatibleSensor[0] + "\n\n"
                + "Your device supports these sensors:\n\n"
                + incompatibleSensor[1]);
    } else
        tx.setText(jcl.getTerminal());


    tx.setMovementMethod(new ScrollingMovementMethod());
    Button b = (Button) v.findViewById(R.id.btnrun);
    if (!JCL_HostService.isWorking)
        b.setText("Run");
    else
        b.setText("Stop");

}
项目:nightmode    文件:AboutActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    try
    {
        // Set the context of the textview to the app VerionName
        TextView version = (TextView)findViewById(R.id.nameView);
        String app_ver = this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
        version.setText(getString(R.string.app_name) + " Version" + " " + app_ver);
    }
    catch (PackageManager.NameNotFoundException e)
    {
        // This should never happen
        Log.e("NightMode/AboutActivity", e.getMessage());
        finish();
    }
    TextView licenseDetails = (TextView)findViewById(R.id.licenceText);
    licenseDetails.setText(Html.fromHtml(getString(R.string.licence_info)));
    // Make the license scrollable
    licenseDetails.setMovementMethod(new ScrollingMovementMethod());
}
项目:DebugKit    文件:NotificationInfoActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_notification_info);

    TextView textView = (TextView)findViewById(R.id.textView);
    textView.setMovementMethod(new ScrollingMovementMethod());

    Intent intent = getIntent();
    if (ACTION.equals(intent.getAction())) {
        String[] stacktrace = intent.getStringArrayExtra("__stacktrace");
        for (String s : stacktrace) {
            textView.setText(textView.getText() + s + '\n');
        }
    }
}