Android Open Source - FindYourWords One Word






From Project

Back to project page FindYourWords.

License

The source code is released under:

Apache License

If you think the Android project FindYourWords listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Class OneWord is a TextView that rappresent a word in the list of search word
 * into the main activity./*  ww w.  jav a 2 s  .co  m*/
 * 
 * @author Sara Craba
 * @version 1.0
 */

package word;

import android.app.ActionBar.LayoutParams;
import android.content.Context;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.widget.TextView;

public class OneWord extends TextView 
{
  private static final int TEXT_COLOR= Color.BLUE;
  
  private Typeface type;
  
  private LayoutParams lparams;
  
  /**
   * Constuctor
   * 
   * @param context  @see TextView class on Android
   * @param newWord  string that rappresent the word
   */
  public OneWord(Context context, String wordString) 
  {
    super(context);
    
    //set layout params
    lparams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        this.setLayoutParams(lparams);
        
      //font implementation
    type=Typeface.createFromAsset(context.getAssets(),"note.ttf");
    this.setTextColor(TEXT_COLOR);
    this.setTypeface(type,0);
    
    this.setText(wordString);
  }
  
  /**
   * Paint word with strike line
   */
  public void strikeWordFunction()
  {
    this.setPaintFlags(this.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
  }
  
  /**
   * Remove strike line on the word 
   */
  public void unstrikeWordFunction()
  {
    this.setPaintFlags(this.getPaintFlags()& (~ Paint.STRIKE_THRU_TEXT_FLAG));
  }
}




Java Source Code List

com.ipaulpro.afilechooser.FileChooserActivity.java
com.ipaulpro.afilechooser.FileListAdapter.java
com.ipaulpro.afilechooser.FileListFragment.java
com.ipaulpro.afilechooser.FileLoader.java
com.ipaulpro.afilechooser.utils.FileUtils.java
com.ipaulpro.afilechooser.utils.MimeTypeParser.java
com.ipaulpro.afilechooser.utils.MimeTypes.java
dialog.DialogCredits.java
dialog.DialogInfoMain.java
dialog.DialogInfo.java
dialog.DialogSaveFile.java
grid.CaptureWord.java
grid.Cell.java
grid.GridManager.java
grid.LetterView.java
grid.LineDrawView.java
grid.Positions.java
grid.RelativeLayoutView.java
mainClasses.MainActivity.java
mainClasses.SetWords.java
win.DialogWinThread.java
win.DialogWin.java
win.WinView.java
word.CompareStringList.java
word.OneWord.java