Asynctask still buttons are hiding depends on the value
<p>I'm creating an app that displays a list of objects. I had an error handling wherein if the value is less than or equal to 10, next and previous button will be hidden but when i search a value that has more than 10, next and previous button are still hidden</p>

<pre><code>protected void onPostExecute(Void result) {

    btnback2 = (Button) findViewById(R.id.back);
    btnnext2 = (Button) findViewById(R.id.next);

    if (GetSearchValue.size() &lt;= 10) {
        btnback2.setVisibility(View.INVISIBLE);
        btnnext2.setVisibility(View.INVISIBLE);
    }

    btnback2.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View convertView) {
            new ValueBack2().execute();
        }
    });
    btnnext2.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View convertView) {
            new ValueNext2().execute();
        }
    });

    super.onPostExecute(result);
    Asycdialog.dismiss();
}
</code></pre>