How can i make this photos dynamic weight by code? - java

I want that the pic will be dynamically like if I use this method 3 times it will give me 3 photos and the weight will be dynamic
public void addImageToRaw(final String text, final float rate/*, final TextView textView*/, final PhotosRatingInfo photosRatingInfo)
{
ImageView imageView = new ImageView(rawLinear1.getContext());
imageView.setImageBitmap(BitmapFactory.decodeFile(text));
//imageView.setLayoutParams();
//PhotosRatingInfo ratingInfo = new PhotosRatingInfo(rate, text);
rawLinear1.addView(imageView, 150, 150);
imageView.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View view) {
//MainMenuActivity.Chasttext();
RateDialog dialog = new RateDialog(text, rate/*, textView*/, photosRatingInfo);
dialog.show(manager, "");
//new RateDialog().show(manager, "");
}
});
}

In your layout.xml you can set a value for weight. You can only do this for one row (you could just create as many seperate rows as you need.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
Otherwise, if you really want a grid, you would need to use a GridView, but that requires Android OS 4.3+.

An alternative to achieve this would be using a GridView. That's the best way, as you get the same solution.

Related

setBackgroundColor is crashing the android application

I recently made a small app that should change the background color & text of the application when a certain amount of money is generated (here 100000). However, whenever I go past 10000, the application crashes. I am not sure why and can not get around it. I saw that this problem is with background color only because it is otherwise displaying text correctly.
Here is the XML for activity_main
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/Trial"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#EC5353"
tools:context=".MainActivity">
<TextView
android:id="#+id/Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="92dp"
android:gravity="center"
android:text="#string/Title"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="72dp"
android:text="#string/moneyPresent"
android:textSize="22sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/Title" />
<Button
android:id="#+id/moneyGenerator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="72dp"
android:background="#FFFFFF"
android:backgroundTint="#732424"
android:backgroundTintMode="multiply"
android:text="#string/generateMoneyButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/money" />
<TextView
android:id="#+id/richTag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:text="#string/grind_boi"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/moneyGenerator" />
</androidx.constraintlayout.widget.ConstraintLayout>
Here is my Java Code (Omitted the packages as it would take a lot of space. Do tell me if anyone wants to read it.)
public class MainActivity extends AppCompatActivity {
private Button makeMoney;
private int totalMoney=0;
private TextView moneyText;
private TextView richAlert;
private ConstraintLayout background;
NumberFormat currency=NumberFormat.getCurrencyInstance(new Locale("en","in"));
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
makeMoney = findViewById(R.id.moneyGenerator);
moneyText=findViewById(R.id.money);
richAlert=findViewById(R.id.richTag);
makeMoney.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
totalMoney+=1000;
moneyText.setText(currency.format(totalMoney));
Log.d("MoneyTag", "Money Made: "+totalMoney);
Toast.makeText(getApplicationContext(),"Total Money= \u20B9"+totalMoney,Toast.LENGTH_LONG)
.show();
if(totalMoney>=10000) {
richAlert.setText("Welcome to moneyland bro 😁");
background.setBackgroundColor(16776960);
}
}
});
}
}
makeMoney = findViewById(R.id.moneyGenerator);
moneyText=findViewById(R.id.money);
richAlert=findViewById(R.id.richTag);
You're finding all the views, except background(ConstraintLayout), that's why it is throwing NullPointerException (Most likely, because you haven't attached logs).
You need to find the layout first
background = findViewById(R.id.Trial);
in onCreate.
you haven't defined "background" view in the above.
to use .setBackgroundColor you need to use it with some view
try making object of layout view then change the color of that layout
mConstraintLayout =
(ConstraintLayout)findViewById(R.id.Trial);
makeMoney = findViewById(R.id.moneyGenerator);
moneyText=findViewById(R.id.money);
richAlert=findViewById(R.id.richTag);
if(totalMoney>=10000) {
richAlert.setText("Welcome to moneyland bro 😁");
mConstraintLayout.setBackgroundColor(ContextCompat.getColor(this, R.color.yellow));
background = findViewById(R.id.Trial);
just find layout and null pointer excpetion will removed

How can I add different ids to buttons recyclerview

My project is based on a recycler view. The layout of each elements is this :
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp">
<ImageView
android:id="#+id/imgview"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="2dp" />
<TextView
android:id="#+id/txtview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="51dp"
android:layout_marginTop="1dp"
android:text="Line 1"
android:textColor="#android:color/black"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtview2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="52dp"
android:layout_marginTop="29dp"
android:layout_marginBottom="1dp"
android:text="Line 2"
android:textSize="15sp" />
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="3dp"
android:layout_marginEnd="3dp"
android:text="Voir plus" />
</RelativeLayout>
And I edit it with this :
ArrayList<exempleitem> ExampleList = new ArrayList<>();
ExampleList.add(new exempleitem(R.drawable.ic_android, "Line 1", "Line 2 ", button2.setId(R.id.hydro) ));
ExampleList.add(new exempleitem(R.drawable.ic_baseline_airplanemode_active_24, "Line 3", "Line 4 ",button3.setId(R.id.hel)));
ExampleList.add(new exempleitem(R.drawable.ic_baseline_beach_access_24, "Line 5", "Line 6 ",button4.setId(R.id.lit)));
My problem is that I would like to change the ID of each button, and it doesnt work.
I can't think of anything else right now, and I'm quite a begginner.
I think you don't know how a recyclerview works. It doesn't matter if a button have the same id as another as long as they live in different "cells". Thats the purpose of recyclerviews.
So you have to create a recyclerview adapter and put all the logic in there, the logic will be based on a dataset which is an array probably and your clicks will be based on the position of that array.
You can read more from Google's official guide
Hope it helps!
You shouldn't change the ids and if I am not mistaken, you are not even allowed to do that.
I read in the comments that you want to change the event of a button. Try encapsulating the actions of each button click into methods and then setOnClickListener again on the buttons to change their on click action.
Initial Code before changing action
view.findViewById(R.id.button_first).setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
dosmthA();
}
});
To change action simply:
view.findViewById(R.id.button_first).setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
dosmthB();
}
});
You can even create View.OnClickListener() objects and interchange them in the setOnClickListener() method like so:
View.OnClickListener action = new View.OnClickListener() {
#Override
public void onClick(View view) {
smth();
}
}
view.findViewById(R.id.button_first).setOnClickListener(action);
You can use a ViewHolder and RecyclerView Adapter to set Click listener for each view...
If you share me the adapter code snippet I can give you the code...
😁

Android Studio Buttons not Displaying

I made this dialog for my app that shows up allows you to delete the items from db. It used to be a textView and a button which called the function, all in a linear layout, which worked good. Now I changed to a Relative Layout so I could add another button on the same line as the other, I also added an editText.
My problem is that since I added those objects I am not able to see the buttons anymore. the editText and textView are visible.
XML Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/dialog_deletefood"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context="com.example.paulcosma.app2.SecondActivity">
<TextView
android:text="TextView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/lblFoodDetails"
android:textAlignment="center"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="19dp" />
<Button
android:text="Şterge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/btnDeleteEatenFood"
android:layout_alignBaseline="#+id/btnModifyEatenFood"
android:layout_alignBottom="#+id/btnModifyEatenFood"
android:layout_toStartOf="#+id/lblFoodDetails"
android:visibility="visible" />
<Button
android:layout_marginTop="100dp"
android:text="Modifică"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/btnModifyEatenFood"
android:layout_below="#+id/lblFoodDetails"
android:layout_toEndOf="#+id/lblFoodDetails"
android:visibility="visible" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/txtEditValue"
android:maxLength="6"
style="#style/Widget.AppCompat.AutoCompleteTextView"
android:maxLines="1"
android:textAppearance="#style/TextAppearance.AppCompat"
android:fontFamily="sans-serif"
android:textSize="14sp"
android:textAlignment="center"
android:textColorLink="#android:color/holo_blue_light"
android:inputType="numberDecimal"
android:layout_marginTop="21dp"
android:layout_below="#+id/lblFoodDetails"
android:layout_centerHorizontal="true" />
</RelativeLayout>
This dialog is supposed to show on listView item click. Below is the code I used to show it.
#Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
HashMap<String, String> hmap = (HashMap<String, String>)parent.getItemAtPosition(position);
final String _name = hmap.get("food");
final int _id = foodDB.getFoodId(_name);
AlertDialog.Builder mBuiler = new AlertDialog.Builder(SecondActivity.this);
View mView = getLayoutInflater().inflate(R.layout.dialog_deletefood,null);
final TextView lblFoodDetails = (TextView) mView.findViewById(R.id.lblFoodDetails);
final Button btnDeleteEatenFood = (Button) mView.findViewById(R.id.btnDeleteEatenFood);
lblFoodDetails.setText("Aţi ales produsul " + _name + ". Aici puteţi adăuga sau scădea cantitatea printr-o anumită valoare sau puteţi şterge apariţia produsului.");
mBuiler.setView(mView);
final AlertDialog dialog = mBuiler.create();
btnDeleteEatenFood.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
foodDB.deleteEatenFood(_id);
Toast.makeText(SecondActivity.this,_name+" a fost sters",Toast.LENGTH_SHORT).show();
dialog.dismiss();
updateFoodList(foodDB.getAllEatenFood());
}
});
dialog.show();
}
This layout file renders the buttons in the Android layout designer as described (see below)
The problem may reside in code.
The problem was that both buttons where placed based on textView's size. When it changed, buttons got placed out of the screen
Bug:
android:layout_toEndOf="#+id/lblFoodDetails"
android:layout_toEStartOf="#+id/lblFoodDetails"

Programmatically adding a TextView onto an existing XML file

My main screen displays info from user input.
Now everything on this screen is added using XML apart from "Kool" TextView on the top left corner. Now I want a way to get info from a user and add it underneath the first row of information.
I've sorted out the screen that gets user input the problem is actually getting the layout perfect. Now I added "Kool" TextView programmatically but the layout is wrong.
How can I make it so it so the "Kool" TextView is underneath the date "20/08/15". Every time I use the setHeight method it makes the TextView invisible.
Code:
public class AnalysisPage extends Activity {
Button savebutton,cancelbutton;
EditText dateinput,weightinput,repsinput;
int dd,mm,yy;
private TextView texty = null;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dumbbellpress);
}
#Override
public boolean onCreateOptionsMenu(Menu menu){
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_activity_actions,menu);
return super.onCreateOptionsMenu(menu);
}
#Override
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()){
case R.id.addinfo:
Dialog dialog = new Dialog(AnalysisPage.this);
dialog.setTitle(" Enter your STATS brah");
dialog.setContentView(R.layout.datainput);
dateinput = (EditText)dialog.findViewById(R.id.editDate);
final Calendar c = Calendar.getInstance();
dd = c.get(Calendar.DAY_OF_MONTH);
mm = c.get(Calendar.MONTH);
yy = c.get(Calendar.YEAR);
dateinput.setText(new StringBuilder().append(dd).append("/").append(mm+1).append("/").append(yy));
dialog.show();
weightinput = (EditText)dialog.findViewById(R.id.editWeight);
repsinput = (EditText)dialog.findViewById(R.id.editReps);
savebutton = (Button)dialog.findViewById(R.id.btnSave);
cancelbutton = (Button)dialog.findViewById(R.id.btnCancel);
savebutton.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
RelativeLayout views = (RelativeLayout)findViewById(R.id.xxx);
texty = new TextView(AnalysisPage.this);
texty.setTextSize(28);
texty.setText("Kool");
views.addView(texty);
}
});
cancelbutton.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
dialog.cancel();
}
});
return true;
default:
return super.onOptionsItemSelected(item);
}
}
XML code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:weightSum="1" android:id="#+id/statslayout">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="#+id/xxx">
<TableRow
android:layout_width="fill_parent"
android:layout_height="100dp" android:id="#+id/tableRow3" android:layout_alignParentTop="true"
android:layout_alignParentStart="true" android:layout_marginStart="72dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Dumbbell Press Stats!"
android:id="#+id/textView"/>
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="100dp" android:id="#+id/tableRow"
android:layout_alignParentTop="true" android:layout_alignEnd="#+id/tableRow3"
android:layout_marginTop="49dp" android:layout_alignBottom="#+id/tableRow3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Date"
android:layout_weight="0.22"
android:id="#+id/btnDate"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=" Weight"
android:layout_weight="0.22"
android:id="#+id/txtWeight"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=" Reps"
android:layout_weight="0.22"
android:id="#+id/btnReps"
/>
</TableRow>
<TableRow
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_below="#+id/tableRow" android:layout_alignParentStart="true" android:id="#+id/tableRow4">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="20/08/15"
android:id="#+id/textView2" android:layout_below="#+id/tableRow"
android:layout_alignStart="#+id/tableRow3"/>
</TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=" 8"
android:id="#+id/textView7"
android:layout_marginEnd="82dp" android:layout_below="#+id/tableRow"
android:layout_alignEnd="#+id/tableRow3"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="50kg"
android:id="#+id/textView6"
android:layout_marginStart="43dp"
android:layout_below="#+id/tableRow3" android:layout_toEndOf="#+id/tableRow4"/>
</RelativeLayout>
My end (dream) goal for this is by using Java I making complete perfectly formatted rows which contains the Date, Weight and Reps in their respected columns. And multiple rows of this or perfectly formatted using Java.
Image (this is in XML not in Java)
Rather than add TextView(s) programmatically, use a ListView. This will solve your problems entirely. You would use a custom adapter setAdapter() that your ListView would set as it's adapter (that provides the List it's data), and add new row elements each time you click your button that adds the new items. This would mean replacing your TableRow bit, and using a ListView in the RelativeLayout instead. Also, you could add a custom header view to the ListView to replace that header you already use (source: addHeaderView() )
Looking at your rows, it appears that they have the fields: "Date", "weight" and "reps". This would mean create a custom Java object that has those three fields, and make the the object type of your ListView adapter's elements. I can provide starter code if you REALLY need it, but it would help you best to use the documentation I provided to teach your self how to use the ListView.
Tutorial: ListView tutorial
Edit: Another bonus: ListView handles allowing the user to scroll as more, and more rows are added to this List of yours. More reason to just opt to a ListView :)

Moving buttons with animation and changing their position afterwards

I am learning Java and Android SDK. I want to create a simple application that is swapping 2 buttons so the left one is moving to the place of right one and v.v. with simple animation. I have tried the ObjectAnimator because I have read that it is moving the views objects permanently. But it's not :-( The objects stays there I mean the left one on the right and v.v. but their getLeft(), getTop() values are the same, and after next animations starts the objects are returning to the start position immediately. I have read that the ObjectAnimator needs some additional function to work properly but in the documentation there is no example :-( I have tried to add the setTranslationX function but it hasn't worked. Could somebody provide me with some simple example of how to do this?
http://developer.android.com/guide/topics/graphics/prop-animation.html#object-animator
"The object property that you are animating must have a setter function (in camel case) in the form of set(). Because the ObjectAnimator automatically updates the property during animation, it must be able to access the property with this setter method. For example, if the property name is foo, you need to have a setFoo() method. If this setter method does not exist, you have three options:
Add the setter method to the class if you have the rights to do so.
Use a wrapper class that you have rights to change and have that wrapper receive the value with a valid setter method and forward it to the original object.
Use ValueAnimator instead."
Thanks in advance.
try this code:
public class ActivityStartup extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle("hello");
setContentView(R.layout.main);
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.SLIDING_WINDOW);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setBehindOffset(100);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
View view = G.layoutInflater.inflate(R.layout.menu, null);
view.findViewById(R.id.layout_crop).setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
Toast.makeText(G.context, "Crop Clicked", Toast.LENGTH_SHORT).show();
}
});
view.findViewById(R.id.img_logo).setOnClickListener(new OnClickListener() {
#Override
public void onClick(View v) {
Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://example.com"));
startActivity(browserIntent);
}
});
menu.setMenu(view);
}
}
public class G extends Application {
public static LayoutInflater layoutInflater;
public static Context context;
#Override
public void onCreate() {
super.onCreate();
layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
context = getApplicationContext();
}
}
main.xml is:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/hello" />
menu.xml is:
<ImageView
android:id="#+id/img_logo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="8dip"
android:scaleType="centerInside"
android:src="#drawable/hlogo" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#00ff00"
android:src="#drawable/ic_launcher" />
<LinearLayout
android:id="#+id/layout_crop"
android:layout_width="match_parent"
android:layout_height="48dip"
android:gravity="center_vertical" >
<ImageView
android:id="#+id/ImageView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dip"
android:scaleType="centerInside"
android:src="#android:drawable/ic_menu_crop" />
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Crop"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:id="#+id/layout_day"
android:layout_width="match_parent"
android:layout_height="48dip"
android:gravity="center_vertical" >
<ImageView
android:id="#+id/ImageView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dip"
android:scaleType="centerInside"
android:src="#android:drawable/ic_menu_day" />
<TextView
android:id="#+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Day"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:id="#+id/layout_delete"
android:layout_width="match_parent"
android:layout_height="48dip"
android:gravity="center_vertical" >
<ImageView
android:id="#+id/ImageView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dip"
android:scaleType="centerInside"
android:src="#android:drawable/ic_menu_delete" />
<TextView
android:id="#+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete"
android:textColor="#000000" />
</LinearLayout>

Categories

Resources