Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainActivity extends AppCompatActivity {
- private String[] Name_Item;
- private int index;
- private ImageButton btnMore;
- private boolean detectNetwork ;
- private MyListData[] myListData ;
- private SharedPref sharedpref;
- private final Handler mHandler = new Handler();
- Snackbar snackbar ;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- sharedpref = new SharedPref(this);
- if(sharedpref.loadNightModeState()) {
- setTheme(R.style.darktheme);
- }
- else setTheme(R.style.AppTheme);
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- // Setup Custom Consent
- // check font
- FontControle fontControle= new FontControle(this);
- fontControle.checked();
- //toolbar
- Toolbar toolbar = findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
- toolbar.showOverflowMenu();
- detectNetwork= new Utils(this).isConnectingToInternet();
- LinearLayout showMore = findViewById(R.id.ShowMore);
- btnMore= findViewById(R.id.btnShowMore);
- Name_Item=getResources().getStringArray(R.array.Name_item);
- index =sharedpref.LoadInt("index");
- int maxindex = Integer.parseInt(getString(R.string.MaxIndex));
- if (index== -1){
- sharedpref.SaveInt("index",6);
- index=6;
- if (maxindex ==6) showMore.setVisibility(View.GONE);
- }else if (index== maxindex) showMore.setVisibility(View.GONE);
- //ads Banner
- if (AdsConfig.ENABLE_ADMOB)
- AdsBanner.newInstance(this).loadBannerAdView((FrameLayout) findViewById(R.id.layout_ad));
- else
- AdsBanner.newInstance(this).LoadBannerFbview( findViewById(R.id.ad_applovin));
- Takeguide();
- mHandler.postDelayed(mUpdateTimeTask, 200);
- btnMore.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (detectNetwork) {
- new AlertDialog.Builder(MainActivity.this)
- .setTitle("Show More")
- .setMessage("Watch video ads for show more?")
- .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- }
- })
- .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- dialog.cancel();
- }
- })
- .setIcon(android.R.drawable.ic_dialog_alert)
- .show();
- } else {
- snackBar("No Internet ,Enable wifi or connection network");
- }
- }});
- // TODO : Change item content 0 -> 5 = 6 items
- myListData = new MyListData[index];
- myListData[0]= new MyListData(Name_Item[0], R.drawable.a0,"We're going to start first with the topways to make serious money online (with a long-term focus).If you’re looking to build a true online business, or start a side business idea that has the potential to truly change your life " +
- "(and you're not afraid of investing months & years of work into the business), this where you should start.",
- " One last quick thing to note before we dive in: I’m going to be talking a lot about your niche for every way of making money online that we cover here. \n" +
- "If you’re unfamiliar with this term, all it means is your unique topic, angle, market, audience, or voice that will make people\n" +
- " stand up and notice your business.\n" +
- "It’s a competitive space online, and the more you can differentiate what you do from what’s out there already, the better chance you’ll have for success.\n" +
- "Alright, now let’s get into my ultimate guide of how to make money online."
- ,R.drawable.guid0);
- myListData[1]= new MyListData(Name_Item[1], R.drawable.a1,"\n" +
- "If finding a better solution to a problem hundreds or thousands of people have doesn’t seem like an option right now, you might be better off setting up a virtual shop and selling physical items.\n" +
- "\n" +
- "These days, this couldn’t be easier. Sites like Shopify have made it easier than ever to build a customizable, powerful eCommerce site in a weekend and start selling products now.\n" +
- "\n" +
- "This is probably one of the oldest and most time-tested ways of making money online. Plenty of digital entrepreneurs have created sustainable businesses by either:\n" +
- "\n" +
- "Creating physical products they know people in their niche will love\n" +
- "Purchasing low cost goods manufactured in foreign countries, repackaging or combining them with other products, and selling them for higher prices on domestic online marketplaces\n" +
- "While you’ll certainly have higher levels of success if you can nail creating and marketing your own unique product, from my own experience (and that of many other entrepreneurs), I know the extremely high costs and risk associated with starting a product-based business.\n" +
- "\n" +
- "Instead, if you can find a solid product that’s already being manufactured at a reasonable price from a marketplace like AliExpress, LightInTheBox, or DinoDirect and market it to your audience, you’ll have the start of a money-making eCommerce machine.\n" +
- "\n" +
- "Now, let’s get into the nitty gritty of how your online store is going to operate.",
- "\n" +
- "Whether you’re selling your own new products or reselling other goods, you still have to consider how much stock you’re going to carry, how you’re going to fund upfront purchasing costs, and where you’re going to store your inventory. Remember, even if you avoid paying rent on a storefront, you still need to store your inventory somewhere.\n" +
- "\n" +
- "Well. Not always. There’s another option that’s become incredibly popular in the last few years (and is my personal favorite way to operate a product business), called drop shipping.\n" +
- "\n" +
- "With drop shipping, you’re effectively partnering with a manufacturer or wholesaler to sell their products. This way, you don’t pay upfront costs to buy inventory, aren’t sitting on unsold items taking up expensive warehouse space, and don’t have to deal with shipping the products yourself. You simply create your site, fill it with drop shippable products, and drive in customers, with almost everything else done for you.\n" +
- "\n" +
- "Of course, there’s a higher price per product and your margins are lower, but you’re able to start your online store with little more than a Shopify theme and some hosted images of your products. When a customer makes a purchase, you in turn buy the product from your supplier who then ships it directly to your customer.\n" +
- "\n" +
- "No inventory. No handling products yourself. No shipping by hand. Sounds pretty amazing.\n" +
- "\n" +
- "If you want to supplement selling on your Shopify store with other marketplaces, here are a few other highly lucrative options:\n" +
- "\n" +
- "Fulfilled by Amazon: Rather than drop shipping, Amazon lets you store your products in their own warehouses, making them available for Free 2-Day Shipping to Prime members. Which has been proven to significantly increase sales.\n" +
- "Etsy: If you’ve got handmade or crafty products, Etsy is a great marketplace to market and sell on (bonus points if your product is geared towards a more female audience)\n" +
- "eBay: The online auction giant is still in the game and especially good for selling electronics, gadgets, clothing and apparel, and accessories.\n" +
- "Craigslist: While the least scalable, it can be very cost- and time-effective to sell to people locally.\n" +
- "Just be sure to put a lot of care into your product listings. Everything from the titles you use, to how effective the description is at convincing potential buyers your product is better than the rest, and even taking care to shoot high quality product photos can have a dramatic impact on your sales. I recommend using photo editing tools like Fotor, which gives you the ability to edit your images, create captivating graphic designs and more.\n"
- ,R.drawable.guid1);
- myListData[2]= new MyListData(Name_Item[2], R.drawable.a2,"Similar to selling your freelance services, you can also start selling your knowledge and advice in an area you specialize in as a coach or consultant. If you can bill yourself as an expert, there are tons of people out there willing to pay for your time.\n" +
- "\n" +
- "Being an online coach or consultant is a great way to make money online, as instead of giving your client ongoing deliverables (like when you’re a freelancer), you’re teaching them to be better, faster, stronger than the competition. Your expertise becomes the product you’re selling.\n" +
- "\n" +
- "Even better, if you can find ways to package your experience and coaching skills into an easily digestible program, you have the potential to significantly scale this business model.",
- "\n" +
- "Now, if you don’t know people who might want your coaching services, there are a number of online tools and communities that make it incredibly easy to find clients and teach, on just about any topic area you can think of. Community driven platforms like Savvy.is, Clarity.fm, and Coach.me provide you with a network of potential clients to interact with, as well an integrated payment solution.\n" +
- "\n" +
- "And while it’s one of the most limited businesses as you’re only able to charge for the time you can provide, many online coaches make hundreds or even thousands for their packages.\n" +
- "\n" +
- "It’s also one of the quickest ways you can get set up and start generating revenue. All you really need is an account with one of the online coaching communities I mentioned above and expertise to share.\n"
- ,R.drawable.guid2);
- myListData[3]= new MyListData(Name_Item[3], R.drawable.a3,"Podcasts are super hot right now, and for good reason. With how busy our lives are getting, more and more people are looking for passive ways to take in content. Which makes them both a great opportunity to build an audience and to make money online.\n" +
- "\n" +
- "And while it will take time to build up a big-enough audience to attract advertisers and other ways to make extra income from your podcast, the opportunity is there. John Lee Dumas interviews entrepreneurs seven days a week for his podcast Entrepreneur on Fire and now makes more than $200,000 a month from it. In fact, John publishes all his income online and showed that he’s made almost $13 million since launching in 2012.\n" +
- "\n" +
- "The podcast market is constantly looking for new, quality content. And luckily for anyone trying to get started, it’s now easier than ever.\n" +
- "\n" +
- "Starting a podcast, like making a YouTube channel or blog, comes down to telling interesting stories and building an engaged audience. I’m probably sounding like a broken record by now, but you need a niche that you’re interested in and there’s already a demand for. Come up with a list of topics you’d like to talk about and then search iTunes charts, Google Trends and other podcast research sites like cast.market to see what’s currently out there and popular.\n" +
- "\n" +
- "Next, you’ll need the right tools. You can be as complicated or simple as you want depending on your comfort with audio equipment, but at the minimum you’ll want a microphone and software for recording your voice. Companies like Behringer, Blue, Focusrite, and others sell studio-quality plug-and-play podcast setups that can get you recording today.\n" +
- "\n" +
- "Now, it’s time to plan out your show. If you’re doing an interview-style show, you’ll now want to start getting some guests involved. You can use your existing social network to reach out to people you already know or are connected with on Twitter or Facebook. You can also head to Medium or Amazon to find authors or experts on topics specific to your niche.",
- "\n" +
- "Once you’ve gathered a list, put together a template outreach email (as you’ll be doing this over and over) that’s short and clear with expectations. Tell your potential interviewee who you are, what your podcast is about, and what you’re asking of them. Do a few test interviews with friends and family to make sure everything is being recorded at the quality you want and then book your first episode.\n" +
- "\n" +
- "If you like learning new software or are experienced with audio editing, you can put the show together yourself. Otherwise, there are lots of services you can find that will help edit and build your show on place likes UpWork and Fiverr.\n" +
- "\n" +
- "Congrats! You now have a podcast episode that’s ready to be uploaded to iTunes, SoundCloud, or anywhere else and promoted alongside the rest of your content!\n" +
- "\n" +
- "The last step is deciding how you’ll market and monetize your podcast. The larger of an audience you have, the more chances you have for monetizing it. Choose the best website builders to create a simple site for your show and start sharing episodes to your network. When you’re ready to monetize there are a few options you can choose from:\n" +
- "\n" +
- "Traditional advertising (sponsors)\n" +
- "Selling your own products\n" +
- "Donations and crowdfunding\n" +
- "Selling “subscriber-only” content\n" +
- "Putting on live shows\n" +
- "As Aaron Mahnke, creator of the Lore podcast says:\n" +
- "\n" +
- "“I always tell podcasters to use as many streams as possible. Don't just sell ads on your show. Don't just sell T-shirts. Don't just do crowdfunding. Do all of it. Combine it and find the right mix, and together it adds up to something that's stronger and more dependable.”\n"
- ,R.drawable.guid3);
- myListData[4]= new MyListData(Name_Item[4], R.drawable.a4,"Medium is an online community where anyone can post articles and\n" +
- " essays and get them in front of their audience of millions of monthly readers. \n" +
- "While it can be a great place to build your audience for your own blog or find\n" +
- " customers for your consulting business, with Medium’s new Partner Program, you \n" +
- "can now make money online whenever someone reads your articles.",
- " Register for free and you can choose whether your articles are freely available or only readable by\n" +
- "those people paying $5/month for a premium Medium membership. You’ll make money based on\n" +
- " the amount of people who read and engage with your posts each month."
- ,R.drawable.guid4);
- myListData[5]= new MyListData(Name_Item[5], R.drawable.a5,"Journalists, doctors, lawyers, academics, and researchers record interviews every single day and need someone to transcribe what’s been said. \n" +
- "So, if you’re comfortable with listening to the same audio over and over while writing it down you can make good money online doing transcriptions.\n",
- "Most services pay anywhere from $15 to $25 per hour of transcribed audio. \n" +
- "If you specialize and have training in legal or medical transcription you can make even more. \n" +
- "If you’re a beginner transcriptionist you can find jobs at Transcribe Anywhere, TranscribeMe, Quicktate, Rev, Tigerfish, and Crowdsurf.\n"
- ,R.drawable.guid5);
- AddItem();
- // InverseList(myListData);
- RecyclerView recyclerView = findViewById(R.id.recyclerView);
- MyAdapter adapter = new MyAdapter(myListData,this);
- recyclerView.setHasFixedSize(true);
- recyclerView.setLayoutManager(new LinearLayoutManager(this));
- recyclerView.setAdapter(adapter);
- }
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.main, menu);
- return true;
- }
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- Utils utils= new Utils(this);
- switch (item.getItemId()) {
- case R.id.settings:
- startActivity(new Intent(this,Settings.class));
- break;
- case R.id.action_rate:
- utils.Rate();
- break;
- case R.id.action_share:
- utils.Share();
- break;
- }
- return true;
- }
- private void ResizeIndex(){
- index =sharedpref.LoadInt("index");
- switch (index){
- case 6 :
- sharedpref.SaveInt("index",8);
- ReloadActivity();
- break;
- case 8:
- sharedpref.SaveInt("index",10);
- ReloadActivity();
- break;
- case 10:
- sharedpref.SaveInt("index",12);
- ReloadActivity();
- break;
- // case 12:
- // sharedpref.SaveInt("index",14);
- // ReloadActivity();
- // break;
- default:
- Toast.makeText(this, "Hello ! That's enough", Toast.LENGTH_SHORT).show();
- }
- }
- private void Takeguide() {
- int showSwip = sharedpref.LoadInt("guide");
- if (showSwip == 1) {
- snackBar("Swip up to show More");
- }
- sharedpref.SaveInt("guide",0);
- }
- private void AddItem(){
- // TODO Change the content of the hidden items 6-> 11 = 6 items
- index =sharedpref.LoadInt("index");
- if (index>=8){
- myListData[6]= new MyListData(Name_Item[6], R.drawable.a6,"Ever see a Google result and say “How the heck did that get there?” While Google and other search engines use powerful algorithms to determine what pages to show for search results, there are real people making money online by making sure the machines are doing their job correctly.\n ",
- "With sites like Appen and LionBridge you can make money by conducting researches on predefined search queries and providing feedback for results based on their relevance."
- ,R.drawable.guid6);
- myListData[7]= new MyListData(Name_Item[7], R.drawable.a7,"The global used smartphone industry is worth a staggering $5 billion. \n" +
- "Which means that old phone you forgot about in your cabinet could be \n" +
- "worth some serious money. ",
- "\n" +
- "There are tons of sites online that will either buy your old smartphone outright or let you list your phone for the thousands of people out there not willing to shell out $1000+ for a shiny new iPhone. Check out Buyback Boss, Orchard, Gazelle, or Swappa to make extra money online by selling your smartphone or other electronics."
- ,R.drawable.guid7);
- if (index>=10){
- myListData[8]= new MyListData(Name_Item[8], R.drawable.a8,"Etsy is the most popular online marketplace for handmade goods and crafts.\n" +
- " From bracelets to phone cases, rings, furniture, and more, Etsy is perfectfor anyone who is creative and wants to sell their handmade creations. \n" +
- "As long as you have the space, this can make for one of the best ways to make money online that can be started with a very limited investment.\n" +
- "Consider these 5 steps to starting an Etsy store, from Handmadeology.\n",
- "While Etsy is a great place to get in front of potential customers who wouldn’t have otherwise found you, once you’re up and running and have built a decent audience, you can move your store over to Shopify and retain a larger portion of the income you make from selling your goods.\n"
- ,R.drawable.guid8);
- myListData[9]= new MyListData(Name_Item[9], R.drawable.a9,"If editing and advising college students on how to write compelling 500 word essays on topics such as \"You were just invited to speak at the White House. \n" +
- "Write your speech,\" seems like something you would want to do, you can make good money online.\n",
- "Trust me, tons of parents will pay you to edit admissions essays and offer constructive feedback for their children. Look for open positions at top editing companies like Scribendi, Top Admit, or Essay Edge or post your services online on Craigslist and other marketplaces.\n"
- ,R.drawable.guid9);
- if (index>=12){
- myListData[10]=new MyListData(Name_Item[10],R.drawable.a10,"Creat All here About Step1 for item 10"
- ,"Creat All here About Step2 for item 10",R.drawable.guid10);
- myListData[11]=new MyListData(Name_Item[11],R.drawable.a11,"Creat All here About Step1 for item 11 ",
- " Creat All here About Step2 for Item 11",R.drawable.guid11);
- // if (index>=14){
- // myListData[12]=new MyListData(Name_Item[12],R.drawable.a12,"Creat All here About Step1 for item 10" ,"Creat All here About Step2 for item 10",R.drawable.guid12);
- //
- // myListData[13]=new MyListData(Name_Item[13],R.drawable.a13,"Creat All here About Step1 for item 11 ",
- // " Creat All here About Step2 for Item 11",R.drawable.guid13);
- // }
- }
- }
- }
- }
- private void ReloadActivity(){
- sharedpref.SaveInt("guide",1);
- Intent refresh = new Intent(this, MainActivity.class);
- startActivity(refresh);
- //
- this.finish(); //
- }
- @Override
- public void onBackPressed() {
- final Utils utils= new Utils(this);
- RatingDialog.getDialog(this, new DialogListener() {
- @Override
- public void onPositiveButton(Dialog dialog) {
- dialog.dismiss();
- utils.Rate();
- }
- @Override
- public void onNegativeButton(Dialog dialog) {
- dialog.dismiss();
- ActivityCompat.finishAffinity(MainActivity.this);
- }
- }).show();
- }
- private final Runnable mUpdateTimeTask = new Runnable() {
- public void run() {
- Animation animation = AnimationUtils.loadAnimation(MainActivity.this, R.anim.scale_down);
- btnMore.setAnimation(animation);
- mHandler.postDelayed(this, 200);
- }
- };
- public void snackBar(String textMsg){
- View customSnac=findViewById(R.id.customSnac);
- snackbar = Snackbar.make(customSnac, textMsg, Snackbar.LENGTH_LONG);
- snackbar.getView().setBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.colorPrimaryDark));
- snackbar.setActionTextColor(getResources().getColor(R.color.white));
- snackbar.show();
- snackbar.setAction("Dimiss", new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- snackbar.dismiss();
- }
- });
- }
- @Override
- protected void onStart() {
- mUpdateTimeTask.run();
- super.onStart();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment