Just replace from bottom and add this
tv.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
More Related Contents:
- How to make an ImageView with rounded corners?
- Can we delete an SMS in Android before it reaches the inbox?
- Android Material Design Button Styles
- How to implement Android Pull-to-Refresh
- How to prevent multiple instances of an Activity when it is launched with different Intents
- How to capture soft keyboard input in a View?
- Google sign in failed com.google.android.gms.common.api.ApiException: 10:
- How can I get a working vertical SeekBar in Android?
- How do I set up Android Studio to work completely offline?
- Can’t create AVD or test any application with AVD after update build tools to 22.6
- How to animate a path on an Android Canvas
- Forgot Keystore password, thinking of Brute-Force detection. will it corrupt the keystore?
- How to prevent going back to the previous activity?
- Why isn’t my app on the list of apps to open txt file?
- build.gradle and project libs
- Best way to manage the ProgressDialog from AsyncTask
- How to delete internal storage file in android?
- Tapping form field in WebView does not show soft keyboard
- how to add the icon for swipeable tabs
- Different row layouts in ListView
- Adding onClick Action To Button In Notification
- Can’t find AVD or SDK manager in Eclipse
- What’s the correct size icon for drawable-xxhdpi?
- How to test code built to save/restore Lifecycle of an Activity?
- Divide elements on groups in RecyclerView
- How to make an EditText uneditable/disabled
- Kotlin Extension Functions suddenly require api level 24
- Xamarin Android issue connecting via HTTPS to site with self-signed certificate: “Trust anchor for certification path not found.”
- Android Studio – processDebugResources failed
- How can I implement SSL Certificate Pinning while using React Native