0

하위 항목을 클릭 할 때마다 해당 페이지를 가리켜 야하는 코드 조각을 복사 중입니다! 나는 아이의 위치 0 번째에있는 항목을 클릭하면onChildClick() 메서드에서 Intent를 사용하는 방법

//CODE STARTS // 
 
    public boolean onChildClick(ExpandableListView parent, View v, 
 
        int groupPosition, int childPosition, long id) { 
 
       // TODO Auto-generated method stub 
 
      \t int gp=groupPosition; 
 
      \t if (gp == 0) 
 
      \t { 
 
       switch(childPosition) 
 
       { 
 
       case 0 : 
 
       \t Intent intent = new Intent(Intent.ACTION_VIEW, 
 
       \t \t   Uri.parse("http://www.arsenal.com")); 
 
       } 
 
       \t  
 
      \t } 
 
        
 
       return false; 
 
      } 
 
// CODE ENDS //

그래서, 그것은 Arsenal.com 날 직접 다시한다! 그래도 작동하지 않습니다! 그것은 같은 페이지에 나를 유지!

답변

0

브라우저 활동을 시작하려면 startActivity(intent);으로 전화하십시오.