Skip to main content
0 votes
0 answers
35 views

Get last non-empty text line in StaticLayout

I'm using this StaticLayout.Builder in Android. val staticLayout = StaticLayout.Builder.obtain(fullText, 0, fullText.length, textPaint, containerWidth).build() I want to be able to ...
afe addeh's user avatar
1 vote
1 answer
27 views

How to create a custom EditText with a blinking red background for setting errors in Android Kotlin?

I want to create a custom EditText in Android that shows a blinking red background when there is an error. The idea is to visually indicate to the user that input is invalid. Here is what I have tried ...
Lily Monta's user avatar
0 votes
0 answers
59 views

Android Canvas.drawPoint method draws nothing

I'm doing some work with Canvas.drawPoint(float, float, Paint), but I found a strange thing: this method doesn't work. At first, I thought it was a problem with my code, so I wrote a simple test code: ...
L. Swifter's user avatar
  • 3,237
1 vote
0 answers
21 views

Android custom image with diagonal

I want to create a layout like this. It has 2 images with a diagonal running across the 2 images. Below is my xml layout. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http:...
Ngọc Hưng's user avatar
-1 votes
1 answer
63 views

Is there a way to store a vector graphic in the app's package and load it on runtime into a canvas?

I want to build an app where you can draw ancient hieroglyphs on a canvas in a custom view. I have to provide over 1000 hieroglyphs in vector graphic format (for scaling mirroring etc.). The provided ...
electric_eel23's user avatar
2 votes
4 answers
211 views

Prevent GridLayout column width from stretching as if there were other columns

I have a programmatically created GridLayout that renders time slots within a specific day (such as an appointment time). At a maximum, each row should have 4 evenly spaced even width items, and at a ...
Orbit's user avatar
  • 2,375
-1 votes
1 answer
83 views

Build the ios Messages Chat Bubble(with bottom right and left tail ) in Android

I want to build the iOS-like Messages chat bubble in Android using the custom view class this is the code that I use to create the rounded corner rectangle and it will be based on the height and ...
Jay Dolar's user avatar
0 votes
0 answers
44 views

New message indicator badge implementation in Android XML

I have an application which acts nearly as a messaging service, constantly checking for some king of new messages. Such apps as WhatsApp, Viber, Telegram etc. have those new message circular indicator ...
zrocker's user avatar
  • 11
0 votes
1 answer
27 views

Android Studio Custom View Coordinates are offset

I'm working on an app in Android Studio that lets the user visualize a family tree. For the profiles of the family members, I created the custom view PersonCard: public class PersonCard extends ...
schwitzky's user avatar
0 votes
0 answers
80 views

Curved Bottom Nav Bar have horizontal reflection on the edges

As mention in the title im trying to make a custom curved bottom nav bar with round edges and transparent curve like this one and this is the result i have made so far but as you can see when the ...
Omar A. Khaled's user avatar
-1 votes
1 answer
33 views

Android TextView with time on the last line

I need a custom textview that would display the time on the last line. The time should be aligned to the right of the all message. If there is no space on the last line, then the time is moved below. ...
Vladimir Fisher's user avatar
0 votes
1 answer
25 views

Image not loading in the custom view class that extends AppCompatImageView

I have designed a custom class named PaintView. My objective is to load an image that user selects and allow the user to draw like paint brush or put different shapes on it. Here's how I implemented ...
ganjaam's user avatar
  • 1,288
0 votes
2 answers
207 views

How to create a RadioButton custom view?

I've tried many tutorials and solutions on internet but couldn't make mine work. Basically I want a layout like this to work as 7 RadioButtons: I have my CustomRadioButton class that I want it to ...
vr4u's user avatar
  • 51
0 votes
0 answers
23 views

Compound view with CollapsingToolbar doesn't work as intended

I have created compound view with my desired behavior of views class CustomCollapsableToolbar @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = ...
Azim Salimov's user avatar
0 votes
0 answers
22 views

Custom Progressbar in android

In search of better solution for custom two side Progressbar as shown in images. the image shows progress bar with two colours indicating two different progresses. here the percentage and colour both ...
iSandeep's user avatar
  • 715

15 30 50 per page
1
2 3 4 5
220