Posts

Android Studio Set Weight Layout Programatically

Image
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, //OR WRAP_CONTENT -> layout_width LayoutParams.MATCH_PARENT, //OR WRAP_CONTENT -> layout_height 1.0f // layout_weight 1 ); YOUR_VIEW.setLayoutParams(param);

Git CLI Delete History Commit

Image
Checkout git checkout --orphan latest_branch Add all the files git add -A Commit the changes git commit -am "commit message" Delete the branch git branch -D master Rename the current branch to master git branch -m master Finally, force update your repository git push -f origin master

Build Gradle Component Definitions

Image
Common Gradle Command Prompt Command Description ./gradlew build build project, runs both the assemble and check task ./gradlew clean build build project complete from scratch ./gradlew clean build build project complete from scratch ./gradlew test