当前位置: 首页>>代码示例>>Java>>正文


Java ScrollingMovementMethod类代码示例

本文整理汇总了Java中android.text.method.ScrollingMovementMethod的典型用法代码示例。如果您正苦于以下问题:Java ScrollingMovementMethod类的具体用法?Java ScrollingMovementMethod怎么用?Java ScrollingMovementMethod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScrollingMovementMethod类属于android.text.method包,在下文中一共展示了ScrollingMovementMethod类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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();
}
 
开发者ID:linzuzeng,项目名称:Microsphere,代码行数:21,代码来源:MainActivity.java

示例2: onCreate

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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());

}
 
开发者ID:jleon95,项目名称:LearnHangul,代码行数:17,代码来源:AboutHangulActivity.java

示例3: onCreateView

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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;
}
 
开发者ID:Augugrumi,项目名称:SpaceRace,代码行数:27,代码来源:HintFragment.java

示例4: onCreateView

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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;
}
 
开发者ID:Augugrumi,项目名称:SpaceRace,代码行数:17,代码来源:FirstHintFragment.java

示例5: initView

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
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());
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:18,代码来源:OAuth2Activity.java

示例6: calculateLetterFrequency

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
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());
}
 
开发者ID:FYP17-4G,项目名称:Aardvark,代码行数:18,代码来源:GUI_fragment_graph.java

示例7: doOnViewCreated

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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();
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:11,代码来源:TextToSpeechFragment.java

示例8: onCreateView

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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;
}
 
开发者ID:brandall76,项目名称:API-Example-App,代码行数:24,代码来源:FragmentDemoBasic.java

示例9: onCreateView

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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;
}
 
开发者ID:brandall76,项目名称:API-Example-App,代码行数:19,代码来源:FragmentDemoCommand.java

示例10: onCreate

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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();
}
 
开发者ID:swedbank,项目名称:android-banklink,代码行数:19,代码来源:MainActivity.java

示例11: onCreate

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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());
}
 
开发者ID:lakeel-altla,项目名称:samples-cognitive-services-android,代码行数:18,代码来源:MainActivity.java

示例12: initVariables

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
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);
}
 
开发者ID:wkmeijer,项目名称:CS4160-trustchain-android,代码行数:18,代码来源:TrustChainActivity.java

示例13: onCreate

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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());
}
 
开发者ID:thelinuxgeekcommunity,项目名称:nightmode,代码行数:23,代码来源:AboutActivity.java

示例14: onViewCreated

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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);
}
 
开发者ID:Fakher-Hakim,项目名称:Rx-Android-Samples,代码行数:25,代码来源:DoOperatorFragment.java

示例15: onViewCreated

import android.text.method.ScrollingMovementMethod; //导入依赖的package包/类
@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);
}
 
开发者ID:Fakher-Hakim,项目名称:Rx-Android-Samples,代码行数:27,代码来源:SkipOperatorFragment.java


注:本文中的android.text.method.ScrollingMovementMethod类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。