How to read the Android documentation correctly
I been googling on how to read the Android documentation in a correct way but there is no helpful website. If you guys know on how to read the Android documentation in a correct way and when to read it please share it with me.
1 answer
-
answered 2021-04-08 03:26
Juan Barreto
I don't know if this can be helpful for you, but there's a website called Android Developers, and there you can find a guide about android development with its documentation
See also questions close to this topic
-
How to set max lenght message on edittext on android
waht I am trying to do is set a massage o max characters on an edittext. So far I have find out the TextInputLayout, but it is no quite what I need. The edittext is a big field, so I am trying to set a message at the bottom right corner of the edittex that says "max input 120" but inside the edittext, not on the outside. This is what I have so far
<com.google.android.material.textfield.TextInputLayout android:id="@+id/til_title" android:layout_width="match_parent" android:layout_height="350dp" app:counterEnabled="true" app:counterMaxLength="120" > <com.google.android.material.textfield.TextInputEditText android:id="@+id/edtComnent" android:layout_width="match_parent" android:layout_height="300dp" android:hint="write your comments here" android:textSize="@dimen/font_size_2" android:gravity="top" android:padding="15dp" android:maxLength="120"/> </com.google.android.material.textfield.TextInputLayout>
But like I said, it does no quite match my needs. Any help or suggestion would be great, thanks
-
How to pass an value from an activity to a java class in android?
Here an application to send email by getting the "Receiver" from the user but don't know how to pass the intent from an activity to a java class. Please help. I need to send email from a default sender to the receiver who i am entering in the editText. This is the code.
MainActivity.java public class MainActivity extends AppCompatActivity{ EditText e1; String emailid; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); e1=findViewById(R.id.editTextTextEmailAddress); emailid=e1.getText().toString(); } public void sendMail(View view) { try { Intent intent = new Intent(MainActivity.this,LongOperation.class); intent.putExtra("emailid",emailid); startActivity(intent); //Toast.makeText(this,"Execute", Toast.LENGTH_SHORT).show(); LongOperation l=new LongOperation(); Toast.makeText(this, l.get(), Toast.LENGTH_SHORT).show(); // Toast.makeText(this,"Execute bg", Toast.LENGTH_SHORT).show(); l.execute(); //sends the email in background // Toast.makeText(this,"Execute send ", Toast.LENGTH_SHORT).show(); } catch (Exception e) { Log.e("SendMail", e.getMessage(), e); } } }
activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <EditText android:id="@+id/editTextTextEmailAddress" android:layout_width="389dp" android:layout_height="102dp" android:ems="10" android:inputType="textEmailAddress" /> <Button android:layout_width="265dp" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginEnd="94dp" android:layout_marginRight="94dp" android:layout_marginBottom="429dp" android:onClick="sendMail" android:text="send mail" /> </RelativeLayout>
LongOperation.java
public class LongOperation extends AsyncTask<Void, Void, String> { public Intent intent = getIntent(); public Intent getIntent() { String e = intent.getStringExtra("emailid"); return null; } @Override public String doInBackground (Void...params){ try { Intent intent = getIntent(); String a = intent.getStringExtra("emailid"); //give your gmail id and password GMailSender sender = new GMailSender("testing@gmail.com", "yourpassword"); sender.sendMail("This is a testing mail", "This is Body of testing mail", sender:"testing@gmail.com",receiver:a); } catch (Exception e) { Log.e("error", e.getMessage(), e); return "Email Not Sent"; } return "Email Sent"; } @Override protected void onPostExecute(String result) { Log.e("LongOperation",result+""); } @Override protected void onPreExecute() { } @Override protected void onProgressUpdate(Void... values) { }
-
Including OpenCV in custom Android Library but getting errors when trying to load in sample app: attribute camera_id and attribute show_fps not found
I am not sure if this is even possible or if I would have to include OpenCV as a dependency in the project which is using my library but I am trying to bake OpenCv functionality into my Android .aar library file. All of the OpenCV functions are in one single Activity (located in the library) which is then being called from the sample app for my SDK. The sample is only including my .aar file, which in turn is including OpenCV 4.5.1 (in the library project not the sample app). I am not able to build my sample app because I am getting the following errors: AAPT: error: attribute show_fps not found. and AAPT: error: attribute camera_id not found. The code for the resource that is failing is as follows:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:opencv="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:configChanges="keyboardHidden|orientation|screenSize" android:screenOrientation="landscape"> <org.opencv.android.JavaCameraView android:id="@+id/FrontLicenseCapture" android:layout_width="fill_parent" android:layout_height="fill_parent" android:visibility="invisible" opencv:camera_id="any" opencv:show_fps="true" />
Is what I am doing even possible or will any app that uses my SDK also have to include the OpenCV library as a dependency? Ideally I would like to minimize the requirements for the end-user, meaning I would not want to require them to install and include the OpenCV library in their app (or my sample app). I found a lot of topics related to this error but none which seemed to include this exact scenario. Any help would be greatly appreciated.
-
Whatsapp mod users
Now a days moded whatsapp application have become a craze and all of my freinds usses them but it makes difficult know that have they seen our message or status as the blue tick and status view are hidden, is there anything above this gb/moded whastapp aplication which can monitor thid moded usser or any legit way to get this users banned.
Review
-
Concept of creating link in android apps
I a developing an chatting app in native android in that when an user creates an group he/she can share the group link so that other app users can also join in this group(Similar to WhatsApp). I want to implement this in my app. How this is made what is the concept behind it?
- Get option of multiple activities from phone launcher?