How to make layout with rounded corners..?

1: Define layout_bg.xml in drawables: <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <solid android:color=”#FFFFFF”/> <stroke android:width=”3dp” android:color=”#B1BCBE” /> <corners android:radius=”10dp”/> <padding android:left=”0dp” android:top=”0dp” android:right=”0dp” android:bottom=”0dp” /> </shape> 2: Add layout_bg.xml as background to your layout android:background=”@drawable/layout_bg”

How to pretty print XML from the command line?

xmllint This utility comes with libxml2-utils: echo ‘<root><foo a=”b”>lorem</foo><bar value=”ipsum” /></root>’ | xmllint –format – Perl’s XML::Twig This command comes with XML::Twig perl module, sometimes xml-twig-tools package: echo ‘<root><foo a=”b”>lorem</foo><bar value=”ipsum” /></root>’ | xml_pp xmlstarlet This command comes with xmlstarlet: echo ‘<root><foo a=”b”>lorem</foo><bar value=”ipsum” /></root>’ | xmlstarlet format –indent-tab tidy Check the tidy package: echo … Read more

How can I save application settings in a Windows Forms application?

If you work with Visual Studio then it is pretty easy to get persistable settings. Right click on the project in Solution Explorer and choose Properties. Select the Settings tab and click on the hyperlink if settings doesn’t exist. Use the Settings tab to create application settings. Visual Studio creates the files Settings.settings and Settings.Designer.settings … Read more

How do I align views at the bottom of the screen?

The modern way to do this is to have a ConstraintLayout and constrain the bottom of the view to the bottom of the ConstraintLayout with app:layout_constraintBottom_toBottomOf=”parent” The example below creates a FloatingActionButton that will be aligned to the end and the bottom of the screen. <android.support.constraint.ConstraintLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_height=”match_parent” android:layout_width=”match_parent”> <android.support.design.widget.FloatingActionButton android:layout_height=”wrap_content” android:layout_width=”wrap_content” app:layout_constraintBottom_toBottomOf=”parent” … Read more

How To Auto-Format / Indent XML/HTML in Notepad++

Since I upgraded to 6.3.2, I use XML Tools. install XML Tools via the Plugin Admin (Plugins → Plugins Admin… Then search for “XML Tools”, check its box and click the “Install” button). use the shortcut Ctrl+Alt+Shift+B (or menu → Plugins → XML Tools → Pretty Print) In older versions: menu → TextFX → HTML … Read more

How do I comment out a block of tags in XML?

You can use that style of comment across multiple lines (which exists also in HTML) <detail> <band height=”20″> <!– Hello, I am a multi-line XML comment <staticText> <reportElement x=”180″ y=”0″ width=”200″ height=”20″/> <text><![CDATA[Hello World!]]></text> </staticText> –> </band> </detail>

What’s “tools:context” in Android layout files?

This is the activity the tools UI editor uses to render your layout preview. It is documented here: This attribute declares which activity this layout is associated with by default. This enables features in the editor or layout preview that require knowledge of the activity, such as what the layout theme should be in the … Read more

Text editor to open big (giant, huge, large) text files [closed]

Free read-only viewers: Large Text File Viewer (Windows) – Fully customizable theming (colors, fonts, word wrap, tab size). Supports horizontal and vertical split view. Also support file following and regex search. Very fast, simple, and has small executable size. klogg (Windows, macOS, Linux) – A maintained fork of glogg. Its main feature is regular expression … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)