Monday 8 October 2018

Android code for scrollable alert dialog

Create your own layout.xml file containing a Text View under Scroll View. and set TextMessage in this Text View, Inflate this layout with your alert dialog box.

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

    <TextView
        android:id="@+id/textmsg"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:text="@string/hello" />

    </LinearLayout>
</ScrollView>




LayoutInflater inflater= LayoutInflater.from(this);
View view=inflater.inflate(R.layout.yourxmlfile, null);

TextView textview=(TextView)view.findViewById(R.id.textmsg);
textview.setText("Your really long message.");
final AlertDialog alertDialog = new AlertDialog.Builder(ctx).create();
        alertDialog.setTitle("Title");
        alertDialog.setView(view);
        alertDialog.setButton("OK", new DialogInterface.OnClickListener()
        {
            public void onClick(DialogInterface dialog, int which)
            {
                alertDialog.dismiss();
            }
        });
alertDialog.show();


Thursday 27 September 2018

Android Volley post request for x-www-form-urlencoded

Hi, in post API link there are a few type, which is include form-data, x-www-form-urlencoded, raw and binary......

this tutorial code will show your how to post API link for x-www-form-urlencoded

private void postFunction(){

     RequestQueue requestQueue;
     Cache cache = new DiskBasedCache(getCacheDir(),1024*1024);
     Network network = new BasicNetwork(new HurlStack());
     requestQueue = new RequestQueue(cache, network);
     requestQueue.start();

      String apiLink = "";

      StringRequest jsonObjRequest = new StringRequest(Request.Method.POST, apiLink,
             new Response.Listener<String>() {
                 @Override
                 public void onResponse(String response) {
                     String s;
                     s = response.toString().trim();
                     JSONObject obj = null;
                         try {
                             obj = new JSONObject(s);
                         } catch (Throwable t) {
                         }
                          try {
                             String a = obj.getString("status");
                         } catch (JSONException e) {
                             e.printStackTrace();
                         }
                 }
             }, new Response.ErrorListener() {

        @Override
        public void onErrorResponse(VolleyError error) {
             VolleyLog.d("volley", "Error: " + error.getMessage());
             error.printStackTrace();
          }     }) {

        @Override
        public String getBodyContentType() {
             return "application/x-www-form-urlencoded; charset=UTF-8";
         }

        @Override
        protected Response<String> parseNetworkResponse(NetworkResponse response) {
             String parsed;
             try {
                 parsed = new String(response.data, "UTF-8");
             } catch (UnsupportedEncodingException e) {
                 parsed = new String(response.data);
             }
             return Response.success(parsed, HttpHeaderParser.parseCacheHeaders(response));
         }

        @Override
        protected Map<String, String> getParams() throws AuthFailureError {
             Map<String, String> params = new HashMap<String, String>();
             params.put("username", "nameTesting");
                          return params;
         }
     };

     requestQueue.add(jsonObjRequest);
 }

Monday 16 July 2018

Android Count Down Timer Tutorial

Hello, count down timer is a commonly used feature in interaction design or system feedback. This tutorial will show how to use the Android CountDownTimer class.

Step 1: Create a boolean (for indicate that the timer is running or not)

Step 2: Create two Constant (example startTime = 60000 for 60 seconds, interval = 1000)

Step 3: Create a inner class in the Activity/Class

public class MyCountDownTimer extends CountDownTimer {

        public MyCountDownTimer(long startTime, long interval) {
            super(startTime, interval);
        }

        @Override
        public void onFinish() {
            //to stop the timer
            countDownTimer.cancel();
            //boolean that to indicate that the time is running or not
            isRunning = false;
        }

        @Override
        public void onTick(long millisUntilFinished) {
            //create a text view to display the count down time
            tvCountDown.setText(String.valueOf(millisUntilFinished / 1000));
        }

    }

Step 4: Create the CountDownTimer variable and initialise it like this new MyCountDownTimer(startTime, interval)

Step 5: You can start the timer with this code line: countDownTimer.start(); and remember to set the boolean isRunning to true.


Tuesday 15 May 2018

Apps Privacy Policy

Thank you so much for using our app. This app is designed by Big Dipper.

What personal information do we collect

We do not collect information from users

Google Adsense/Admob

The ads are served by Google. Google’s use of the DART cookie enables it to serve ads to Users based on their visit to our Site and other sites on the Internet. DART uses “non personally identifiable information” and does NOT track personal information about you, such as your name, email address, physical address, etc. You may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at http://www.google.com/privacy_ads.html

Your acceptance of these terms

By using this apps services, you signify your acceptance of this policy. If you do not agree to this policy, please do not use this apps services. Your continued use of the apps services following the posting of changes to this policy will be deemed your acceptance of those changes.

Contacting us

If you have any questions about this Privacy Policy, the practices of the apps, please contact us at sevenbigdipper91@gmail.com



非常欢迎您使用本应用,本应用是由北辰所制作。

我们收集什么个人信息

我们不会从用户那里收集信息

Google Adsense / Admob

这些广告由Google投放。 Google使用DART Cookie可以根据访问我们的网站和互联网上的其他网站向用户投放广告。 DART使用“非个人身份信息”,不会跟踪您的个人信息,例如您的姓名,电子邮件地址,实际地址等。您可以通过访问Google广告和内容网络隐私来选择不使用DART Cookie政策在http://www.google.com/privacy_ads.html

您接受这些条款

通过使用这应用程序服务,您表示您接受此政策。如果您不同意本政策,请不要使用此应用服务。在对此政策进行更改发布后,继续使用应用服务将被视为您接受这些更改。

联系我们

如果您对本隐私政策有任何疑问,请通过电子邮箱与我们联系:sevenbigdipper91@gmail.com

Saturday 26 August 2017

Medical Mnemonics and Facts Apps Privacy Policy


https://play.google.com/store/apps/details?id=com.bigdipper.medicalmnemonicsandfacts&hl=en

This privacy policy applies to the mobile apps medical mnemonics and facts.

What personal information do we collect

We do not collect information from users

Google Adsense/Admob

The ads are served by Google. Google’s use of the DART cookie enables it to serve ads to Users based on their visit to our Site and other sites on the Internet. DART uses “non personally identifiable information” and does NOT track personal information about you, such as your name, email address, physical address, etc. You may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at http://www.google.com/privacy_ads.html

Your acceptance of these terms

By using this apps services, you signify your acceptance of this policy. If you do not agree to this policy, please do not use this apps services. Your continued use of the apps services following the posting of changes to this policy will be deemed your acceptance of those changes.

Contacting us

If you have any questions about this Privacy Policy, the practices of the apps, please contact us at sevenbigdipper91@gmail.com

Saturday 19 August 2017

Bruce Lee Quotes



If you love life, don't waste time, for time is what life is made up of.


Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it.


Knowledge will give you power, but character respect.


Mistakes are always forgivable, if one has the courage to admit them.


A wise man can learn more from a foolish question than a fool can learn from a wise answer.

Absorb what is useful, reject what is useless, add what is essentially to your own.

If you always put limit on everything you do, physical or anything else. It will spread into your work and into your life. There are no limits. There are only plateaus, and you must not stay there, you must go beyond them.


If you spend too much time thinking about a thing, you'll never get it done.


Love is like a friendship caught on fire. In the beginning a flame, very pretty, often hot and fierce, but still only light and flickering. As love grows older, our hearts mature and our love becomes as coals, deep-burning and unquenchable.


I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.


A goal is not always meant to be reached, it often serves simply as something to aim at.


To hell with circumstances; I create opportunities.



As you think, so shall you become.



Notice that the stiffest tree is most easily cracked, while the bamboo or willow survives by bending with the wind.



Take things as they are. Punch when you have to punch. Kick when you have to kick.


A quick temper will make a fool of you soon enough.


The key to immortality is first living a life worth remembering.


Showing off is the fool's idea of glory.


I'm not in this world to live up to your expectations and you're not in this world to live up to mine.


The possession of anything begins in the mind.


It's not the daily increase but daily decrease. Hack away at the unessential.


Ever since I was a child I have had this instinctive urge for expansion and growth. To me, the function and duty of a quality human being is the sincere and honest development of one's potential.


The less effort, the faster and more powerful you will be.


Take no thought of who is right or wrong or who is better than. Be not for or against.


To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is.


Real living is living for others.


All fixed set patterns are incapable of adaptability or pliability. The truth is outside of all fixed patterns.


Obey the principles without being bound by them.


To know oneself is to study oneself in action with another person.


You just wait. I'm going to be the biggest Chinese Star in the world.


Man, the living creature, the creating individual, is always more important than any established style or system.


叶问口诀

叶问口诀

念头不正,终生不正。 
念头主手(一说守),寻桥主脚(与步)。 
标指不出门。(拳法) 
来留去送,甩手直冲。 
揿头扢尾,揿尾扢头,中间(飘)膀起。 
正身子午,侧身以膊(为子午)。 
朝面追形,而(追形)不追手,以形补手,以手补形。 
力由地起,拳由心发,手不出门(手不离午)。 
避实击虚 (遇实则卸,见虚即进)。 
畏打(终)须打,贪打(终)被打。(不畏打,不贪打) 
转马手先行。上马手先行。(转马上马,桩手先行) 
留情不出手,出手不留情。(留情不打,打不留情) 
不挑不格,消打同时。 

适用口诀

枕手桥上过,摊手中门内,伏手控外门。 
膀手不留桥,间手破中出,构手枕伏化。 
膀手非手,错膀非错。 
耕拦摊膀,黏摸荡捋;推托拉按,缠撞挂漏;
曲手留中,来留去送;甩手直冲,
按头起尾,按尾起头,按中间飘膀起,
敌移动,重心空,手黏手,无法走;
大闪侧,小俯仰,小闪侧,大俯仰,审势牢记。
二桥上势,里帘必争。
明动静,知有无,知进退。
一拳一掌,一马一步,
步要轻灵,马要稳,腰胯动,桥不动,桥动腰胯不动。