Click here to Skip to main content
14,700,256 members
Home » Discussions » Android
   

Android

 
AnswerRe: Responding to hardware buttons. Pin
Richard MacCutchan8-Mar-18 0:12
mveRichard MacCutchan8-Mar-18 0:12 
GeneralRe: Responding to hardware buttons. Pin
droiddev8-Mar-18 9:31
Memberdroiddev8-Mar-18 9:31 
GeneralRe: Responding to hardware buttons. Pin
Richard MacCutchan8-Mar-18 9:34
mveRichard MacCutchan8-Mar-18 9:34 
AnswerRe: Responding to hardware buttons. [SOLVED] Pin
droiddev9-Mar-18 18:19
Memberdroiddev9-Mar-18 18:19 
GeneralRe: Responding to hardware buttons. [SOLVED] Pin
Richard MacCutchan9-Mar-18 22:59
mveRichard MacCutchan9-Mar-18 22:59 
QuestionDisable "Clear Cache" For My Android App Pin
Django_Untaken18-Feb-18 20:42
MemberDjango_Untaken18-Feb-18 20:42 
AnswerRe: Disable "Clear Cache" For My Android App Pin
Nick_314159265410-Mar-18 0:43
MemberNick_314159265410-Mar-18 0:43 
QuestionRotated Dragshadow (c#) Pin
Member 1368201316-Feb-18 10:15
MemberMember 1368201316-Feb-18 10:15 
I have an rotated textview and I want to drag and drop this view.
The problem is that the drag shadow has no rotation.

I found a solution for android in java but this does not work for me. 
Maybe I translate the code wrong 

<a href="https://stackoverflow.com/questions/17049938/how-to-drag-a-rotated-dragshadow"></a>[<a href="https://stackoverflow.com/questions/17049938/how-to-drag-a-rotated-dragshadow" target="_blank" title="New Window">^</a>]

        class CustomDragShdowBuilder : View.DragShadowBuilder
            {
                private View _view;
                public CustomDragShdowBuilder(View view)
                {
                    _view = view;
                }
        
        
                public override void OnDrawShadow(Canvas canvas)
                {
                    double rotationRad = Math.ToRadians(_view.Rotation);
                    int w = (int)(_view.Width * _view.ScaleX);
                    int h = (int)(_view.Height * _view.ScaleY);
                    double s = Math.Abs(Math.Sin(rotationRad));
                    double c = Math.Abs(Math.Cos(rotationRad));
        
                    int width = (int)(w * c + h * s);
                    int height = (int)(w * s + h * c);
        
                    canvas.Scale(_view.ScaleX, _view.ScaleY, width / 2, height / 2);
                    canvas.Rotate(_view.Rotation, width / 2, height / 2);
                    canvas.Translate((width - _view.Width) / 2, (height - _view.Height) / 2);
        
                    base.OnDrawShadow(canvas);
                }
        
                public override void OnProvideShadowMetrics(Point shadowSize, Point shadowTouchPoint)
                {
                    shadowTouchPoint.Set(shadowSize.X / 2, shadowSize.Y / 2);
                    base.OnProvideShadowMetrics(shadowSize, shadowTouchPoint);
                }

QuestionImage Recognition using opencv in android Pin
Member 136244197-Feb-18 20:54
MemberMember 136244197-Feb-18 20:54 
AnswerRe: Image Recognition using opencv in android Pin
Richard MacCutchan7-Feb-18 23:15
mveRichard MacCutchan7-Feb-18 23:15 
SuggestionRe: Image Recognition using opencv in android Pin
David Crow8-Feb-18 5:54
MemberDavid Crow8-Feb-18 5:54 
QuestionIP connections Pin
Member 136525092-Feb-18 15:40
MemberMember 136525092-Feb-18 15:40 
AnswerRe: IP connections Pin
Richard MacCutchan2-Feb-18 23:00
mveRichard MacCutchan2-Feb-18 23:00 
QuestionListe Contact Pin
Member 1355263722-Jan-18 17:34
MemberMember 1355263722-Jan-18 17:34 
AnswerRe: Liste Contact Pin
Richard MacCutchan22-Jan-18 22:50
mveRichard MacCutchan22-Jan-18 22:50 
QuestionNetwork Pin
Midi_Mick22-Jan-18 16:21
professionalMidi_Mick22-Jan-18 16:21 
AnswerRe: Network Pin
Richard MacCutchan22-Jan-18 22:50
mveRichard MacCutchan22-Jan-18 22:50 
GeneralRe: Network Pin
Midi_Mick23-Jan-18 6:52
professionalMidi_Mick23-Jan-18 6:52 
GeneralRe: Network Pin
Midi_Mick24-Jan-18 14:27
professionalMidi_Mick24-Jan-18 14:27 
QuestionRe: Network Pin
David Crow23-Jan-18 4:02
MemberDavid Crow23-Jan-18 4:02 
AnswerRe: Network Pin
Midi_Mick23-Jan-18 6:58
professionalMidi_Mick23-Jan-18 6:58 
QuestionRe: Network Pin
David Crow23-Jan-18 7:01
MemberDavid Crow23-Jan-18 7:01 
AnswerRe: Network Pin
Midi_Mick23-Jan-18 7:13
professionalMidi_Mick23-Jan-18 7:13 
QuestionRe: Network Pin
David Crow23-Jan-18 7:18
MemberDavid Crow23-Jan-18 7:18 
AnswerRe: Network Pin
Midi_Mick23-Jan-18 7:26
professionalMidi_Mick23-Jan-18 7:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.