Click here to Skip to main content
15,867,985 members
Home / Discussions / Android
   

Android

 
AnswerRe: Kotlin Interface Listener inheritance Error Pin
SeanChupas6-Apr-21 2:14
SeanChupas6-Apr-21 2:14 
QuestionRe: Kotlin Interface Listener inheritance Error Pin
David Crow6-Apr-21 2:22
David Crow6-Apr-21 2:22 
QuestionImplement AsyncTask Pin
paradox029-Mar-21 22:02
paradox029-Mar-21 22:02 
QuestionRe: Implement AsyncTask Pin
David Crow8-Apr-21 4:33
David Crow8-Apr-21 4:33 
AnswerRe: Implement AsyncTask Pin
James_Carter42023-May-21 4:14
James_Carter42023-May-21 4:14 
QuestionAndroid Studio oddity Pin
David Crow3-Mar-21 4:08
David Crow3-Mar-21 4:08 
AnswerRe: Android Studio oddity Pin
Richard MacCutchan3-Mar-21 4:52
mveRichard MacCutchan3-Mar-21 4: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 15:55
George S Mulbah II2-Mar-21 15: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 2:35
David Crow3-Mar-21 2:35 
QuestionXamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 6:13
professionalKevin Marois16-Feb-21 6:13 
AnswerRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 6:19
mveRichard Deeming16-Feb-21 6:19 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois16-Feb-21 9:36
professionalKevin Marois16-Feb-21 9:36 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Richard Deeming16-Feb-21 22:08
mveRichard Deeming16-Feb-21 22:08 
GeneralRe: Xamarin Forms API - Can't Connect Pin
Kevin Marois17-Feb-21 5:45
professionalKevin Marois17-Feb-21 5:45 
QuestionI cannot play videos Google Drive, the error “Whoops! there was a problem playing this video” appears. Pin
Otis Ryder24-Jan-21 22:49
Otis Ryder24-Jan-21 22:49 
QuestionLooking for a collaborator on a group project. Pin
FelipeRodas8624-Jan-21 9:46
FelipeRodas8624-Jan-21 9:46 
AnswerRe: Looking for a collaborator on a group project. Pin
Nathan-Albert Wallace28-Jul-22 22:04
Nathan-Albert Wallace28-Jul-22 22:04 
QuestionSuitable Laptop Model for Android Development Pin
phoohtoo19-Jan-21 0:19
phoohtoo19-Jan-21 0:19 
AnswerRe: Suitable Laptop Model for Android Development Pin
Richard MacCutchan19-Jan-21 0:49
mveRichard MacCutchan19-Jan-21 0:49 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo19-Jan-21 2:21
phoohtoo19-Jan-21 2:21 
GeneralRe: Suitable Laptop Model for Android Development Pin
Richard MacCutchan19-Jan-21 3:45
mveRichard MacCutchan19-Jan-21 3:45 
AnswerRe: Suitable Laptop Model for Android Development Pin
David Crow19-Jan-21 4:06
David Crow19-Jan-21 4:06 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo20-Jan-21 5:21
phoohtoo20-Jan-21 5:21 
AnswerRe: Suitable Laptop Model for Android Development Pin
thatraja19-Jan-21 5:41
professionalthatraja19-Jan-21 5:41 
GeneralRe: Suitable Laptop Model for Android Development Pin
phoohtoo20-Jan-21 5:19
phoohtoo20-Jan-21 5: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.