java类android.text.method.ScrollingMovementMethod的实例源码

MainActivity.java 文件源码 项目:Microsphere 阅读 13 收藏 0 点赞 0 评论 0
@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();
}
AboutHangulActivity.java 文件源码 项目:LearnHangul 阅读 20 收藏 0 点赞 0 评论 0
@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());

}
HintFragment.java 文件源码 项目:SpaceRace 阅读 18 收藏 0 点赞 0 评论 0
@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;
}
FirstHintFragment.java 文件源码 项目:SpaceRace 阅读 97 收藏 0 点赞 0 评论 0
@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;
}
OAuth2Activity.java 文件源码 项目:letv 阅读 17 收藏 0 点赞 0 评论 0
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());
}
GUI_fragment_graph.java 文件源码 项目:Aardvark 阅读 16 收藏 0 点赞 0 评论 0
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());
}
TextToSpeechFragment.java 文件源码 项目:CustomAndroidOneSheeld 阅读 29 收藏 0 点赞 0 评论 0
@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();
}
FragmentDemoBasic.java 文件源码 项目:API-Example-App 阅读 21 收藏 0 点赞 0 评论 0
@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;
}
FragmentDemoCommand.java 文件源码 项目:API-Example-App 阅读 20 收藏 0 点赞 0 评论 0
@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;
}
MainActivity.java 文件源码 项目:android-banklink 阅读 15 收藏 0 点赞 0 评论 0
@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();
}
MainActivity.java 文件源码 项目:samples-cognitive-services-android 阅读 16 收藏 0 点赞 0 评论 0
@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());
}
TrustChainActivity.java 文件源码 项目:CS4160-trustchain-android 阅读 20 收藏 0 点赞 0 评论 0
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);
}
AboutActivity.java 文件源码 项目:nightmode 阅读 25 收藏 0 点赞 0 评论 0
@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());
}
DoOperatorFragment.java 文件源码 项目:Rx-Android-Samples 阅读 18 收藏 0 点赞 0 评论 0
@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);
}
SkipOperatorFragment.java 文件源码 项目:Rx-Android-Samples 阅读 17 收藏 0 点赞 0 评论 0
@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);
}
PhoneActivity.java 文件源码 项目:MobiRNN-EMDL17 阅读 22 收藏 0 点赞 0 评论 0
@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();

}
LocalPlayerActivity.java 文件源码 项目:EsperantoRadio 阅读 24 收藏 0 点赞 0 评论 0
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();
        }
    });
}
MainActivity.java 文件源码 项目:IDCardNum 阅读 15 收藏 0 点赞 0 评论 0
@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("");
    }
MainActivity.java 文件源码 项目:drawee-text-view 阅读 15 收藏 0 点赞 0 评论 0
@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("");
            }
        }
    });
}
MainActivity.java 文件源码 项目:Markets 阅读 21 收藏 0 点赞 0 评论 0
@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);
}
LocalPlayerActivity.java 文件源码 项目:CastVideos-android 阅读 24 收藏 0 点赞 0 评论 0
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();
        }
    });
}
JxhActivity.java 文件源码 项目:FangYanShuo 阅读 36 收藏 0 点赞 0 评论 0
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"));

}
QuestionFragment.java 文件源码 项目:StudyBox_Android 阅读 38 收藏 0 点赞 0 评论 0
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;
        }
    });
}
FloatView.java 文件源码 项目:LLApp 阅读 25 收藏 0 点赞 0 评论 0
/**
         * 设置值
         */
        @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);
//                }
//            });
        }
FrgBaseDoWorkout.java 文件源码 项目:Udacity-Capstone-Project 阅读 17 收藏 0 点赞 0 评论 0
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())));
        }

    }
}
MainActivity.java 文件源码 项目:settingscompat 阅读 15 收藏 0 点赞 0 评论 0
@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();
    }
}
ViewActivity.java 文件源码 项目:AndroidTcpdumpGui 阅读 28 收藏 0 点赞 0 评论 0
@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();
    }
}
UrlReportActivity.java 文件源码 项目:easyapi-apm-demo 阅读 16 收藏 0 点赞 0 评论 0
/**
 * 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());
}
SqliteTestActivity.java 文件源码 项目:easyapi-apm-demo 阅读 15 收藏 0 点赞 0 评论 0
/**
 * 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();
}
LocalPlayerActivity.java 文件源码 项目:cast-videos-android 阅读 26 收藏 0 点赞 0 评论 0
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();
        }
    });
}


问题


面经


文章

微信
公众号

扫码关注公众号