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


Java FloatLabel类代码示例

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


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

示例1: onCreate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(org.benetech.secureapp.R.layout.create_account);

    passphraseEditField = (FloatLabel) findViewById(org.benetech.secureapp.R.id.passphrase_edit_field);
    passphraseConfirmationEditField = (FloatLabel) findViewById(org.benetech.secureapp.R.id.passphrase_confirm_edit_field);
    createAccountButton = (Button) findViewById(org.benetech.secureapp.R.id.create_account_button);
    createAccountButton.setEnabled(false);

    Util.setupFloatingLabelEditTextForPassword(passphraseEditField.getEditText());
    Util.setupFloatingLabelEditTextForPassword(passphraseConfirmationEditField.getEditText());

    passphraseConfirmationEditField.getEditText().addTextChangedListener(this);
    passphraseEditField.getEditText().addTextChangedListener(this);

    safelyClearOdkDbFilesFromPreviousAccount();
}
 
开发者ID:benetech,项目名称:Secure-App-Generator,代码行数:20,代码来源:CreatePassphraseActivity.java

示例2: onResume

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
protected void onResume() {
    super.onResume();

    setContentView(R.layout.activity_login);

    emailEdit = ((FloatLabel)findViewById(R.id.emailText)).getEditText();
    emailEdit.setTextColor(getResources().getColor(R.color.smart_watch_2_text_color_white));
    passwordEdit =  ((FloatLabel)findViewById(R.id.passwordText)).getEditText();
    passwordEdit.setTextColor(getResources().getColor(R.color.smart_watch_2_text_color_white));
    loginButton = findViewById(R.id.button2);


    setTitle("Please login");

    ((MyApplication)getApplication()).reportScreenView("Login view");
}
 
开发者ID:hecosire,项目名称:hecosire-androidapp,代码行数:18,代码来源:LoginActivity.java

示例3: onCreate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	
	message = this.getIntent().getExtras().getParcelable("message");

	setContentView(R.layout.activity_edit_message);

	getActionBar().setDisplayHomeAsUpEnabled(true);
	getActionBar().setTitle("Edition");
	
	floatLabelContent = (FloatLabel)findViewById(R.id.activity_edit_message_float_label_content);
	floatLabelContent.setText(message.getContent());
	
	buttonValidate = (Button)findViewById(R.id.activity_edit_message_button_validate);
	buttonValidate.setOnClickListener(new OnClickListener() {
		@Override
		public void onClick(View arg0) {
			checkInput(arg0);
		}
	});
}
 
开发者ID:asso-labeli,项目名称:labeli-android-app,代码行数:23,代码来源:EditMessageActivity.java

示例4: onCreate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	setContentView(R.layout.activity_add_member);
	
	// Remove any focus
	View current = getCurrentFocus();
	if (current != null) current.clearFocus();

	getActionBar().setDisplayHomeAsUpEnabled(true);
	getActionBar().setTitle("Nouveau membre");
	
	floatLabelLastName = (FloatLabel)findViewById(R.id.activity_add_member_float_label_last_name);
	floatLabelFirstName = (FloatLabel)findViewById(R.id.activity_add_member_float_label_first_name);
	floatLabelEmail = (FloatLabel)findViewById(R.id.activity_add_member_float_label_email);
	
	buttonValidate = (Button)findViewById(R.id.activity_add_member_button_validate);
	buttonValidate.setOnClickListener(new OnClickListener() {
		
		@Override
		public void onClick(View arg0) {
			checkInput(arg0);
		}
	});
}
 
开发者ID:asso-labeli,项目名称:labeli-android-app,代码行数:27,代码来源:AddMemberActivity.java

示例5: calculate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
public void calculate() {
    final FloatLabel kilometersEditText = (FloatLabel) container.findViewById(R.id.editKilometers);
    final FloatLabel idleMinsEditText = (FloatLabel) container.findViewById(R.id.editIdleMinutes);
    final FloatLabel actualFareEditText = (FloatLabel) container.findViewById(R.id.editActualFare);
    final TextView calculatedFareTextView = (TextView) container.findViewById(R.id.editCalculatedFare);
    final TextView reportTaxi = (TextView) container.findViewById(R.id.conTaxi);

    switchComponentsState(true);

    double kilometers = Double.parseDouble(String.valueOf(kilometersEditText.getEditText().getText()));
    double idleMinutes = Double.parseDouble(String.valueOf(idleMinsEditText.getEditText().getText()));
    Double taxiFare = FareCalculator.calculateTaxiFare(kilometers, idleMinutes);

    calculatedFareTextView.setText(Math.round(taxiFare) + "");
    YoYo.with(Techniques.ZoomInUp).duration(1000).playOn(calculatedFareTextView);

    if (!String.valueOf(actualFareEditText.getEditText().getText()).equals("")
            && (Double.parseDouble(String.valueOf(actualFareEditText.getEditText().getText())) >= (taxiFare + 3))) {
        reportTaxi.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:mSobhy90,项目名称:TaxiFareCalculator,代码行数:22,代码来源:CalculationFragment.java

示例6: onCreate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.login_secure_app);

    FloatLabel floatingLabelEditText = ((FloatLabel) findViewById(R.id.passphrase_edit_field));
    passPhraseEditField = floatingLabelEditText.getEditText();
    Util.setupFloatingLabelEditTextForPassword(floatingLabelEditText.getEditText());

}
 
开发者ID:benetech,项目名称:Secure-App-Generator,代码行数:12,代码来源:LoginActivity.java

示例7: onCreateView

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_main, container, false);
    textSurname = (FloatLabel) view.findViewById(R.id.text_contact_surname);
    textName = (FloatLabel) view.findViewById(R.id.text_contact_name);
    textPhone = (FloatLabel) view.findViewById(R.id.text_contact_phone);
    textEmail = (FloatLabel) view.findViewById(R.id.text_contact_email);
    textAddress = (FloatLabel) view.findViewById(R.id.text_contact_address);
    textWebsite = (FloatLabel) view.findViewById(R.id.text_contact_website);

    prefs = new PreferencesSaver(getActivity());
    return view;
}
 
开发者ID:tajchert,项目名称:WearBusinessCard,代码行数:15,代码来源:MainFragment.java

示例8: initViews

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
/**
     * Initialize views.
     */
    private void initViews() {
        ImageView img_artwork = (ImageView) findViewById(R.id.img_artwork);
        txt_filename = (TextView) findViewById(R.id.txt_filename);
        EditText txtTitle = ((FloatLabel) findViewById(R.id.txt_title)).getEditText();
        EditText txtArtist = ((FloatLabel) findViewById(R.id.txt_artist)).getEditText();
        EditText txtAlbum = ((FloatLabel) findViewById(R.id.txt_album)).getEditText();
        EditText txtYear = ((FloatLabel) findViewById(R.id.txt_year)).getEditText();
        EditText txtDisc = ((FloatLabel) findViewById(R.id.txt_disc)).getEditText();
        EditText txtTrack = ((FloatLabel) findViewById(R.id.txt_track)).getEditText();
//        EditText txtAlbumArtist = ((FloatLabel) findViewById(R.id.txt_album_artist)).getEditText();
//        EditText txtComposer = ((FloatLabel) findViewById(R.id.txt_composer)).getEditText();
//        EditText txtGrouping = ((FloatLabel) findViewById(R.id.txt_grouping)).getEditText();
        EditText txtGenre = ((FloatLabel) findViewById(R.id.txt_genre)).getEditText();

        views.put(SupportedTag.TITLE, txtTitle);
        views.put(SupportedTag.ARTIST, txtArtist);
        views.put(SupportedTag.ALBUM, txtAlbum);
        views.put(SupportedTag.YEAR, txtYear);
        views.put(SupportedTag.DISC_NO, txtDisc);
        views.put(SupportedTag.TRACK, txtTrack);
//        views.put(SupportedTag.ALBUM_ARTIST, txtAlbumArtist);
//        views.put(SupportedTag.COMPOSER, txtComposer);
//        views.put(SupportedTag.GROUPING, txtGrouping);
        views.put(SupportedTag.GENRE, txtGenre);

        //TODO: Workaround
        CardView cardArtwork = (CardView) findViewById(R.id.card_artwork);
        cardArtwork.setVisibility(View.GONE);
    }
 
开发者ID:pierre-binauld,项目名称:music-tag,代码行数:33,代码来源:TagFormActivity.java

示例9: onCreate

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState != null) {
        mTheme = savedInstanceState.getInt(BUNDLE_KEY_THEME, mTheme);
    }
    setTheme(mTheme);
    setContentView(R.layout.activity_main);

    // This is how you add a custom animator
    final FloatLabel floatLabel = (FloatLabel) findViewById(R.id.float_label_custom_animation_1);
    floatLabel.setLabelAnimator(new CustomLabelAnimator());
}
 
开发者ID:IanGClifton,项目名称:AndroidFloatLabel,代码行数:14,代码来源:MainActivity.java

示例10: onCreateView

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
    this.container = container;
    buttonAnimation = AnimationUtils.loadAnimation(container.getContext(), R.anim.buttonanimation);

    View rootView = inflater.inflate(R.layout.fragment_calculator, container, false);
    // int i = getArguments().getInt(SELECTED_ITEM);

    final FloatingActionButton calculateButton = (FloatingActionButton) rootView.findViewById(R.id.calculateFab);
    final FloatLabel kilometersEditText = (FloatLabel) rootView.findViewById(R.id.editKilometers);
    final FloatLabel idleMinsEditText = (FloatLabel) rootView.findViewById(R.id.editIdleMinutes);

    calculateButton.setEnabled(false);

    kilometersEditText.getEditText().addTextChangedListener(this);
    idleMinsEditText.getEditText().addTextChangedListener(this);

    calculateButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            final TextView reportTaxi = (TextView) container.findViewById(R.id.conTaxi);
            reportTaxi.setVisibility(View.INVISIBLE);
            switchComponentsState(false);
            calculate();
            hideKeyboard(container);
            v.startAnimation(buttonAnimation);
        }
    });

    return rootView;
}
 
开发者ID:mSobhy90,项目名称:TaxiFareCalculator,代码行数:32,代码来源:CalculationFragment.java

示例11: switchComponentsState

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
private void switchComponentsState(boolean isEnabled) {
    final FloatLabel kilometersEditText = (FloatLabel) container.findViewById(R.id.editKilometers);
    final FloatLabel idleMinsEditText = (FloatLabel) container.findViewById(R.id.editIdleMinutes);
    final FloatLabel actualFareEditText = (FloatLabel) container.findViewById(R.id.editActualFare);
    final FloatingActionButton calculateButton = (FloatingActionButton) container.findViewById(R.id.calculateFab);

    calculateButton.setEnabled(isEnabled);
    kilometersEditText.setEnabled(isEnabled);
    idleMinsEditText.setEnabled(isEnabled);
    actualFareEditText.setEnabled(isEnabled);
}
 
开发者ID:mSobhy90,项目名称:TaxiFareCalculator,代码行数:12,代码来源:CalculationFragment.java

示例12: afterTextChanged

import com.iangclifton.android.floatlabel.FloatLabel; //导入依赖的package包/类
@Override
public void afterTextChanged(Editable floatLabel) {
    final FloatingActionButton calculateButton = (FloatingActionButton) container.findViewById(R.id.calculateFab);
    final FloatLabel kilometersEditText = (FloatLabel) container.findViewById(R.id.editKilometers);
    final FloatLabel idleMinsEditText = (FloatLabel) container.findViewById(R.id.editIdleMinutes);
    if (kilometersEditText.getEditText().getText().toString().equals("")
            || idleMinsEditText.getEditText().getText().toString().equals("")) {
        calculateButton.setEnabled(false);
    } else {
        calculateButton.setEnabled(true);
    }
}
 
开发者ID:mSobhy90,项目名称:TaxiFareCalculator,代码行数:13,代码来源:CalculationFragment.java


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