android-custom-view

Android Map API V2 set Custom InfoWindow Position

十年热恋 提交于 2020-01-01 19:04:25
问题 I'm using InfoWindowAdapter for all the markers on my Map (Api v2). All the Markers are well visible.. The issue is that My Custom InfoWindow is having size about 500px * 300px. When I'm touching any Points on the Map its being set to Center of screen so the InfoWindow is being cropped from Top.. My requirement is to auto adjust as per Info Window Size. Please have a look at snaps. 回答1: Override the default behaviour of OnMarkerClickListener . call marker.showInfoWindow() calculate position

Custom keyboard - Android

假装没事ソ 提交于 2019-12-31 04:12:38
问题 Is there any known combinations of inputTypes on an inputText that would give a Num-pad keyboard with special characters such as $ , * , # and & . I am trying to allow the user to input a number and that field could take the mentioned characters as well. I have tried many but none seem to be giving the required output. Would I have to create my own custom keyboard for this? Since my request is very specific to certain special characters please do not mark this as a duplicate question. Thanks

how to fix Application not responding?

本秂侑毒 提交于 2019-12-31 00:09:51
问题 i have prepared paint application,my application contains one custom view for paint.when we draw any thing in custom view just collect the drawn pixels and store in array list,first it's working fine(but it's taking lot of time) and second time " Activity MyAlphabets(in application MyAlphabets)is not responding(force close and wait)". My code is, public void onDraw(Canvas canvas) { if (myDrawBitmap == null) { myDrawBitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap

getChildCount() returns incorrect number of children

南楼画角 提交于 2019-12-30 11:10:07
问题 I have created a custom TextView with an X button, whose visibility are set to GONE when the button is clicked. Now I want to get the number of visible TextViews in the LinearLayout . Currently, I am getting the count of total TextViews inserted rather than the visible ones. Example: When I have 2 TextViews, getChildCount() gives 2 but if I delete one TextView by clicking the X button, it still gives me 2. Why is this happening? I have created something like this: The X here is a button whose

getChildCount() returns incorrect number of children

前提是你 提交于 2019-12-30 11:09:09
问题 I have created a custom TextView with an X button, whose visibility are set to GONE when the button is clicked. Now I want to get the number of visible TextViews in the LinearLayout . Currently, I am getting the count of total TextViews inserted rather than the visible ones. Example: When I have 2 TextViews, getChildCount() gives 2 but if I delete one TextView by clicking the X button, it still gives me 2. Why is this happening? I have created something like this: The X here is a button whose

Custom view style, android's attributes are ignored

限于喜欢 提交于 2019-12-30 08:23:07
问题 I created a custom compound view - the view loads, no crashes, so far so good. Now, i plan to use this view MANY MANY times in my app, so the view needs a style. I declared a styleable for it in my attr.xml file <declare-styleable name="MyCustomView"> <attr name="ff_label" format="string" /> <attr name="ff_fieldText" format="string" /> </declare-styleable> <declare-styleable name="MyCustomViewStyle"> <attr name="customViewStyle" format="reference" /> </declare-styleable> Then i went to my

Carousel view implementation like listview scrolling

自作多情 提交于 2019-12-29 08:22:32
问题 Anyone has implemented like the below carousel ? Note: The list of items should not be repeated, means should not come to first after reaching the last item. Please help me on this. [edited] I don't want to use ListView for this. anyone help me on this. Thanks... 回答1: this should get you started. Override your ListView like so: private final Transformation mTransformation; public ListView3d(Context context, AttributeSet attrs) { super(context, attrs); if (!isInEditMode()) {

Carousel view implementation like listview scrolling

大城市里の小女人 提交于 2019-12-29 08:22:17
问题 Anyone has implemented like the below carousel ? Note: The list of items should not be repeated, means should not come to first after reaching the last item. Please help me on this. [edited] I don't want to use ListView for this. anyone help me on this. Thanks... 回答1: this should get you started. Override your ListView like so: private final Transformation mTransformation; public ListView3d(Context context, AttributeSet attrs) { super(context, attrs); if (!isInEditMode()) {

android custom radio button not getting checked

不打扰是莪最后的温柔 提交于 2019-12-28 07:08:27
问题 I have created radio group with custom layout i.e. custom button. <?xml version="1.0" encoding="utf-8"?> <RadioGroup android:id="@+id/radio_group_rating" android:layout_width="match_parent" android:layout_height="150dp" android:orientation="horizontal" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="horizontal" android:weightSum="3" > <RadioButton android:id="@+id/radio_platinum" android:layout_width="wrap

How to obtain the checked rows in a custom view list

寵の児 提交于 2019-12-28 06:54:10
问题 Can any one tell me how can i obtain the values of the checked rows in a custom view list? For example my code has a custom view list with two text view and a checkbox. Whenever the user checks a row and hits the submit button i need to retrieve the information in the two textview.. The code is public class contacts extends Activity implements OnItemClickListener { static final String TAG = "contacts"; ArrayList<String> contactName = new ArrayList<String>(); ArrayList<String> contactNumber =