snipt

Ctrl+h for KB shortcuts

Text only

margin to textView

1
2
3
                LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)title_product.getLayoutParams();
                params.setMargins(0, 28, 0, 0);
                title_product.setLayoutParams(params);
https://snipt.net/embed/a8debbbcadd2de89ff25e760d9ad504b/
https://snipt.net/raw/a8debbbcadd2de89ff25e760d9ad504b/
a8debbbcadd2de89ff25e760d9ad504b
text
Text only
3
2016-02-09T07:42:21
True
False
Jan 21, 2016 at 01:53 PM
/api/public/snipt/143735/
margin-to-textview
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a> LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)title_product.getLayoutParams(); </span><span id="L-2"><a name="L-2"></a> params.setMargins(0, 28, 0, 0); </span><span id="L-3"><a name="L-3"></a> title_product.setLayoutParams(params); </span></pre></div> </td></tr></table>
android, margin, textview

Text only

move scrool to up

scroll.fullScroll(ScrollView.FOCUS_UP);
https://snipt.net/embed/4f184facef8c08d7f949089e86dccc2f/
https://snipt.net/raw/4f184facef8c08d7f949089e86dccc2f/
4f184facef8c08d7f949089e86dccc2f
text
Text only
1
2016-02-09T06:37:04
True
False
Jan 19, 2016 at 10:30 AM
/api/public/snipt/143676/
move-scrool-to-up
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>scroll.fullScroll(ScrollView.FOCUS_UP); </span></pre></div> </td></tr></table>
android, scroll

Text only

sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable.

1
2
3
4
5
Open the terminal window and enter the following:
export ANDROID_HOME=/Applications/adt-bundle/sdk (ng: write your own path to sdk)

Once you have this set, you need to add this to the PATH environment variable
export PATH=$PATH:$ANDROID_HOME/bin
https://snipt.net/embed/dcaa2e1f32999dd44f9907a19e3495bf/
https://snipt.net/raw/dcaa2e1f32999dd44f9907a19e3495bf/
dcaa2e1f32999dd44f9907a19e3495bf
text
Text only
5
2016-02-09T09:30:30
True
False
/api/public/snipt/136876/
sdkdir-is-missing-make-sure-to-generate-localproperties-using-android-update-project-or-to-inject-it-through-the-android_home-environment-variable-e54f799d
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Open the terminal window and enter the following: </span><span id="L-2"><a name="L-2"></a>export ANDROID_HOME=/Applications/adt-bundle/sdk (ng: write your own path to sdk) </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>Once you have this set, you need to add this to the PATH environment variable </span><span id="L-5"><a name="L-5"></a>export PATH=$PATH:$ANDROID_HOME/bin </span></pre></div> </td></tr></table>
android, cordova

Text only

Android/Cordova: http requests not working on jarsigned app

1
2
3
4
5
Only works on debug.
http works, https doesn't.

The problem could come from the certificate:
http://stackoverflow.com/questions/20036260/phonegap-android-app-ajax-requests-to-https-fail-with-status-0
https://snipt.net/embed/b57a79b32ec8fc0a20de53764adc8a19/
https://snipt.net/raw/b57a79b32ec8fc0a20de53764adc8a19/
b57a79b32ec8fc0a20de53764adc8a19
text
Text only
5
2016-02-05T16:58:30
True
True
Jul 29, 2014 at 11:45 AM
/api/public/snipt/135973/
androidcordova-http-requests-not-working-on-jarsigned-app-50e8fd6a
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Only works on debug. </span><span id="L-2"><a name="L-2"></a>http works, https doesn&#39;t. </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>The problem could come from the certificate: </span><span id="L-5"><a name="L-5"></a>http://stackoverflow.com/questions/20036260/phonegap-android-app-ajax-requests-to-https-fail-with-status-0 </span></pre></div> </td></tr></table>
android, certificate, http
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.