android.widget.ScrollView.findViewById()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中android.widget.ScrollView.findViewById()方法的一些代码示例,展示了ScrollView.findViewById()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.findViewById()方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:findViewById

ScrollView.findViewById介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public View onCreateView(LayoutInflater inflater,
             ViewGroup container,
             Bundle savedInstanceState) {
 scroll=
   (ScrollView)inflater.inflate(R.layout.activity_main, container,
                  false);
 transcript=scroll.findViewById(R.id.transcript);
 return(scroll);
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public View onCreateView(LayoutInflater inflater,
             ViewGroup container,
             Bundle savedInstanceState) {
 scroll=
   (ScrollView)inflater.inflate(R.layout.activity_main, container,
                  false);
 transcript=(TextView)scroll.findViewById(R.id.transcript);
 logToTranscript("Started");
 return(scroll);
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public View onCreateView(LayoutInflater inflater,
             ViewGroup container,
             Bundle savedInstanceState) {
 scroll=
   (ScrollView)inflater.inflate(R.layout.activity_main, container,
                  false);
 transcript=(TextView)scroll.findViewById(R.id.transcript);
 logToTranscript("Started");
 return(scroll);
}

代码示例来源:origin: JasonQS/Anti-recall

private void initSettings(ScrollView view) {
  // 设置
  ((MySwitchCompat) view.findViewById(R.id.switch_show_all_qq_messages))
      .setAttr(App.class, "isShowAllQQMessages")
      .setOnCheckedChangeListener((compoundButton, b) -> App.layoutHeight = -1);
  ((MySwitchCompat) view.findViewById(R.id.switch_we_chat_auto_login))
      .setAttr(App.class, "isWeChatAutoLogin");
  ((MySwitchCompat) view.findViewById(R.id.switch_swipe_remove_on))
      .setAttr(App.class, "isSwipeRemoveOn");
  ((MySwitchCompat) view.findViewById(R.id.switch_check_update_only_on_wifi))
      .setAttr(App.class, "isCheckUpdateOnlyOnWiFi");
}

代码示例来源:origin: tianshaojie/AndroidFine

scrollView.getPullRootView().findViewById(R.id.textBalance).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
scrollView.getPullRootView().findViewById(R.id.textRecord).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
scrollView.getPullRootView().findViewById(R.id.textAttention).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
scrollView.getPullRootView().findViewById(R.id.textHelp).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
scrollView.getPullRootView().findViewById(R.id.textCalculator).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
scrollView.getPullRootView().findViewById(R.id.textSetting).setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {

代码示例来源:origin: JasonQS/Anti-recall

private void initLogViewer(ScrollView view) {
  view.findViewById(R.id.copyright).setOnClickListener(v -> {
    long clickTime = new Date().getTime();
    if (clickTime - this.clickTime > 1000)

代码示例来源:origin: JasonQS/Anti-recall

private void initAbout(ScrollView view) {
  View btnCheckUpdate = view.findViewById(R.id.btn_check_update);
  TextView tvLocalVersion = view.findViewById(R.id.tv_local_version);
  TextView tvRemoteVersion = view.findViewById(R.id.tv_remote_version);
  btnCheckUpdate.setOnClickListener((v) -> {
    UpdateHelper helper = new UpdateHelper(getActivity());

代码示例来源:origin: palaima/DebugDrawer

debugView = sliderLayout.findViewById(R.id.dd_debug_view);

代码示例来源:origin: JasonQS/Anti-recall

private void initPermissionCheck(ScrollView view) {
  View btnAccessibilityService = view.findViewById(R.id.btn_navigate_accessibility_service);
  View btnNotificationListener = view.findViewById(R.id.btn_navigate_notification_listener);
  View btnOverlays = view.findViewById(R.id.btn_navigate_overlays);
  CircularProgressButton btnCheckPermission = view.findViewById(R.id.btn_check_permission);
  btnCheckPermission.setOnClickListener(v -> {
    btnCheckPermission.performAccessibilityAction(AccessibilityEvent.TYPE_VIEW_CLICKED, null);
    btnCheckPermission.startAnimation();
    ViewGroup llPermission = view.findViewById(R.id.ll_permission);
    llPermission.removeAllViews();
    llPermission.addView((View) btnCheckPermission.getParent());

代码示例来源:origin: stackoverflow.com

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

ScrollView container = getLayoutInflater().inflate(R.layout.main_layout, null));
setContentView(drawView);
drawView = container.findViewById(R.id.my_draw_view);
drawView.setBackgroundColor(Color.WHITE);  
}

代码示例来源:origin: stackoverflow.com

ScrollView DTPicker = (ScrollView) View.inflate(TimeDate.this,R.layout.time_date, null);
Button  btnSet = (Button) DTPicker.findViewById(R.id.btnSetDateTime);
final   DatePicker dp = (DatePicker) DTPicker.findViewById(R.id.datePicker);
final   TimePicker tp = (TimePicker) DTPicker.findViewById(R.id.timePicker);

代码示例来源:origin: stackoverflow.com

ScrollView layout = (ScrollView) ScrollView.inflate(this, R.layout.campaign_info_layout, null);
TextView textView = (TextView) layout.findViewById(R.id.textView);

代码示例来源:origin: stackoverflow.com

ScrollView sv = (ScrollView) view.findViewById(R.id.svText);
 links = (TextView) sv.findViewById(R.id.tvHelpText4);

代码示例来源:origin: huangweicai/OkLibDemo

private void initFloatView() {
    //显示悬浮窗口
    floatViewLayout = (ScrollView) LayoutInflater.from(context.getApplicationContext()).inflate(R.layout.float_layout, null);
    tv_log = (TextView) floatViewLayout.findViewById(R.id.tv_log);
//        lv_loglist = (ListView) floatViewLayout.findViewById(R.id.lv_loglist);
//        lv_loglist.setAdapter(lvLoglistAdapter = new LvLoglistAdapter());
  }

代码示例来源:origin: stackoverflow.com

final ScrollView ll = (ScrollView) getLayoutInflater().inflate(
       R.layout.dropdown_list, null);
   final LinearLayout container = ((LinearLayout) ll
       .findViewById(R.id.dropdown_list_container));
   if (myObjectsCount > 0) {
     for (final MyObject ci : myObjects()) {
       LinearLayout item = ((LinearLayout) getLayoutInflater()
           .inflate(R.layout.list_item, null));
       TextView tv = ((TextView) item
           .findViewById(R.id.list_item_text));
       tv.setText("your text here");
       container.addView(item);
     }
   }

代码示例来源:origin: andforce/iBeebo

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  final ScrollView view = (ScrollView) inflater.inflate(R.layout.main_timeline_left_drawer_layout, container, false);
  mCoverBlureImage = ViewUtility.findViewById(view, R.id.coverBlureImage);
  displayCover();
  layout = new LeftDrawerViewHolder();
  layout.avatar = (ImageView) view.findViewById(R.id.avatar);
  layout.nickname = (TextView) view.findViewById(R.id.nickname);
  layout.home = (LinearLayout) view.findViewById(R.id.btn_home);
  // layot.location = (Button) view.findViewById(R.id.btn_location);
  layout.fav = (Button) view.findViewById(R.id.btn_favourite);
  layout.homeCount = (TextView) view.findViewById(R.id.tv_home_count);
  layout.leftDrawerSettingBtn = (Button) view.findViewById(R.id.leftDrawerSettingBtn);
  layout.homeButton = (Button) view.findViewById(R.id.homeButton);
  layout.mHotWeibo = ViewUtility.findViewById(view, R.id.btnHotWeibo);
  layout.mHotHuaTi = ViewUtility.findViewById(view, R.id.btnHotHuaTi);
  layout.mHotModel = ViewUtility.findViewById(view, R.id.btnHotModel);
  return view;
}

代码示例来源:origin: googlecodelabs/android-topeka

@Override
protected View createQuizContentView() {
  ScrollView layout = (ScrollView) getLayoutInflater().inflate(
      R.layout.quiz_layout_picker, this, false);
  mCurrentSelection = (TextView) layout.findViewById(R.id.seekbar_progress);
  mCurrentSelection.setText(getAlphabet().get(0));
  mSeekBar = (SeekBar) layout.findViewById(R.id.seekbar);
  mSeekBar.setMax(getAlphabet().size() - 1);
  mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
      mCurrentSelection.setText(getAlphabet().get(progress));
      allowAnswer();
    }
    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {
      /* no-op */
    }
    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {
      /* no-op */
    }
  });
  return layout;
}

代码示例来源:origin: stackoverflow.com

ScrollView scrollView = (ScrollView)getLayoutInflater().inflat(R.layout.filename)
   RelativeLayout layout = (RelativeLayout) scrollView.findViewById(R.id.rel_all_football);
   Button button;
   for(int i=0; i<3; i++){
     button = new Button(this);
     button.setLayoutParams( new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
     button.setText("Hello " + i);
     layout.addView(button);
   }
 setContentView(scrollView);

代码示例来源:origin: stackoverflow.com

ScrollView DTPicker = (ScrollView) View.inflate(context,
          R.layout.date_time_picker, null);

    Button  btnSet = (Button) DTPicker.findViewById(R.id.btnSetDateTime);
      DatePicker dp = (DatePicker) DTPicker.findViewById(R.id.datePicker);
       TimePicker tp = (TimePicker) DTPicker.findViewById(R.id.timePicker);

      btnSet.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
          String strDateTime = dp.getYear() + "-"
              + (dp.getMonth() + 1) + "-"
              + dp.getDayOfMonth() + " "
              + tp.getCurrentHour() + ":"
              + tp.getCurrentMinute();
}});

alert = new AlertDialog.Builder(context).create();
      alert.setTitle("Reminder");
      alert.setView(DTPicker);
      alert.show();

代码示例来源:origin: Hankkin/TaoSchool

private void initViews() {
  tvBack = (TextView) findViewById(R.id.tv_back);
  scrollView = (PullToZoomScrollViewEx) findViewById(R.id.my_pull_scoll);
  loadViewForCode();
  scrollView.getPullRootView().findViewById(R.id.tv_test1).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    }
  });
  DisplayMetrics localDisplayMetrics = new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
  int mScreenHeight = localDisplayMetrics.heightPixels;
  int mScreenWidth = localDisplayMetrics.widthPixels;
  LinearLayout.LayoutParams localObject = new LinearLayout.LayoutParams(mScreenWidth, (int) (9.0F * (mScreenWidth / 16.0F)));
  scrollView.setHeaderLayoutParams(localObject);
  tvBack.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      finish();
    }
  });
}

相关文章

ScrollView类方法