cart - Custom basket icon with count for android application -


i developing sample ordering application. want show basket icon added item count. whenever user add item cart, count in basket icon should increment.

i want show image in bottom of application screen.

enter image description here

use framelayout

<framelayout android:layout_width="wrap_content" android:layout_height="wrap_content">  <imageview     android:id="@+id/counter"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:gravity="center"     android:src="@drawable/basket"     android:drawablepadding="@dimen/spacing_small" />  <textview     android:id="@+id/counter_value"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="1"     android:gravity="center" />  </framelayout> 

text colour of textview should match background. use java(activity) increment counter value.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -