Android ScrollingMovementMethod - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ScrollingMovementMethod class.

This code example shows how to use the following methods:setMovementMethod
            holder.pageImageView.setImageBitmap(bm);
            holder.pageImageView.setBackgroundDrawable(null);
            holder.progressBar.setVisibility(View.INVISIBLE);
            holder.descriptionView.setText(incidents.get(positionInArray).getDescription());
            holder.descriptionView.setVisibility(View.VISIBLE);
    		holder.descriptionView.setMovementMethod(new ScrollingMovementMethod());
        } 
 
    } 
 
    /** 
     * Scrolls the view very fast in the appropriate direction simulating a 
     * fling 
     */ 
    @Override 
    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
            float velocityY) {
        float velMax = 1800f;
        float velMin = 800f;
        float velX = Math.abs(velocityX);
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setMovementMethod
		return logView;
	} 
	public void setLogView(TextView logView) {
		this.logView = logView;
		 
		this.getLogView().setMovementMethod(new ScrollingMovementMethod());
	} 
	private void appendTextAndScroll(String text)
	{ 
	    if(logView != null){
	    	logView.append(text + "\n");
	        final Layout layout = logView.getLayout();
	        if(layout != null){
	            int scrollDelta = layout.getLineBottom(logView.getLineCount() - 1) 
	                - logView.getScrollY() - logView.getHeight();
	            if(scrollDelta > 0)
	            	logView.scrollBy(0, scrollDelta);
	        } 
	    } 
	} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
                               .penaltyLog()
                               .penaltyDeath()
                               .build());
 
        mTextView = new TextView(this);
        mTextView.setMovementMethod(new ScrollingMovementMethod());
        setContentView(mTextView);
 
        log("Starting test..."); 
        testKeyChainImproperUse(); 
 
        new SetupTestKeyStore().execute();
    } 
 
    private void testKeyChainImproperUse() { 
        try { 
            KeyChain.getPrivateKey(null, null);
            throw new AssertionError();
        } catch (InterruptedException e) {
            throw new AssertionError(e);
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	public void textBoxes() 
	{ 
		title.setScroller(new Scroller(this));
		title.setMaxLines(3);
		title.setVerticalScrollBarEnabled(true);
		title.setMovementMethod(new ScrollingMovementMethod());
	} 
	/** 
	 * This function gets the data from the database for the reminder to be displayed. The data includes the title, 
	 * the body of the reminder, the date and the photo of the reminder. 
	 */ 
	public void setContentsOfReminder() 
	{ 
		System.out.println("reading the function");
		Bundle extras = getIntent().getExtras();
		//FileInputStream file = new FileInputStream(); 
		//File fileName = new File(context.getExternalFilesDir(null), "reminderDatabase"); 
		try { 
			System.out.println("the file name is " + extras.getString("reminderName"));
			ObjectInputStream file = new ObjectInputStream(new BufferedInputStream (new FileInputStream("/sdcard/reminderdata/" + extras.getString("reminderName"))));
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	    } 
 
	    protected void onPostExecute(String result) {
	    	setProgressBarIndeterminateVisibility(false);
	    	dialog.hide();
        	txtOutput.setMovementMethod(new ScrollingMovementMethod());
        	txtOutput.setText("");
        	txtOutput.append(result);
        	scrollView.post(new Runnable()
            { 
                public void run() 
                { 
                    scrollView.fullScroll(View.FOCUS_DOWN);
                } 
            }); 
	    } 
	} 
	 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	 
	public LoggerView(Context context, AttributeSet attrs) {
		super(context, attrs);
		mLogs.put(getId(), this);
		super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/r2014.ttf"));
		setMovementMethod(new ScrollingMovementMethod());
	} 
	 
	synchronized 
	public static void error(String module, String msg, int idLog) {
		LoggerView log = mLogs.get(idLog);
		if(log != null) {
			clean(log);
			log.append(Html.fromHtml("<font color='red'>-|" + module + ": " + msg + "</font><br/>"));
			focus(log);
		} 
	} 
	 
	synchronized 
	public static void info(String module, String msg, int idLog) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	private void init() 
	{ 
		// When text is changed check for data length 
		addTextChangedListener(this);
		// If the content is too long: scroll 
		setMovementMethod(new ScrollingMovementMethod());
		// Make the text appear at the bottom 
		setGravity(Gravity.BOTTOM);
	} 
 
	public void afterTextChanged(Editable s)
	{ 
		// Limit lines 
		data = getText().toString();
		if(data.split("\n").length > maxLines)
		{ 
			data = data.substring(data.indexOf("\n") + 1);
			// Replace all text with the same text minus the first line 
			s.replace(0, length(), data);
		} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		else { 
			log_msg_btn.setText("Close Messages");
			showingMessages = true;
			 
				 
			log_messages.setMovementMethod(new ScrollingMovementMethod());
			 
			log_messages.append((CharSequence)(SensorService.getMsg())+"\n");
			 
		} 
		  
	} 
	 
	public void clear_msg_btn_click(View v){
		if (!savingData) {
			clear_msg_btn.setText("Stop appending data");
			SensorService.startTesting(); 
			savingData = true;
			 
		} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		_textView = new HububEditText(); 
		_textView.setSelectAllOnFocus (false); 
		_textView.setScrollContainer(true); 
		_textView.setVerticalScrollBarEnabled(true); 
		_textView.setMaxLines(5); 
		_textView.setMovementMethod(new ScrollingMovementMethod()); 
		//_textView.setVisibleLines(20); 
		addVertWidget(_label); 
		addVertWidget(_textView); 
		_textView.setTextSize(12); 
	} 
 
	public void setName(String name){ 
		_label.setText(name); 
	} 
 
	public void setSize(int width, int height){ 
		_textView.setWidth(width); 
		_label.measure(Hubub._DisplayMetrics.widthPixels, Hubub._DisplayMetrics.heightPixels); 
		_textView.setHeight(height - _label.getMeasuredHeight()); 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		TextView license = new TextView(this);
		 
		layout.addView(license, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f));
		 
		license.setText(readTextFile());
		license.setMovementMethod(new ScrollingMovementMethod());
		 
		setContentView(layout);
	} 
 
	private String readTextFile(){
		InputStream inputStream = getResources().openRawResource(R.raw.license);
 
		ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
 
		int i;
		try { 
			i = inputStream.read();
			while (i != -1)
			{ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android ScrollingMovementMethod Questions & Answers:

See Code Examples for Android ScrollingMovementMethod Methods: