Android EditText Settings Editable, Non-Editable and Click Events

1. Set up non-editable and clickable events 2. Set non-editable and no click event 3. Set Editable 4. Source Code 4.1 XML Layout 4.2 Java Code V. Summary 1. Set up non-editable and clickable events public void setCanNotEditAndClick(View view) { etContent.setFocusable(false); etContent.setFocus ...

Posted by talper on Fri, 10 Jan 2020 11:18:04 -0800

Drawing a rectangle with a brush and canvas in Android

scene In Android, the brush uses the Paint class, and the Canvas uses the Canvas class to represent it. Basic steps of drawing First, write a custom view class inherited from view, then rewrite its onDraw method, and finally add the custom view to actvity. Effect     Note: Blog: https://blog.csdn.net/badao_liumang_qizhi Pay attention to the ...

Posted by o2cathy on Fri, 10 Jan 2020 09:56:39 -0800

Xuteng echo "something" > > / etc / privilegedFile does not work

This is a very simple question about sudo permission in Linux, at least it should be. Many times, I just want to append some content to / etc/hosts or similar files, but I can't do it in the end, because even if I use root, I can't use > and > > at the same time. Is there a way to make this work without su or sudo su becoming ro ...

Posted by PHPist on Fri, 10 Jan 2020 07:03:46 -0800

Difference between view fill and margin

What is the difference between the margin and fill of the view? #1st floor Filling is the space within the boundary between the boundary and the actual image or cell contents.A boundary is the space outside the boundary between the boundary and other elements next to the object. #2nd floor Sometimes you can achieve the same result b ...

Posted by jlive on Thu, 09 Jan 2020 18:54:14 -0800

Using Notification in Android to display notifications on the status bar

scene Show notification effect on status bar     Note: Blog: https://blog.csdn.net/badao_liumang_qizhiPay attention to the public address Domineering procedural ape Get programming related ebooks, tutorials and free downloads. Realization Create a new NotificationActivity and get the notification manager through the getSystemService method. T ...

Posted by tested_123 on Thu, 09 Jan 2020 10:47:41 -0800

Naive Bayes algorithm: News Classification (Sklearn Implementation)

1. Steps of news classification based on Naive Bayes (1) Provide text file, i.e Dataset Download (2) Prepare data The data set is divided into training set and test set, and the jieba module is used for word segmentation, word frequency statistics, stop word filtering, text feature extraction, and text data is quantified Stop word text Stopword ...

Posted by AdRock on Thu, 09 Jan 2020 08:16:32 -0800

fmt.Printf of Golang Foundation

background When printing in go language, we often see different printing methods, such as println, fmt.Println and fmt.Printf Differences and usage Source code of fmt.Println // Println formats using the default formats for its operands and writes to standard output. // Spaces are always added between operands and a newline is appended. ...

Posted by Byron on Wed, 08 Jan 2020 07:18:43 -0800

C#Dependent Injection

1. What is Dependent Injection Formal definition of dependency injection: Dependency Injection is the process in which a customer class defines only one injection point because it depends on only one interface of a service class and not on a specific service class.In the process of running the program, the client class does not instantiate th ...

Posted by rushdot on Tue, 07 Jan 2020 04:54:38 -0800

Three ways to create a Bean

1, Call the default parameterless constructor to create (common) bean object: Car.java package com.zj; public class Car { private String brand; private double price; public Car(){ System.out.println("Car Object created "); } public String getBrand() { return brand; } public voi ...

Posted by dacio on Mon, 06 Jan 2020 21:16:04 -0800

Click the button in Android to get the score of star rating bar

scene Effect     Note: Blog: https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public address Domineering procedural ape Get programming related ebooks, tutorials and free downloads. Realization Change the layout to LinearLayout and set it to vertical layout through Android: orientation = "vertical" > then add a Rat ...

Posted by cyberplasma on Mon, 06 Jan 2020 10:37:51 -0800