Click here to Skip to main content
15,513,143 members
Home / Discussions / Android
   

Android

 
AnswerRe: Kotlin Interface Listener inheritance Error Pin
SeanChupas6-Apr-21 3:14
SeanChupas6-Apr-21 3:14 
QuestionRe: Kotlin Interface Listener inheritance Error Pin
David Crow6-Apr-21 3:22
David Crow6-Apr-21 3:22 
QuestionImplement AsyncTask Pin
paradox029-Mar-21 23:02
paradox029-Mar-21 23:02 
QuestionRe: Implement AsyncTask Pin
David Crow8-Apr-21 5:33
David Crow8-Apr-21 5:33 
AnswerRe: Implement AsyncTask Pin
James_Carter42023-May-21 5:14
James_Carter42023-May-21 5:14 
QuestionAndroid Studio oddity Pin
David Crow3-Mar-21 5:08
David Crow3-Mar-21 5:08 
AnswerRe: Android Studio oddity Pin
Richard MacCutchan3-Mar-21 5:52
mveRichard MacCutchan3-Mar-21 5:52 
Questionhow to add a button in one the navigation drawer fragment so that when the user click he is directed to another sub fragment of that previous fragment Pin
George S Mulbah II2-Mar-21 16:55
George S Mulbah II2-Mar-21 16:55 
how to add button in the of the menu item fragment of the navigation drawer so that when the user click on the button he is redirected to anther sub fragment but one issue here is I am using the android custom navigation drawer implementation below is my try


package com.example.entertainmentlab.ui.store;
    
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.ImageView;
    import android.widget.TextView;
    import android.widget.Toast;
    
    import androidx.annotation.NonNull;
    import androidx.annotation.Nullable;
    import androidx.fragment.app.Fragment;
    import androidx.fragment.app.FragmentManager;
    import androidx.fragment.app.FragmentTransaction;
    import androidx.lifecycle.Observer;
    import androidx.lifecycle.ViewModelProviders;
    
    import com.example.entertainmentlab.R;
    import com.example.entertainmentlab.ui.setting.SettingViewModel;
    
    public class StoreFragment extends Fragment {
    
        private StoreViewModel StoreViewModel;
    
        public View onCreateView(@NonNull LayoutInflater inflater,
                                 ViewGroup container, Bundle savedInstanceState) {
            StoreViewModel =
                    ViewModelProviders.of(this).get(StoreViewModel.class);
            View root = inflater.inflate(R.layout.fragment_store, container, false);
           final ImageView MusicButton = root.findViewById(R.id.music_btn);
    
    
    
    
    
    
    
            MusicButton.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View v) {
                   try {
    
                       Fragment fragment = new BlankFragment();
                       FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
                       FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
                       fragmentTransaction.replace(R.id.nav_host_fragment_container, fragment);
                       fragmentTransaction.addToBackStack(null);
                       fragmentTransaction.commit();
                   }catch (Exception e ){
                       Toast.makeText(getActivity(), "erro  "+e, Toast.LENGTH_SHORT).show();
                   }
               }
           });
    //        StoreViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
    //            @Override
    //            public void onChanged(@Nullable String s) {
    //                textView.setText(s);
    //            }
    //        });
            return root;

QuestionRe: how to add a button in one the navigation drawer fragment so that when the user click he is directed to another sub fragment of that previous fragment Pin
David Crow3-Mar-21 3:35
David Crow3-Mar-21 3:35 
QuestionXamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 7:13
professionalKevin Marois16-Feb-21 7:13 
AnswerRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 7:19
mveRichard Deeming16-Feb-21 7:19 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 10:36
professionalKevin Marois16-Feb-21 10:36 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 23:08
mveRichard Deeming16-Feb-21 23:08 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois17-Feb-21 6:45
professionalKevin Marois17-Feb-21 6:45 
QuestionI cannot play videos Google Drive, the error “Whoops! there was a problem playing this video” appears. Pin
Otis Ryder24-Jan-21 23:49
Otis Ryder24-Jan-21 23:49 
QuestionLooking for a collaborator on a group project. Pin
FelipeRodas8624-Jan-21 10:46
FelipeRodas8624-Jan-21 10:46 
AnswerRe: Looking for a collaborator on a group project. Pin
Nathan-Albert Wallace28-Jul-22 23:04
Nathan-Albert Wallace28-Jul-22 23:04 
QuestionSuitable Laptop Model for Android Development Pin
phoohtoo19-Jan-21 1:19
phoohtoo19-Jan-21 1:19 
AnswerRe: Suitable Laptop Model for Android Development Pin
Richard MacCutchan19-Jan-21 1:49
mveRichard MacCutchan19-Jan-21 1:49 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo19-Jan-21 3:21
phoohtoo19-Jan-21 3:21 
GeneralRe: Suitable Laptop Model for Android Development Pin
Richard MacCutchan19-Jan-21 4:45
mveRichard MacCutchan19-Jan-21 4:45 
AnswerRe: Suitable Laptop Model for Android Development Pin
David Crow19-Jan-21 5:06
David Crow19-Jan-21 5:06 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo20-Jan-21 6:21
phoohtoo20-Jan-21 6:21 
AnswerRe: Suitable Laptop Model for Android Development Pin
thatraja19-Jan-21 6:41
professionalthatraja19-Jan-21 6:41 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo20-Jan-21 6:19
phoohtoo20-Jan-21 6:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.