Let me clarify the question.I have 4 Image Buttons,I want to change the icon of the pressed one and then if i press another Button so the next one should be changed and the last one should back to its previous icon.
Note : The example is Instagram . You see some Gray icons when you click each one, it turns to black . And when you click another one the last one turns to gray and the new one turns to black.
You can use the below code for creating a xml file in drawable folder, and use that as an image drawable:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/button_pressed_yellow"
android:state_pressed="true" />
<item android:drawable="#drawable/button_focused_orange"
android:state_focused="true" />
<item android:drawable="#drawable/button_normal_green" />
<item android:drawable="#drawable/selected_icon" android:state_selected="true"/>
</selector>
and use different image, depending on the press state.
Java Code:
public void onAnyButtonCLick(View view)
{
for (int i = 0; i < parent_layout.getChildCount(); i++) {
View v = parent_layout.getChildAt(i);
// Check v is button
if(v instanceof Button)
{
// set all button with grey color background
v.setBackgroundColor(getResources().getColor(R.color.color_gray));
}
} // loop ends
// color the current click button with black.
view.setBackgroundColor(getResources().getColor(R.color.color_black));
} // end of click
XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/parent_layout"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First Button"
android:onClick="button_click"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second Button"
android:onClick="button_click"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Third Button"
android:onClick="button_click"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Forth Button"
android:onClick="button_click"/>
</LinearLayout>
// Hope it Helps !!
public class CamTestActivity extends Activity implements View.OnClickListener{
Button b1,b2,b3,b4;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b1 = (Button)findViewById(R.id.btn1);
b2 = (Button)findViewById(R.id.btn2);
b3 = (Button)findViewById(R.id.btn3);
b4 = (Button)findViewById(R.id.btn4);
b1.setOnClickListener(this);
b2.setOnClickListener(this);
b3.setOnClickListener(this);
b4.setOnClickListener(this);
}
#Override
public void onClick(View v) {
int id = v.getId();
switch (id){
case R.id.btn1:
pressbtn1();
break;
case R.id.btn2:
pressbtn2();
break;
case R.id.btn3:
pressbtn3();
break;
case R.id.btn4:
pressbtn4();
break;
}
}
private void pressbtn4() {
b1.setBackgroundColor(getResources().getColor(R.color.color_gray));
b2.setBackgroundColor(getResources().getColor(R.color.color_gray));
b3.setBackgroundColor(getResources().getColor(R.color.color_gray));
b4.setBackgroundColor(getResources().getColor(R.color.color_black));
}
private void pressbtn3() {
b1.setBackgroundColor(getResources().getColor(R.color.color_gray));
b2.setBackgroundColor(getResources().getColor(R.color.color_gray));
b3.setBackgroundColor(getResources().getColor(R.color.color_black));
b4.setBackgroundColor(getResources().getColor(R.color.color_gray));
}
private void pressbtn2() {
b1.setBackgroundColor(getResources().getColor(R.color.color_gray));
b2.setBackgroundColor(getResources().getColor(R.color.color_black));
b3.setBackgroundColor(getResources().getColor(R.color.color_gray));
b4.setBackgroundColor(getResources().getColor(R.color.color_gray));
}
private void pressbtn1() {
b1.setBackgroundColor(getResources().getColor(R.color.color_black));
b2.setBackgroundColor(getResources().getColor(R.color.color_gray));
b3.setBackgroundColor(getResources().getColor(R.color.color_gray));
b4.setBackgroundColor(getResources().getColor(R.color.color_gray));
}
}
Related
I have many buttons with different color names on them.
yellow - red - blue
I want, when user tap on one it creates a border around it (select the button) and in the end of my activity I have another button to SAVE the color user selected.
<Button
android:text="Yellow"
android:layout_width="111dp"
android:layout_height="wrap_content"
android:id="#+id/button1" />
<Button
android:text="Red"
android:layout_width="111dp"
android:layout_height="wrap_content"
android:id="#+id/button2" />
<Button
android:text="SAVE"
android:layout_width="111dp"
android:layout_height="wrap_content"
android:id="#+id/buttonsave" />
java
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.color);
Button btnYellow;
btnYellow = (Button) findViewById(R.id.button1);
Button btnRed;
btnRed = (Button) findViewById(R.id.button2);
Intent intent = getIntent();
String url2 = intent.getStringExtra("image");
btnYellow.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
}
});
}
how can I selected a button when user click on it and get a value (red,green, red1) when user click in save?
Place each button in a FrameLayout. This will give the button a border. Changing the background color on the FrameLayout will change the border of the button.
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="#+id/btnYellow"
android:layout_width="111dp"
android:layout_height="wrap_content"
android:text="Yellow" />
</FrameLayout>
Set an onClickListener for the buttons that looks something like the following, but don't use the hard-coded colors - this is just an example. mLastClicked is a member variable defined as Button mLastClicked.
#Override
public void onClick(View view) {
if (mLastClicked !=null) {
((FrameLayout) mLastClicked.getParent()).setBackgroundColor(0xFFFFFFFF);
}
mLastClicked = (Button) view;
switch (view.getId()) {
case R.id.btnYellow:
((FrameLayout) view.getParent()).setBackgroundColor(0xFFFFFF00);
break;
case R.id.btnRed:
// Similar to yellow
break;
case R.id.btnSave:
// Do something with mLastClicked to save it
break;
}
}
You can define your button as a shape To give it a border, use the element (name the file your.xml and place it in res/drawables):
and Refer this link
I'm trying to do in android a group of buttons that can be selected and activate only one of them. I need to work with the same logic of a radiogroup and radiobuttons.
I tried many alternatives but I want the most effective way. How can I do it?
You can use this simple way :
1.activity_button_group.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="A"
android:id="#+id/btn0"
android:layout_gravity="center_vertical" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="B"
android:id="#+id/btn1"
android:layout_gravity="center_vertical" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="C"
android:id="#+id/btn2"
android:layout_gravity="center_vertical" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="D"
android:id="#+id/btn3"
android:layout_gravity="center_vertical" />
</LinearLayout>
2.ButtonGroupActivity.java
public class ButtonGroupActivity extends Activity implements View.OnClickListener{
private Button[] btn = new Button[4];
private Button btn_unfocus;
private int[] btn_id = {R.id.btn0, R.id.btn1, R.id.btn2, R.id.btn3};
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_button_group);
for(int i = 0; i < btn.length; i++){
btn[i] = (Button) findViewById(btn_id[i]);
btn[i].setBackgroundColor(Color.rgb(207, 207, 207));
btn[i].setOnClickListener(this);
}
btn_unfocus = btn[0];
}
#Override
public void onClick(View v) {
//setForcus(btn_unfocus, (Button) findViewById(v.getId()));
//Or use switch
switch (v.getId()){
case R.id.btn0 :
setFocus(btn_unfocus, btn[0]);
break;
case R.id.btn1 :
setFocus(btn_unfocus, btn[1]);
break;
case R.id.btn2 :
setFocus(btn_unfocus, btn[2]);
break;
case R.id.btn3 :
setFocus(btn_unfocus, btn[3]);
break;
}
}
private void setFocus(Button btn_unfocus, Button btn_focus){
btn_unfocus.setTextColor(Color.rgb(49, 50, 51));
btn_unfocus.setBackgroundColor(Color.rgb(207, 207, 207));
btn_focus.setTextColor(Color.rgb(255, 255, 255));
btn_focus.setBackgroundColor(Color.rgb(3, 106, 150));
this.btn_unfocus = btn_focus;
}
}
You could still use Radio Buttons inside a Radio Group, and attributes to make each radio button look like a button.
In xml, for each radio button set android:button="#null", so that dots won't be visible. You could add some padding to make it look different.
In code, set a CheckedChangeListener to your radioGroup, then find the reference to the checkedView (RadioButton) with checkedId. In this example I've just changed the background color of the view, but you could add a different background too. If the radioButton is not null, it means it has already been changed, so I'll set its initial state again.
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
#Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (radioButton != null) {
radioButton.setBackgroundColor(Color.TRANSPARENT);
radioButton.setButtonDrawable(0); // removes the image
}
radioButton = (RadioButton) group.findViewById(checkedId);
radioButton.setBackgroundColor(Color.YELLOW);
radioButton.setButtonDrawable(R.drawable.icon); //sets the image
}
});
Hope this helps!
While you can set this in code as Denny Schuldt suggested, a "cleaner" way is to do it in xml (e.g. drawable/radio.xml):
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/button_checked" android:state_checked="true" />
<item android:drawable="#android:color/transparent" />
</selector>
And set it as button background: android:background="#drawable/radio"
If the button was clicked I want to turn on the wifi and also change the Image of ImageButton, but I do not know how to change it
I have also tried this from how to change the image of a button with every click? but is isn't working:
boolean isPressed=false
button.setOnClickListener(buttonListener);
OnClickListener buttonListener= new OnClickListener() {
#Override
public void onClick(View v) {
if(isPressed){
button.setBackgroundResource(R.drawable.icon1);
}else{
button.setBackgroundResource(R.drawable.icon2);
}
isPressed=!isPressed;
}};
when I write the code above, android studio shows this:
Cannot resolve symbol setOnClickListener
I have also created a button_wifi_selector xml, which it looks like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<item android:drawable="#drawable/wifi_on"
android:state_pressed="true" />
<item android:drawable="#drawable/ic_launcher"
android:state_focused="true" />
<item android:drawable="#drawable/wifi" />
</selector>
and in my activity i have this
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/imageButton_wifi"
android:layout_below="#+id/toggleButton_wifi"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:onClick="turnOffWifiDemo"
android:src="#drawable/button_wifi_selector" />
but it isn't doing, what I want
Can somebody pls help me?
Thanks
EDIT: it works with the first code. I just had to remove the onClick from ImageButton in the xml
BUT: he is changing the picture the second time, when I start the app. After that he changes it every time
this code work for me; test it
final ImageButton btnTest =(ImageButton) findViewById(R.id.btnexctract);
btnTest.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
btnTest.setSelected(!btnextra.isPressed());
if (btnTest.isPressed()) {
btnextra.setImageResource(R.drawable.yourImage);
}
else {
btnTest.setImageResource(R.drawable.yourImage2);
}
}
});
This is how you have to do it
Selector xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="true"
android:drawable="#drawable/info_icon_solid_with_shadow" />
<item
android:drawable="#drawable/info_icon_outline_with_shadow" />
</selector>
And then in java:
//assign the image in code (or you can do this in your layout xml)
imageButton.setImageDrawable(getBaseContext().getResources().getDrawable(R.drawable....));
//set the click listener
imageButton.setOnClickListener(new OnClickListener() {
public void onClick(View button) {
//Set the button's appearance
button.setSelected(!button.isSelected());
if (button.isSelected()) {
//Handle selected state change
}
else {
//Handle de-select state change
}
}
});
I have modified it,for on/off it may help you
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageButton
android:id="#+id/imageButton_wifi2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="clickEvent"
android:visibility="invisible"
android:src="#drawable/on" />
<ImageButton
android:id="#+id/imageButton_wifi1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="clickEvent"
android:src="#drawable/off" />
</FrameLayout>
like you need to create method with view parameter
{
c=false;
im1=(ImageButton)findViewById(R.id.imageButton_wifi1);
im2=(ImageButton)findViewById(R.id.imageButton_wifi2);
}
public void clickEvent(View v)
{
//Code to implement
if(c) {
im2.setVisibility(View.VISIBLE);
im1.setVisibility(View.INVISIBLE);
c=false;
}
else {
im1.setVisibility(View.VISIBLE);
im2.setVisibility(View.INVISIBLE);
c=true;
}
You can use togglebutton like this
<ToggleButton
android:id="#+id/toggleButton1"
android:layout_width="74dp"
android:layout_height="26dp"
android:background="#drawable/toggle"
android:checked="false"
android:paddingRight="10dp"
android:text="ON"
android:textColor="#ffffff"
android:textSize="13sp"
android:textStyle="bold" />
And in java file
final ToggleButton toggleButton=(ToggleButton)findViewById(R.id.toggleButton1);
toggleButton.setOnCheckedChangeListener(new OnCheckedChangeListener() {
#Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// TODO Auto-generated method stub
if(isChecked){
//
toggleButton.setBackgroundResource(R.drawable.icon1);
}else{
//
toggleButton.setBackgroundResource(R.drawable.icon2);
}
}
});
You can define a boolean flag and just change visibility of items.
Description: changeBack is a button. This code is for change images
Your onClick does not know which id is clicked?
private boolean bgcolor = false;
public void onClick(View view) {
switch(view.getId())
{
case R.id.changeBack:
bgcolor = !bgcolor;
if (bgcolor) {
imv.setVisibility(View.VISIBLE);
imv2.setVisibility(View.INVISIBLE);
}
else {
imv2.setVisibility(View.VISIBLE);
imv.setVisibility(View.INVISIBLE);
}
break;
}
}
I have ImageButton and TextView inside RelativeLayout.
I want to change their colors to blue when they are pressed and make them white again when released. also I need to do it to both of them no matter which of them I click.
and I want to activate the same action to both of them, for example a Toast that will be shown on the screen.
I tried to do it using selectors and duplicateParentState and many other options.
Can someone give me a simple example of how to do it?
UPDATE:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/trash_pressed" android:state_pressed="true"/>
<item android:drawable="#drawable/trash_pressed" android:state_focused="true"/>
<item android:drawable="#drawable/trash"/>
</selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#33B5E5" />
<item android:state_focused="true" android:color="#33B5E5" />
<item android:color="#ffffff" />
</selector>
and this is the layout
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:scaleType="fitCenter"
android:gravity="center"
android:layout_gravity="center">
<ImageButton
android:id="#+id/button_ResetData"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_weight="1"
android:adjustViewBounds="true"
android:background="#android:color/transparent"
android:clickable="true"
android:duplicateParentState="true"
android:scaleType="fitCenter"
android:src="#drawable/reset_button_selector"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="#id/button_ResetData"
android:scaleType="fitCenter"
android:clickable="true"
android:text="#string/Button_ResetData"
android:textSize="10dp"
android:duplicateParentState="true"
android:textColor="#drawable/main_buttons_text_color_selector"/>
</RelativeLayout>
when I click the layout the selectors of the text and button is activated but not the click event. when I click the button the selectors don't work but the click event works
You can set selectors to RelativeLayout directly and implement onClickListener for the same. And make sure you include android:clickable="true" inside your RelativeLayout.
Very Simple
In your activity where u call the on click function... define them separately but use them like this
public class yourclass extends Activity implements OnClickListener
{
ImageButton IMGBTN1;
TextView tv1;
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_previousentry);
IMGBTN1 = (ImageButton) findViewById(R.id.imageButton1);
tv1= (TextView) findViewById(R.id.textview1);
IMGBTN1.setOnClickListener(this);
tv1.setOnClickListener(this);
}
public void onClick(View v)
{
if (v == IMGBTN1 )
{
IMGBTN1.setBackgroundColor(Color.BLUE);
tv1.setTextColor(Color.parseColor("#bdbdbd"));
Toast.makeText(getBaseContext(),"img 1 pressed", Toast.LENGTH_LONG).show();
delay();
}
if (v == tv1)
{
IMGBTN1.setBackgroundColor(Color.BLUE);
tv1.setTextColor(Color.parseColor("#bdbdbd"));
Toast.makeText(getBaseContext(),"textview 1 pressed", Toast.LENGTH_LONG).show();
delay();
}
public void delay()
{
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
#Override
public void run()
{
IMGBTN1.setBackgroundColor(Color.RED);
tv1.setTextColor(Color.parseColor("#ffffff"));
}
}, 500);
}
}
Use yourView.performClick() to programatically click a button.
You can try this,
Add selectors to both Textview and image drawable. Add that image drawable to textview using attributes like drawableLeft, drawableTop etc in xml.
Let me know if it works.
FOUND A SOLUTION:
final ImageButton resetButton = (ImageButton) findViewById(R.id.button_ResetData);
final TextView resetButton_Title = (TextView) findViewById(R.id.textview_button_ResetData_title);
View.OnTouchListener onTouchListener_ResetButton = new View.OnTouchListener() {
#Override
public boolean onTouch(View view, MotionEvent motionEvent) {
switch (motionEvent.getAction()){
case MotionEvent.ACTION_DOWN:
resetButton.setImageResource(R.drawable.trash_pressed);
resetButton_Title.setTextColor(getResources().getColor(R.color.Blue_Light));
break;
case MotionEvent.ACTION_UP:
resetButton.setImageResource(R.drawable.trash);
resetButton_Title.setTextColor(Color.WHITE);
AlertDialog.Builder builder = new Builder(MainActivity.this);
builder.setMessage("Are you sure you want to clear the list (except \"In progress\")?")
.setPositiveButton("Yes", resetListDialogClickListener)
.setNegativeButton("No", resetListDialogClickListener);
AlertDialog dialog = builder.show();
TextView messageView = (TextView) dialog.findViewById(android.R.id.message);
messageView.setGravity(Gravity.CENTER);
}
return false;
}
};
resetButton.setOnTouchListener(onTouchListener_ResetButton);
resetButton_Title.setOnTouchListener(onTouchListener_ResetButton);
I have a java file which has the reference to the button:
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
createMenus();
return inflater.inflate(R.layout.fragment_test, container, false);
}
#Override
public void onClick(final View view) {
final int actionBarHeight = getActivity().findViewById(R.id.title_main_container).getHeight();
switch (view.getId()) {
case R.id.news_article_menu_button:
mOptionsMenuHelper.showMenu(view.getBottom() + actionBarHeight, Gravity.RIGHT);
break;
case R.id.text_size:
mTextSize = TextSize.values()[(mTextSize.ordinal() + 1) % TextSize.values().length];
updateFontSize();
break;
default:
throw new IllegalArgumentException("Invalid view Id" + view.getId());
}
}
private void setOnclickListeners(final View view){
final ImageButton button = (ImageButton) view.findViewById(R.id.menu_button);
button.setOnClickListener(this);
}
private void createMenus() {
mPreferenceMenuItems.add(PreferenceMenuItems.MENU_PREFERENCES);
mPreferencesMenuHelper = new MenuHelper(getActivity(), mPreferenceMenuItems,this);
mDeleteMenuItems.add(DeleteMenuItems.DELETE_PREFERENCES);
mDeleteMenuHelper = new MenuHelper(getActivity(), mDeleteMenuItems,this);
}
This is the corresponding button "over_btn" where the selector is defined:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_enabled="false"
android:drawable="#drawable/over_pressed" />
<item
android:state_pressed="true"
android:state_enabled="true"
android:drawable="#drawable/over_pressed" />
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="#drawable/over_pressed" />
<item
android:state_enabled="true"
android:drawable="#drawable/over" />
</selector>
and this is one of the corresponding xml files using the same fragment_test:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:clickable="true"
android:background="#color/background_bar" >
<ImageButton
android:id="#+id/menu_button"
android:layout_width="49dp"
android:layout_height="48.5dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="#android:color/transparent"
android:gravity="right"
android:paddingRight="14dp"
android:src="#drawable/over_btn" />
</RelativeLayout>
I want the button to switch to a different image onclick and stay in that state till pressed again instead of highlighting once when pressed, is there any way to go about this?
Thanks!
Justin
add
<item
android:state_selected="true"
android:drawable="#drawable/info_selected" />
to your selector and when you click on the ImageButton, call view.setSelected(!view.isSelected()) to switch between status selected and unselected
public void onClick(final View view) {
switch (view.getId()) {
case R.id.imageButtonId:
view.setSelected(!view.isSelected());
break;
}
}
You should be able to do this with an onClick listener as show in this post.
//these are instance variables
private ImageButton button = null;
private boolean imageSwitched = false;
//call this method in your onActivityCreated() method. If the
//layout containing the button is not yet inflated you will not
//be able to find your image button.
private void initializeButton(){
button= (ImageButton)getActivity().findViewById(R.id.imgButton);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(!imageSwitched){
button.setBackgroundResource(R.drawable.a);
imageSwitched = true;
} else {
buttons.setBackgroundResource(R.drawable.b);
imageSwitched = false;
}
}
});
}
To switch beteen 2 views you will need to use some state variable. I chose a boolean thats set on click to handle which image is swiched to on click.
Also if you don't want to use a listener you can set your button to have an onClick method in XML and use the same state handling idea
public void buttonSwitch(View v){
//state handling here
}
This way the method is called only when click and does not use the overhead of a listener.