android

To many arguments for public fun Fragment.findNavController()

若如初见. 提交于 2021-02-19 08:05:06
问题 import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.databinding.DataBindingUtil import androidx.drawerlayout.widget.DrawerLayout import com.example.tender.R import com.example.tender.databinding.FragmentAvailableTenderBinding import com.example.tender.databinding.FragmentLoginBinding import androidx.navigation.fragment.findNavController import androidx.navigation.ui

jump from main activity to last visited activity

不问归期 提交于 2021-02-19 07:59:39
问题 Lets suppose I am at 4th activity of my app and I have ten activities. I close the activity from 4th level now when i reopen my activity again i have a button on main activity when i click on it I must have to go on 4th activity where i left last time. Now what I do is that I saved every activity number or ID in Shared preference like that super.onCreate(savedInstanceState); setContentView(R.layout.activity_level1); SharedPreferences.Editor editor = getPreferences(Context.MODE_PRIVATE).edit()

jump from main activity to last visited activity

回眸只為那壹抹淺笑 提交于 2021-02-19 07:59:05
问题 Lets suppose I am at 4th activity of my app and I have ten activities. I close the activity from 4th level now when i reopen my activity again i have a button on main activity when i click on it I must have to go on 4th activity where i left last time. Now what I do is that I saved every activity number or ID in Shared preference like that super.onCreate(savedInstanceState); setContentView(R.layout.activity_level1); SharedPreferences.Editor editor = getPreferences(Context.MODE_PRIVATE).edit()

setColor small icon notification android

时光总嘲笑我的痴心妄想 提交于 2021-02-19 07:58:12
问题 I change the top color of the icon and the app name by using setColor method of the NotificationCompat.Builder, The problem is that the displayed color doesn't match the provided one as it gets darker in the notification. my color is #21bbe6 I did find out Android N notification title and icon color is darker, but I still don't understand why, and how to deal with it. https://imgur.com/a/6nx4EsA 回答1: Google decided to restrict acceptable colors in Notification when using setColor. It's

Sending text data via USSD in Android

倖福魔咒の 提交于 2021-02-19 07:52:11
问题 Is there a possibility to send text data via USSD in android? The only way I found was to invoke an android.intent.action.CALL intent and append the text data after as follows tel:#(short code) (bookmark) (number of pages) (page number) (MSISDN)*(text data)# e.g. tel:#161*129*1*1*5555*(text data)# But once I append text data & start the ACTION_CALL but the text data will be converted into keypad codes. That is ACL = 225. Is there any other way to piggy back text data on an USSD call without

Splitting sqlite files for syncing

蹲街弑〆低调 提交于 2021-02-19 07:49:06
问题 I am writing an Android app that collects data from sensors and stores it in a local SQLite database. What I'd like to do is sync this data (read: upload) with a backend application (I am using Android's Sync Adapter for this). Since the data can be acquired during the sync process, I think it is reasonable to set the maximum size for the sqlite file to say 700 Kb (doesn't really matter), so the sync adapter will synchronise those 700 Kb files (via POST request) excluding the active one. And

Xamarin.Android, AndroidManifest.xml, AndroidManifestMerger, xmlns:tools schema, replace always manually

烂漫一生 提交于 2021-02-19 07:49:05
问题 When compile my Xamarin Forms Android application, visual studio, show me an error's list of AndroidManifest.xml conflict, for example: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error AMM0000: is also present at AndroidManifest.xml:14:9-41 value=(@string/app_name). (AMM0000) /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error AMM0000: Suggestion: add 'tools:replace="android

How to get EditText value to textview at the time of typing without button click in android [closed]

穿精又带淫゛_ 提交于 2021-02-19 07:48:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Improve this question How to read data from EditText to textview at user input without button click 回答1: Try using textwatcher on Edittext and update textview using available methods. TextWatcher textWatcher = new TextWatcher() { @Override public void beforeTextChanged

Opencv fullscreen using CameraBridgeViewBase android

坚强是说给别人听的谎言 提交于 2021-02-19 07:41:22
问题 i am trying to set up Opencv on android using the given tutorials as the base. i havenot been able to control the video size on the screen, i want to enlarge it to full screen. i am using the CameraBridgeViewBase object as the VideoCapture object does not work. does anyone know how to set up the picture to be full screen? relevant code: public class Sample3Native extends Activity implements CvCameraViewListener { private static final String TAG = "OCVSample::Activity"; private Mat mRgba;