Hi I am facing problem with the following scenarios
1) I have a common header with icons for all the screens..in one of the screen I have a list view ..when I click on the list it fires an intent ,it is a login screen and when i enter the password an icon should appear on the header…what i did is initially i made the icon invisible in layout and below is my login code..
ImageView imgView = (ImageView)findViewById(R.id.image1);
btnLogin.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
String password = etPassword.getText().toString();
if(password.equals("1234")){
lblResult.setText("password successful.");
imgView.setVisibility(View.VISIBLE);
} else {
lblResult.setText("wrong password");}
finish();}
but its not working..where I am wrong..
2) I have 4 images on header..and i set visibility on and off on middle icon ..when icon is invisible i want the remaining icons side by side ..but now i am getting a blank space between the icons how can i remove that space.
Any suggestions is appreciated.
View.GONE This view is invisible, and it doesn’t take any space for layout purposes.
View.INVISIBLE This view is invisible, but it still takes up space for layout purposes.