Search Results

Search found 3 results on 1 pages for 'user329692'.

Page 1/1 | 1 

  • Android: Using linear gradient as background looks banded

    - by user329692
    Hi All! I'm trying to apply a linear gradient to my ListView. This is the content of my drawable xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#3A3C39" android:endColor="#181818" android:angle="270" /> <corners android:radius="0dp" /> </shape> So I apply it to my ListView with: android:background="@drawable/shape_background_grey" It works but it looks very "banded" on emulator and on a real device too. Is there any way to reduce this "behaviour"?

    Read the article

  • android: start an intent into a framelayout

    - by user329692
    Hi guys! I have a main activity with this layout file: <?xml version="1.0" encoding="utf-8"?> <Button android:id="@+id/btn_reload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Reload" /> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical|center_horizontal" > <ImageView android:id="@+id/ImageView01" android:src="@drawable/logo_head" android:scaleType="fitStart" android:adjustViewBounds="true" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout> <FrameLayout android:id="@+id/center" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_weight="1"> </FrameLayout> <LinearLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:gravity="center" android:id="@+id/footer" android:layout_weight="2.6" android:background="#ffffff"> </LinearLayout> Basically it is composed by an header, a central part (android:id="@+id/center") and a footer. The footer contains four buttons, created dinamically. At the end it looks like a TabWidget with the tabs at the botton. Each footer's buttons holds an Intent/activity. The question is: How can i start my activity into the FrameLayout? For instance TabHost does this: ..... spec = tabHost .newTabSpec(tabTitle.toLowerCase()) .setIndicator(tabTitle,res.getDrawable(R.drawable.tab_spec)) .setContent(intent); tabHost.addTab(spec); ....

    Read the article

  • android: Check if a View is bringed to front

    - by user329692
    Hi Guys! I made a custom component which simple extends a WebView This component is used into activities that are loaded from a tabhost. This component creates a timertask too. I'd like to execute the task only if the activity that contains the component is visible. Ex: public class MyWebView extends WebView { public MyWebView(Context context, AttributeSet as) { super(context,as); /** More code **/ TimerTask ttask = new TimerTask() { @Override public void run() { if (iamvisible) doStuff(); } }; timer = new Timer(); timer.schedule(ttask, refreshInterval * 1000, refreshInterval * 1000); } } How can I set the iamvisible variable? I tried overriding onWindowFocusChanged and onWindowVisibilityChanged but with no luck Regards in advance

    Read the article

1