Click here to Skip to main content
15,302,185 members
Home / Discussions / Android
   

Android

 
GeneralRe: How to use .net Webservice in Android?? Pin
Member 1502640220-Dec-20 20:44
MemberMember 1502640220-Dec-20 20:44 
AnswerRe: How to use .net Webservice in Android?? Pin
OriginalGriff20-Dec-20 20:47
mveOriginalGriff20-Dec-20 20:47 
QuestionRF (Radio Frequency) Device Scan & Warehouse Management System Pin
johncodeproject16-Dec-20 19:42
Memberjohncodeproject16-Dec-20 19:42 
AnswerRe: RF (Radio Frequency) Device Scan & Warehouse Management System Pin
davidgermain18-Dec-20 1:44
Memberdavidgermain18-Dec-20 1:44 
QuestionAndroid studio ListView Pin
Shuhrat Rahimov16-Oct-20 19:28
MemberShuhrat Rahimov16-Oct-20 19:28 
AnswerRe: Android studio ListView Pin
OriginalGriff16-Oct-20 20:21
mveOriginalGriff16-Oct-20 20:21 
AnswerRe: Android studio ListView Pin
Richard MacCutchan16-Oct-20 21:54
mveRichard MacCutchan16-Oct-20 21:54 
Questionandroid put loading message when load another acitvity Pin
GongTji17-Sep-20 1:29
MemberGongTji17-Sep-20 1:29 
Hello everyone,

First I'm new here once again hello all.

Actually my question is very simple and I'm new in android,

How to put loading message (whether text or progress bar) after user click on new activity,

I have 2 activity both are: MainActivity and DashboardActivity

Here's MainActivity code :
Java
public class MainActivity extends AppCompatActivity {
   @Override
   protected void onCreate(Bundle savedInstanceState)
   {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_main);

   findViewById(R.id.textViewTest).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            finish();
            startActivity(new Intent(MainActivity.this, DashboardActivity.class));
        }
    });
  }
}

DashboardActivity
Java
public class DashboardActivity extends AppCompatActivity
{
    private Toolbar mTopToolbar;
    private AppBarConfiguration mAppBarConfiguration;
    private NavigationView navigationView;
    private int progressStatus = 0;
    private Handler handler = new Handler();
    private ProgressBar progressBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_drawer);

        // Find the toolbar view inside the activity layout
        Toolbar toolbar = findViewById(R.id.toolbar);
        // Sets the Toolbar to act as the ActionBar for this Activity window.
        // Make sure the toolbar exists in the activity and is not null
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayShowTitleEnabled(false);

        DrawerLayout drawer = findViewById(R.id.drawer_layout);
        navigationView = findViewById(R.id.nav_view);
        View hview = navigationView.getHeaderView(0);

        // Passing each menu ID as a set of Ids because each
        // menu should be considered as top level destinations.
        mAppBarConfiguration = new AppBarConfiguration.Builder(
                R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow)
                .setOpenableLayout(drawer)
                .build();
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
        NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
        NavigationUI.setupWithNavController(navigationView, navController);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main_menu, menu);
        return true;
    }

    @Override
    public boolean onSupportNavigateUp() {
        NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
        return NavigationUI.navigateUp(navController, mAppBarConfiguration)
                || super.onSupportNavigateUp();
    }
/* end class */
}


When I open dashboard activity it's show blank page approximately 4 - 5 sec before content loaded completely.

Q : My expectation is how to display loading text or progressbar when Dashboard activity blank / still loading?

please help

Thanks
QuestionRe: android put loading message when load another acitvity Pin
David Crow17-Sep-20 4:36
MemberDavid Crow17-Sep-20 4:36 
AnswerRe: android put loading message when load another acitvity Pin
GongTji20-Sep-20 0:27
MemberGongTji20-Sep-20 0:27 
GeneralRe: android put loading message when load another acitvity Pin
David Crow20-Sep-20 4:45
MemberDavid Crow20-Sep-20 4:45 
QuestionHiring Programmer for Android apps. Pin
User 149000167-Sep-20 19:56
MemberUser 149000167-Sep-20 19:56 
AnswerRe: Hiring Programmer for Android apps. Pin
OriginalGriff7-Sep-20 19:59
mveOriginalGriff7-Sep-20 19:59 
GeneralRe: Hiring Programmer for Android apps. Pin
User 149000168-Sep-20 15:23
MemberUser 149000168-Sep-20 15:23 
GeneralRe: Hiring Programmer for Android apps. Pin
Richard MacCutchan8-Sep-20 21:36
mveRichard MacCutchan8-Sep-20 21:36 
GeneralRe: Hiring Programmer for Android apps. Pin
User 1490001610-Sep-20 8:18
MemberUser 1490001610-Sep-20 8:18 
GeneralRe: Hiring Programmer for Android apps. Pin
Richard MacCutchan10-Sep-20 9:19
mveRichard MacCutchan10-Sep-20 9:19 
GeneralRe: Hiring Programmer for Android apps. Pin
klindouchous30-Dec-20 7:14
Memberklindouchous30-Dec-20 7:14 
GeneralRe: Hiring Programmer for Android apps. Pin
thinkstartpl27-Apr-21 2:50
professionalthinkstartpl27-Apr-21 2:50 
AnswerRe: The popular and free movie viewing app for android? Pin
Richard MacCutchan8-Aug-20 23:06
mveRichard MacCutchan8-Aug-20 23:06 
QuestionXamarin Forms App Calling Web API Pin Pin
Kevin Marois20-Jul-20 7:26
professionalKevin Marois20-Jul-20 7:26 
AnswerRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming20-Jul-20 21:38
mveRichard Deeming20-Jul-20 21:38 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois21-Jul-20 6:22
professionalKevin Marois21-Jul-20 6:22 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Richard Deeming21-Jul-20 6:56
mveRichard Deeming21-Jul-20 6:56 
GeneralRe: Xamarin Forms App Calling Web API Pin Pin
Kevin Marois21-Jul-20 6:58
professionalKevin Marois21-Jul-20 6:58 

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.