How to remove all LinearLayouts from a LinearLayout?

I am, programmatically, creating a lot of LinearLayouts and putting them on another LinearLayout: public void loadList(){ LinearLayout linearLayout = (LinearLayout)findViewById(R.id.linearShowing); if(linearLayout.getChildCount() > 0) linearLayout.re

How can I convert a short [] to a duplicate []?

Now, I'm working one audio signal processing, and I want to do a real time display audio sound wave which I recorded by my phone. Here is a problem that my audio format is "ENCODING_PCM_16BIT". So how can I change 16bit short data to double form

Call the method in another thread at the end

Currently, I am using firebase Realtime Database. Hence, my data changes come from another thread. Hence, I have no control on when the fresh data update comes over. How do I then know when to call to refresh my UI? This is my implementation of a swi

Support for the difference screen size in Android

I am developing a UI which uses icons and custom circular views. According to the documentation https://developer.android.com/guide/practices/screens_support.html I have created separate drawable folders for hdpi, ldpi....xxxhdpi. Also created layout

Android - Concat 2 videos using com.netcompss.loader.LoadJNI

I'm using com.netcompss.loader.LoadJNI (FFmpeg4Android) and it was working fine until I try to concat 1 video with audio track and other video without audio track. I was using this command line: ffmpeg -y -i /storage/emulated/0/app/1.mp4 -i /storage/

Adding a text view to a relative layout in Android Studio

I have a relative layout in my XML file and it contains a button. Now I want that when I press this button, it creates 2 TextViews. Any help please because I am new to Android Studio? I have tried creating the onClickListener for the button but I am

How to send data to the server in Android? (Beginner)

I have been trying to send JSON data to the server. However, my efforts have failed since NameValuePair is deprecated. And okHttp is giving some error like okie.string not found on library classpath. Does anyone know about it?. Please suggest me some

Please install the Android target: & ldquo; android-21 & rdquo;

I have installed the latest cordova. The version is 4.3.0. I created an empty Cordova project: cordova create test com.test Test I then add the platform: cordova platform add android I built the project with: cordova build android But i always get: [

Strange logcat error when switching to a new fragment

I haven't encountered a stack trace such as this. It's particularly weird because I can only get the error to be thrown when debugging. (Running the app without debugging does not yield this error). This happens upon selecting a particular page from

How to animate the RecyclerView elements when they appear

How can I animate the RecyclerViews when there are appearing? The default item animator only animates when a data is added or removed after the recycler data has been set. I'm new developing applications, and don't have any clue where to start. Any i

Can not use TouchImageView with ViewPager

In the following code i display images with swipe action and on Tap buttons using ViewPager and ImageView. But It doesn't allow me to Zoom/Pan images. For that i got tried using TouchImageView, bt didn't succedded. My original activity is as follows:

Locate the application name

I want to localize (values-ru) strings values: textview and app_name. App localizes only textview ("Привет мир") but app_name still the same ("Localization"). What's the problem with app_name localization? App label name & activity

Unable to launch the android project on the emulator

Right now i am trying to display some text on the screen,but my project is not getting launch and i could not find the accurate reason.Has any one met this situation? Here i have given you every thing in detail for your reference.please find below LO

Are several stacked bar charts possible with Achartengine?

I tried adding another set of values to the demo example of stacked bar charts with achartengine, but the new values introduced by me don't appear on the chart. Is Stacking bars limited to two bars? public Intent getIntent(Context context) { String[]

How to hide an item in an Android Spinner

I am looking for a way to hide one item in an Android spinner widget. This would allow you to simulate a spinner with no items selected, and ensures that the onItemSelected() callback is always called for every item selected (if the hidden item is th

TypeError not caught when using a Javascript interface

I'm currently displaying a bunch of data to the user as HTML in a webview. I have some links below each entry that should call a method in my app when clicked. The Android WebView's javascript interface seems to be the best (only?) way of handling th

Flex DropDownList works weird in mobile devices

I try to use spark DropDownList Controller for flex mobile project but its not working properly. Is there any alternative solution available?You want to use <s:List/>. As said by @www.Flextras.com, DropDownLists aren't supported on mobile.

Textview does not show the full text on the Phone.linear layout

i have linear layout.inside there is textview.which sometiomes contains large information. on pc if run application with emulator it works fine but on phone whole text is not showing. left sided text is gone,cant c it,n only 1 line it is showing. i t

Automatic search as user types

I have an Activity where a user types in an EditText, hits a search button, and the app queries a web service and places the results in a ListView. I'd like to do away with the search button. Obviously I don't want every character the user types to h

The Android SDK does not compile applications correctly

It seems that the Android SDK doesn't compile my android app correctly. After building an app, I sometimes get seemingly random exceptions. The error goes away if I comment out the offending code, rebuild, uncomment the code, then rebuild again. For

Secure Android with cryptography

I'm thinking of buy an android phone, but I'm a little bit scared about the security and privacy because in my palm I had in contacts and calendar a lot of private information. First I thought it could be solved by trying to sync without google, but