[Solved] Cardview onclick opens a new activity

you can send id with Intent.putExtra and then get it with Intent.getIntExtra in your activity and provide your data in activity Here is an example that sending id and index to MyActtivity if youre using ListView: AdapterView.OnItemClickListener onItemClickListener = new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent … Read more

[Solved] what is difference between onCreateView() and getView(),Can I use these in Activity()?

Here is description o these methods from Google Developer website: onCreate() It gets called when the activity is starting. This is where most initialization should go: calling setContentView(int) to inflate the activity’s UI, using findViewById(int) to programmatically interact with widgets in the UI, calling managedQuery(android.net.Uri, String[], String, String[], String) to retrieve cursors for data being … Read more

[Solved] How to load html files as items in listview.?

I found the answer to the problem! I had declared Webview, identifying it before onCreate method in my Second Activity, which has resulted in this problem.! Also in the code, which had provided previously, as putExtra(“stringname”, “value”); And so, after getting extras, in Bundle extras.getExtra(“stringname”); is enough and had previously messed up in that place.! … Read more

[Solved] Application crashes when activity starts

It looks like you need to add “internet” permission to your AndroidManifest.xml: android.permission.INTERNET E/AndroidRuntime(306): at For example: <manifest xlmns:android…> … <uses-permission android:name=”android.permission.INTERNET”></uses-permission> </manifest> 1 solved Application crashes when activity starts

[Solved] How to pass a text from one activity to all activities?

Just store the text as string in shared preferences and then get the string in other activities.. or you can also use broadcast receiver in all other activities. But first all the activities should call the receiver first then the MainActivity can send the text. In MainActivity, this.getSharedPreferences(“MyPrefName”, Context.MODE_PRIVATE).edit().putString(“parsetext”,”yourtext”).apply(); and in the other activities.. this.getSharedPreferences(“MyPrefName”, … Read more

[Solved] How to make launch of application

you must do some changes your manifest. Do changes in launcher or default activity like below: <activity android:name=”.MainActivity” android:configChanges=”keyboardHidden|orientation|keyboard|screenSize” android:windowSoftInputMode=”stateHidden”> <intent-filter> <action android:name=”android.intent.action.VIEW” /> <category android:name=”android.intent.category.BROWSABLE” /> <category android:name=”android.intent.category.DEFAULT” /> <data android:host=”yoursitedomain.com” android:scheme=”http” /> <data android:host=”www.yoursitedomain.com” android:scheme=”http” /> </intent-filter> </activity> BROWSABLE and data tags help you. 2 solved How to make launch of application

[Solved] Listview filling from database

Your question is a bit too generic and not clearly defined. That’s probably why it got down voted. I’d say your best bet is to start with the documentation. Start by reading about ListView and possibly Adapter and try it yourself. If you still have problems, ask a specific question about something you don’t understand … Read more